Skip to content

feat: Add support for bzlmod#698

Merged
sparkprime merged 5 commits intogoogle:masterfrom
mortenmj:bzlmod
Jun 13, 2023
Merged

feat: Add support for bzlmod#698
sparkprime merged 5 commits intogoogle:masterfrom
mortenmj:bzlmod

Conversation

@mortenmj
Copy link
Copy Markdown
Contributor

@mortenmj mortenmj commented May 10, 2023

This PR adds a MODULE.bazel file which allows other repositories to import this one as a bzlmod module.
I don't know how Google handles publishing to the Bazel Central Registry, so I haven't made any attempt at that.

This is ready for review, but not for merging, pending google/jsonnet#1083 which adds bzlmod support for jsonnet. Jsonnet would need to be added to the Bazel Central Registry for this PR to be merged, as bzlmod does not allow importing modules that use overrides (such as git_override used here).

Update: Jsonnet has been merged into BCR, so this can move forward.

@mortenmj mortenmj changed the title Add support for bzlmod feat: Add support for bzlmod May 17, 2023
Comment thread MODULE.bazel Outdated
module_name = "jsonnet",
remote = "https://github.com/mortenmj/jsonnet.git",
commit = "df811822d9a31cb3fab9bdf68679ad300f1c12ed",
)
Copy link
Copy Markdown
Contributor Author

@mortenmj mortenmj May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be updated once google/jsonnet#1083 lands, and jsonnet is added to the Bazel Central Registry. This PR is not ready to be merged before that happens.

@coveralls
Copy link
Copy Markdown

coveralls commented May 25, 2023

Coverage Status

coverage: 68.493% (-0.02%) from 68.512% when pulling f237f4d on mortenmj:bzlmod into 868d9c6 on google:master.

@sparkprime
Copy link
Copy Markdown
Contributor

LGTM

@sparkprime
Copy link
Copy Markdown
Contributor

Is there any documentation that needs to be updated in either repo?

@sparkprime
Copy link
Copy Markdown
Contributor

(Either for people using this or maintaining it)

@mortenmj
Copy link
Copy Markdown
Contributor Author

mortenmj commented May 26, 2023

@sparkprime I am not aware of any documentation that goes into how to import jsonnet/go-jsonnet into a WORKSPACE, but I'd suggest adding similar documentation for using MODULE.bazel.

I think it could be a good idea to add a test that shows how this works. This could then also be used in the BCR presubmit.yml, which would add some confidence that we don't break things in the future. Here's an example of what that might look like:
https://github.com/protocolbuffers/protobuf/tree/main/examples
https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/protobuf/3.19.6/presubmit.yml

@mortenmj
Copy link
Copy Markdown
Contributor Author

mortenmj commented Jun 6, 2023

@sparkprime could we merge this?

@sparkprime sparkprime merged commit 1096691 into google:master Jun 13, 2023
vhata pushed a commit to discord/go-jsonnet that referenced this pull request Aug 30, 2024
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.

3 participants