Repository navigation
compiler-versions script: Compute supported compiler versions for all packages - #639
Merged
Merged
Conversation
… not to consider ranges in dependencies. Fix tests
Member
|
I think the algorithm is sound and I've been able to run this with the 0.15.x series and 0.14.x series of the compiler (trying 0.13.x now). Once I've verified the various CLI combinations I'll take a deeper code review. At a glance there are some lingering |
Member
|
I like the progress output, thanks for doing that! |
f-f
approved these changes
Jul 27, 2023
Member
|
It's taking a very long time to verify the 0.13.0 compiler, but so far I'm about 7,000 package versions in and no random failures (with #638 included on top of this code). |
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.
This PR builds on #632 and is a step towards #255. It extends to
compiler-versionsscript with the option to compute the supported compiler versions for all packages in the manifest index.The algorithm for finding the supported packages for a specific compiler version is the following:
DependencyIndexManifest, try to solve via the previousDependencyIndexand then compile - if it succeeds, add the entry to theDependencyIndex, else record failure and continueThe end result is a
DependencyIndexwith as many entries as we could solve and then compile with that compiler version. AnyManifestnot found there either didn't solve (meaning its dependencies are not supported by that compiler version) or didn't compiler (meaning its dependencies are supported by that compiler version, but that package is not). We record all entries and continue to the next compiler.I am currently dumping results to a file and logging progress messages per entry we check. There are comprehensive debug logs. The failure results are sorted in topological order so that we can see how failures propagate throughout.
Usage:
For all packages, all compilers:
GITHUB_TOKEN=xxx spago run -p registry-scripts -m Registry.Scripts.CompilerVersions -- --all-packages --all-compilersFor all packages, with a single compiler:
GITHUB_TOKEN=xxx spago run -p registry-scripts -m Registry.Scripts.CompilerVersions -- --all-packages --compiler 0.13.0For a single package, checking all compilers:
GITHUB_TOKEN=xxx spago run -p registry-scripts -m Registry.Scripts.CompilerVersions -- --package prelude@3.0.0 --all-compilersFor a single package, checking a single compiler:
GITHUB_TOKEN=xxx spago run -p registry-scripts -m Registry.Scripts.CompilerVersions -- --package prelude@3.0.0 --compiler 0.13.0Future Work:
I've ran the script on 0.15.0 and 0.13.0 and the output looked fine at a glance. In the future we will need to add some verification checks (perhaps making sure the package sets for that compiler version are all included in this output), but I've left that as follow on work.
I've ran into spurious API failures while installing packages quite often, which should be alleviated by #638.