Make generated sources and one error message deterministic#1804
Merged
speth merged 2 commits intoCantera:mainfrom Oct 30, 2024
Merged
Make generated sources and one error message deterministic#1804speth merged 2 commits intoCantera:mainfrom
speth merged 2 commits intoCantera:mainfrom
Conversation
In Fedora rebuilds to test package build reproducibility (see https://reproducible-builds.org/, https://fedoraproject.org/wiki/Changes/ReproduciblePackageBuilds), we get the following differences like the following for various CMakeLists.txt and SConstruct files: /usr/share/cantera/samples/cxx/LiC6_electrode/CMakeLists.txt: │ │ -include_directories("/usr/include" "/usr/include/eigen3" "/usr/include/highfive") │ │ +include_directories("/usr/include/highfive" "/usr/include/eigen3" "/usr/include") Those end up in the -debugsources package and cause the whole build to be flagged as irreproducible. In addition, if the an include file with the same name happened to be present in more than one location, the unpredictable sort order would mean that different files would be used in different builds. Sort the directories alphabetically for predictable results.
The message would vary between reruns, which is not useful.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1804 +/- ##
=======================================
Coverage 73.09% 73.09%
=======================================
Files 383 383
Lines 54617 54617
Branches 9101 9101
=======================================
+ Hits 39921 39924 +3
+ Misses 11698 11696 -2
+ Partials 2998 2997 -1 ☔ View full report in Codecov by Sentry. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace
list(set(…))bysorted(set(…))to avoid randomness in builds and at runtime.