-
-
Notifications
You must be signed in to change notification settings - Fork 255
Implement latest requirements #472
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
base: master
Are you sure you want to change the base?
Conversation
0c7f806
to
e95fc76
Compare
e37d81d
to
584e56c
Compare
584e56c
to
ce67f1f
Compare
@fmeum this is ready from my end now, I'd appreciate any feedback. I added a concrete practical goal to the PR description. |
f983ee3
to
5467126
Compare
09b2483
to
9dd9631
Compare
Add a test for the distribution finder. The test computes what would be found given all versions a nd a combination of arch and os. Then the test compares the result to what is configured and shows the difference. If the difference is empty then the finder is correct. There are currently only deleted entries with the last deleted enty in version 18.1.0. In other words starting with llvm version 18.1.1 the finder is correct. That also means as long as this is true, when someone adds information for a new version then the test does not need to be updated.
This allows to specifically require ranges, including minimum and maximum versions as well as version exclusions. That can be easier than figuring out which versions are available for which platform. Further this allows to automatically pick up relevant versions automatically as they become available later.
…at is not setup correctly. Since it s going away there is also no point in adding and fixing it now.
Need to upgrade external helly25_bzl to 0.1.2 to fix its workspace file. Also important: Add the strip_prefix. Otherwise the workspaces dump the repo including the root directory. As a result the files cannot be found and BAzel only states there is no BUILD file. It should possibly suggest there is no such directory and no such bzl file in the first place.
…rrect version order.
9dd9631
to
01814d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me after a quick read through. I'm also fine with the new dep that handles version parsing.
Could you resolve the conflict and perform the cleanup you had in mind? Then I can do a full review.
See issue #473
This builds on PR #471
This PR allows requirements support for the LLVM versions like
llvm_version = "first"
andllvm_version = "latest"
which will effectively find the first and latest LLVM version respectively. For many people this will be the easiest way to get started and solves the issue that not always all arch/os versions have been prepared for all LLVM versions. It also means you do not have to know whether the basename starts with "LLVM" or "clang_llvm", in which order arch and os have to be provided and how the os is exactly specified.We further add the ability to specify requirements, including minimum and maximum versions as well as version exclusions. That can be easier than figuring out which versions are available for which platform. Further this allows to automatically pick up relevant versions automatically as they become available later. Example:
The requirements strings mostly follow semver specs and support
<
,<=
,>
,>=
,==
and!=
. They only currently work for version componentsmajor
,minor
andpatch
. Since we do not list other versions in our config that is fine for now.One practical goal for this PR is to be able to run automatic tests with updated LLVM versions in the easiest possible way. Using the new extra_llvm_versions we can now easily run automated CI/CD tests against different LLVM branches. Say:
llvm_version = 'latest:>=15,<16'
llvm_version = 'latest:>=19,<20'
llvm_version = 'latest:>=20,<21'
That above list would be used in three separate CI/CD runs that would then test the 15, 19 and 20 branches respectively. When new distributions get added upstream or locally, they can easily be added via the new
extra_llvm_distributions
and will be picked up by the setup without any further change.