-
Notifications
You must be signed in to change notification settings - Fork 316
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
Fix things after bzlmod migration #5888
Conversation
# Conflicts: # MODULE.bazel # MODULE.bazel.lock # WORKSPACE.bzlmod # aspect/testing/tests/src/com/google/idea/blaze/aspect/java/pluginprocessorjars/BazelPluginProcessorJarTest.java # aspect/tools/BUILD # ext/proto/BUILD # intellij_platform_sdk/BUILD # maven_install.json # querysync/javatests/com/google/idea/blaze/qsync/BUILD # querysync/javatests/com/google/idea/blaze/qsync/testdata/grpc/BUILD
bazel-contrib/rules_jvm_external#1016 the problem with grpc-java dependency names seems to have been fixed now, so I can revert that part if you consider it problematic @mai93 |
Yes, I think it will be better if we removed the extra files: For |
Unfortunately as I mentioned in Slack it turned out that grpc-java dependency names are still incompatible with names used in this repository. So we have to either
|
@Wyverald we are trying to migrate the plugin to use bzlmod and we have a problem with the lock file. the plugin has a dependency on rules_go which adds an entry in the lock file that is specific to the architecture on which it is created, this causes a problem when the plugin is built on a different OS/architecture. Is there a way around this? @tpasternak for more details |
What is the problem? If you use the latest rules_go, then the lockfile would contain different sections for rules_go depending on which platform you're building on. You'd need to update the lockfile from each of those different platforms, but ultimately they shouldn't step on each other's toes. cc @SalmaSamy |
@mai93 As @Wyverald mentioned the lockfile should handle this you just have to make sure:
Basically, using the latest in both should result in a lockfile with sections for each platform like the example here |
@tpasternak FYI, the response from bazel team about bzlmod lock file question |
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.
Some loose thoughts:
- I'm getting this warning when trying to build the project:
DEBUG: /home/t/.cache/bazel/_bazel_t/9f891cf4952c58dbb7dca5b940b19431/external/rules_jvm_external~override/private/extensions/maven.bzl:139:14: The maven repository 'maven' is used in two different bazel modules, originally in '' and now in 'protobuf'
- I'm still getting some modifications to MODULE.bazel after build, like this one:
"@@bazel_tools//tools/cpp:cc_configure.bzl%cc_configure_extension": {
"general": {
- "bzlTransitiveDigest": "O9sf6ilKWU9Veed02jG9o2HM/xgV/UAyciuFBuxrFRY=",
+ "bzlTransitiveDigest": "mcsWHq3xORJexV5/4eCvNOLxFOQKV6eli3fkr+tEaqE=",
"accumulatedFileDigests": {},
"envVariables": {},
"generatedRepoSpecs": {
@@ -1894,7 +1903,14 @@
"name": "bazel_tools~cc_configure_extension~local_config_cc_toolchains"
}
}
- }
+ },
+ "recordedRepoMappingEntries": [
+ [
+ "bazel_tools",
+ "bazel_tools",
+ "bazel_tools"
+ ]
+ ]
}
},
-
I'm not sure what was the conclusion from the last meeting/chats, but we've been talking about keeping rules_go in as a non-bzlmod dep
-
Same for grpc - this might be quite hard to maintain, so personally I would prefer to keep in the WORKSPACE def, too, but it's not a strong opinion, current is also ok.
# Conflicts: # .bazelrc # base/tests/unittests/com/google/idea/blaze/base/qsync/DependencyTrackerImplTest.java # querysync/javatests/com/google/idea/blaze/qsync/testdata/TestData.java
MODULE.bazel
Outdated
bazel_binaries, | ||
"bazel_binaries", | ||
"bazel_binaries_bazelisk", | ||
"build_bazel_bazel_4_2_4", |
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 think the test for version 4.2.4 is missing: https://buildkite.com/bazel/intellij-plugin-aspect/builds/21280#018dd20e-4bca-481d-8d9b-060f884523f5.
We actually need to test with a version before 6 and a version after it because based on that we change the label of the aspect repo in the sync invocation.
I addressed the comments I had and manually tested it. I will merge it tomorrow if no one has a problem. |
Thanks @mai93! Sorry for not handling it, I don't work on Mondays and Tuesdays |
Second attempt at bzlmod migration. This time there's almost no naming changes and I verified that it works in IntelliJ 2023.3 on Linux.
Fixes #5432.
TODO:
com.google.idea.blaze.base.qsync.DependencyTrackerImplTest.getPendingExternalDeps_followJavaDeps_allBuilt(DependencyTrackerImplTest.java:201)