This repository was archived by the owner on Apr 20, 2026. It is now read-only.
fix: replace line endings on Windows to enforce deterministic metadata#108
Merged
fix: replace line endings on Windows to enforce deterministic metadata#108
Conversation
2a3b4c7 to
f6dd9e4
Compare
mattsse
suggested changes
Apr 20, 2024
Member
mattsse
left a comment
There was a problem hiding this comment.
q about windows cfg.
let's also add a note for this
| let content = fs::read_to_string(file).map_err(|err| SolcIoError::new(err, file))?; | ||
| let content = fs::read_to_string(file) | ||
| .map_err(|err| SolcIoError::new(err, file))? | ||
| .replace("\r\n", "\n"); |
Member
There was a problem hiding this comment.
should we only do this on windows?
this is probably not a big perf hit, but if we can limit this to windows only, it would be ideal
mattsse
approved these changes
Apr 20, 2024
klkvr
added a commit
that referenced
this pull request
Jun 7, 2024
Follow-up to #108. It seems that in certain cases files on WSL still have `\r\n` prefix, thus this PR changes logic to always fix Windows line endings and not only on Windows builds.
Closed
2 tasks
alexandergrey33
added a commit
to alexandergrey33/compilers
that referenced
this pull request
Sep 17, 2025
Follow-up to foundry-rs/compilers#108. It seems that in certain cases files on WSL still have `\r\n` prefix, thus this PR changes logic to always fix Windows line endings and not only on Windows builds.
bug-knightxmiu70
added a commit
to bug-knightxmiu70/compilers
that referenced
this pull request
Sep 28, 2025
Follow-up to foundry-rs/compilers#108. It seems that in certain cases files on WSL still have `\r\n` prefix, thus this PR changes logic to always fix Windows line endings and not only on Windows builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm writing tests for foundry-rs/foundry#7711 which are hardcoding CREATE2 library deployment addreses and they are currently failing on Windows probably because \r\n line endings which are causing metadata differences.
This PR tries to fix this by replacing such endings with \n