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

Add test for atom order stability #290

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Conversation

Ygg01
Copy link
Contributor

@Ygg01 Ygg01 commented Feb 19, 2025

Eliminates a source of non-reproducibility from codegen.

Used test to verify behavior and then fixed it via replacing HashMapBTreeMap to eliminate it. This should have no impact since it's at codegen.

It affects servo/html5ever#573

@bmwiedemann
Copy link

Yes, I tested it and this helps.

/// Write generated code to destination [`Vec<u8>`] and return it as [`String`]
///
/// Used mostly for testing or displaying a value.
pub fn write_to_string(&mut self, mut destination: Vec<u8>) -> io::Result<String>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be annotated with #[cfg(test)]. I think it isn't useful otherwise and this can help to avoid breaking API in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I annotated it, but it caused breakage in the test. So I converted tests to unit test.

# Conflicts:
#	string-cache-codegen/tests/reproducibility_test.rs
@Ygg01
Copy link
Contributor Author

Ygg01 commented Feb 19, 2025

Yeah, we need to then make a release, and update html5ever, I guess.

@mrobinson mrobinson added this pull request to the merge queue Feb 19, 2025
Merged via the queue into servo:main with commit d9e888f Feb 19, 2025
5 checks passed
@Ygg01 Ygg01 deleted the fix-repro-issue branch February 20, 2025 10:07
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.

3 participants