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

Support bzlmod #153

Open
plaird opened this issue Jun 17, 2022 · 8 comments
Open

Support bzlmod #153

plaird opened this issue Jun 17, 2022 · 8 comments
Assignees

Comments

@plaird
Copy link
Contributor

plaird commented Jun 17, 2022

Starting with Bazel 5, bzlmod has been provided such that rules can surface their external dependencies. We need to support that.

https://bazel.build/docs/bzlmod

@cdickson-sum
Copy link

@plaird is this on the roadmap anytime soon?

@plaird
Copy link
Contributor Author

plaird commented May 5, 2023

@cdickson-sum I hope to get to this within a couple of months. Are you implementing bzlmod right now?

@plaird
Copy link
Contributor Author

plaird commented Nov 5, 2023

I think we have been done with this for about a year when I added the MODULE.bazel file. rules_spring doesn't have any real dependencies. The ones in the workspace are for the examples. The exception is system python3, which is used in couple of optional features (dupe classes, javax detection). I am going to ignore that.

I will do the following:

  • separate the examples into their own WORKSPACE to make it clear those deps aren't needed. will use Bazel 6.x as a demo of bazelmod too
  • add rules_spring to the central registry

@plaird plaird added the 2.4.0 label Nov 5, 2023
@plaird plaird self-assigned this Nov 5, 2023
@luangong
Copy link

luangong commented Jan 15, 2024

Hi Peter. Are there any updates? Almost all other rules have adopted bzlmod except rules_spring. Also bzlmod is enabled by default in Bazel 7. It would be great if we can compile, test, and run Spring Boot applications with Bazel and bzlmod. Thank you!

@plaird
Copy link
Contributor Author

plaird commented Jan 18, 2024

We have a large monorepo with hundreds of springboot instances, so it is taking time for us to migrate. But we are getting closer to making the switch.

What feature of rules_spring is failing for you? The dupe class and javax checkers require python, which is not listed in the module file.

@Vertexwahn
Copy link
Contributor

Does it make sense to add rules_spring (2.3.1 Jan 2024 Support for Spring Boot 3.2.0) to the Bazel Central Registry? Or is there something why it should not be added?

@luangong
Copy link

luangong commented Jan 30, 2024

Since rules_spring is already using bzlmod but not yet published to BCR, I made it work by using git_override() in MODULE.bazel:

bazel_dep(name = "rules_spring")

git_override(
    module_name = "rules_spring",
    remote = "https://github.com/salesforce/rules_spring",
    commit = "1854fbca3c9d6e704dffaeb6f2f70b0476882acb", # v2.3.1
)

What feature of rules_spring is failing for you? The dupe class and javax checkers require python, which is not listed in the module file.

If someone wants to use the dupe class and javax checkers, he/she may need to add the patches attribute to git_override() to patch MOUDLE.bazel and reference the Python toolchain, or wait for the team to fix MODULE.bazel.

@Vertexwahn
Copy link
Contributor

Created a PR to add rules_spring 2.3.2 to Bzlmod: bazelbuild/bazel-central-registry#1854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants