-
Notifications
You must be signed in to change notification settings - Fork 80
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
compiler-versions
script: Compute supported compiler versions for all packages
#639
compiler-versions
script: Compute supported compiler versions for all packages
#639
Conversation
… not to consider ranges in dependencies. Fix tests
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 |
I like the progress output, thanks for doing that!
|
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 PR builds on #632 and is a step towards #255. It extends to
compiler-versions
script 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:
DependencyIndex
Manifest
, try to solve via the previousDependencyIndex
and then compile - if it succeeds, add the entry to theDependencyIndex
, else record failure and continueThe end result is a
DependencyIndex
with as many entries as we could solve and then compile with that compiler version. AnyManifest
not 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-compilers
For all packages, with a single compiler:
GITHUB_TOKEN=xxx spago run -p registry-scripts -m Registry.Scripts.CompilerVersions -- --all-packages --compiler 0.13.0
For a single package, checking all compilers:
GITHUB_TOKEN=xxx spago run -p registry-scripts -m Registry.Scripts.CompilerVersions -- --package prelude@3.0.0 --all-compilers
For 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.0
Future 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.