Skip to content
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

Use maven lock-file #1134

Merged
merged 5 commits into from
Mar 19, 2024
Merged

Use maven lock-file #1134

merged 5 commits into from
Mar 19, 2024

Conversation

scaiper
Copy link
Contributor

@scaiper scaiper commented Mar 15, 2024

This PR enables use of a lock-file for kotlin_rules_maven repo. This in turn enables caching and reproducible builds.
Had to bump rules_jvm_external to 6.0 and some of its transitive deps.

@scaiper
Copy link
Contributor Author

scaiper commented Mar 15, 2024

Not sure where this error comes from in the failed check. Seems unrelated.

ERROR: https://bcr.bazel.build/modules/rules_jvm_external/6.0/MODULE.bazel:65:13: name 'use_repo_rule' is not defined

MODULE.bazel Outdated Show resolved Hide resolved
@Bencodes
Copy link
Collaborator

Not sure where this error comes from in the failed check. Seems unrelated.

ERROR: https://bcr.bazel.build/modules/rules_jvm_external/6.0/MODULE.bazel:65:13: name 'use_repo_rule' is not defined

You might need to downgrade rules_jvm_external and file an issue upstream for this one.

@scaiper
Copy link
Contributor Author

scaiper commented Mar 15, 2024

Not sure where this error comes from in the failed check. Seems unrelated.

ERROR: https://bcr.bazel.build/modules/rules_jvm_external/6.0/MODULE.bazel:65:13: name 'use_repo_rule' is not defined

You might need to downgrade rules_jvm_external and file an issue upstream for this one.

I'm not sure what to report. I guess use_repo_rule was not available in bazel 6.4.0, which is used in this one test.

@scaiper
Copy link
Contributor Author

scaiper commented Mar 15, 2024

Indeed, use_repo_rule is a 7.x feature. So questing is, is support of 6.x bazel important or it could be dropped?
If 6.x support is desirable, I quess I should try to make it work without bumping the versions.

@Bencodes
Copy link
Collaborator

@scaiper can your rebase this branch? I bumped the rules Bazel version to 7.1.0 to see if that helps with compat.

@scaiper
Copy link
Contributor Author

scaiper commented Mar 15, 2024

Version 7.0.2 is fine. Problem is with this test https://buildkite.com/bazel/rules-kotlin-kotlin/builds/4060#018e4350-c427-4f5d-a54f-4a7ef3c694b1
Example - Android using Bazel 6.x on :ubuntu: Ubuntu 18.04 LTS (OpenJDK 11, gcc 7.5.0)

:docker: Pulling gcr.io/bazel-public/ubuntu1804-java11
:docker: Running command in gcr.io/bazel-public/ubuntu1804-java11
:bazel: Using Bazel version 6.4.0
bazel info output_base
2024/03/15 18:12:57 Downloading https://releases.bazel.build/6.4.0/release/bazel-6.4.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ℹ️ Bazel Info

@Bencodes
Copy link
Collaborator

So questing is, is support of 6.x bazel important or it could be dropped?

At the moment we try to keep compatibility with 5.x, 6.x, and 7.x https://github.com/bazelbuild/rules_kotlin?tab=readme-ov-file#rules_kotlin-bazel-compatibility

Something that's odd is this example test shouldn't even be using Bzlmod https://github.com/bazelbuild/rules_kotlin/blob/be6fb59f169ac6e1dcbf395c325462343a68214b/.bazelci/presubmit.yml#L59C3-L67

@scaiper
Copy link
Contributor Author

scaiper commented Mar 15, 2024

Shouldn't the flag --enable_bzlmod=false also be specified in the build_flags?

@scaiper
Copy link
Contributor Author

scaiper commented Mar 19, 2024

It's bazel info command that failed, apparently it also needs the --enable_bzlmod=false flag.

I've managed to make it work using current versions of dependencies, so I've reverted version bump.

@scaiper scaiper changed the title Use maven lock-file and bump rules_jvm_external to 6.0 Use maven lock-file Mar 19, 2024
@scaiper scaiper requested a review from Bencodes March 19, 2024 11:59
@Bencodes Bencodes merged commit 14ea5f1 into bazelbuild:master Mar 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants