-
Notifications
You must be signed in to change notification settings - Fork 182
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
Convert to bzlmod, first steps. #1893
Convert to bzlmod, first steps. #1893
Conversation
076954e
to
6564c47
Compare
New year, new attempt. Also: @cdleary does this compile for you ? |
Earlier work was in #1570 |
@proppy you checked last time how well it compiles on MacOS |
While in the process to figure out compilation DB choices after #1893 , I am getting different set of language server issues with possible alternatives. This change helps reduce the warning noise and highlighting the differences by fixing known include issues. #xls-build-gardener PiperOrigin-RevId: 720724552
96b84cd
to
310e730
Compare
@cdleary looks good ? |
Happy to give it a try! |
cee30d2
to
f84e5ef
Compare
Good idea! Enabled it temporarily in this PR, and it seems to be happy: https://github.com/google/xls/actions/runs/13058469006/job/36435356862?pr=1893 |
47258ba
to
597422b
Compare
597422b
to
65b355b
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.
Thanks, confirmed this seems to be working in release environments!
Did you also confirm on OSX? (just curious if I should still give it a try) |
@@ -8,3 +8,4 @@ user.bazelrc | |||
.vscode | |||
.cache | |||
docs/ | |||
MODULE.bazel.lock |
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.
FYI best practices seem to be to include the lockfile in VCS
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.
The lock file is a large file with a lot of hashes which is hard to verify. I suspect it makes sense if one uses a different repository than the bazel-central-repository, but it does not really serve a purpose otherwise: the BCR rules are so that a version number uniquely identifies a hash as they don't have a policy to switcaroo these later.
So, I am not convinced that it brings anything to the table, though if there is compelling reason we can add it later.
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.
(as discussed offline: I am happy for some follow-up PR)
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.
Do newer releases of the deps you need a no-rulescc patch for do the edit for you?
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.
Don't know, probably not. The protoc-gen-validate
is super-ancient in BCR (1.0.4), so I intend to send a PR for that to update to the current 1.2.1, then we can see.
s/ -stdlib=libc++/ / # otherwise, clang-tidy does not find c++ headers | ||
EOF | ||
|
||
echo "Sorry, currently no compilation DB with bazel 7 and bzlmod. Stay tuned." |
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.
Maybe include a pointer to a tracking issue.
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.
I don't have a tracking issue, but I have a CL that fixes this (and also provides build_cleaner functionality) ready to go as soon as this is in.
First steps towards exclusively using MODULE.bazel, for now a subset of changes already improving the state a lot. * Add MODULE.bazel and add dependencies already provided by the Bazel Central Registry. * Remove the above from WORKSPACE and dependency_support/{load,initialize}_external.bzl. * Add some patches, as some external dependencies used @rules_cc// to get cc_proto_library and cc_library, which is not available anymore in latest rules_cc (but provided by bazel itself) * Fallout: the compilation db currently can't be built anymore due to the compdb not compatible anymore with bzlmod. I have a plan to replace that, but not in this first CL; for now, it is just disabled. Things for follow-up PRs * move the remaining load_exernal.bzl also to MODULE.bazel, but use the repo rules to fetch projects. * Upstream more tools we use to Bazel Central Registry; e.g. low hanging fruit would be to get a later version of protoc-gen-validate in there or add lineoise. * Rules python and its toolchain can probably be simplified. * fix compilation db. Issues: google#931
65b355b
to
33cdfa1
Compare
First steps towards exclusively using MODULE.bazel, for now a subset of changes already improving the state a lot.
Things for follow-up PRs:
Issues: #931