Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add id attribute in node #42

Merged
merged 8 commits into from
Mar 12, 2024
Merged

fix: Add id attribute in node #42

merged 8 commits into from
Mar 12, 2024

Conversation

jpedroh
Copy link
Owner

@jpedroh jpedroh commented Mar 12, 2024

Since Rust uses structural equality to check if two structs are equal, there was a bug in which two different nodes were being considered equal. This introduced a bug in the matching data structure, causing the scenario represented in bin/tests/scenarios/imports_are_merged_correctly to crash. By generating a random UUID during parsing and using it for checking equality between nodes, we drastically reduce the chances of this issue occurring.

Copy link

codesandbox bot commented Mar 12, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@coveralls
Copy link

coveralls commented Mar 12, 2024

Coverage Status

coverage: 85.523% (+0.1%) from 85.391%
when pulling 4ef6124 on fix-imports-broken
into eaf9e87 on main.

@jpedroh jpedroh force-pushed the fix-imports-broken branch from 3d3a943 to 0a7a119 Compare March 12, 2024 10:16
@jpedroh jpedroh changed the title fix: Add id in parsing node. fix: Add id attribute in node Mar 12, 2024
@jpedroh jpedroh merged commit b20346b into main Mar 12, 2024
9 checks passed
@jpedroh jpedroh deleted the fix-imports-broken branch March 12, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants