Skip to content

Conversation

@mortenmj
Copy link
Contributor

@mortenmj mortenmj commented May 9, 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.

I've added a module extension to grab rules_jsonnet, as it isn't available yet as a module, and to create the python header repository.

All tests are successful when run with --enable_bzlmod, and running jsonnet/jsonnetfmt from //cmd succeeds.

I've also made a similar PR for go-jsonnet, which depends on this bzlmod module. That PR can be found here: google/go-jsonnet#698

@mortenmj mortenmj changed the title Add rudimentary support for bzlmod Add support for bzlmod May 10, 2023
@mortenmj mortenmj changed the title Add support for bzlmod feat: Add support for bzlmod May 17, 2023
@mortenmj
Copy link
Contributor Author

@sparkprime could you review this PR?

@sparkprime sparkprime merged commit 6fc4aec into google:master May 25, 2023
@mortenmj
Copy link
Contributor Author

mortenmj commented May 26, 2023

@sparkprime looks like adding this to the Bazel Central Registry requires that the release process explicitly creates a source archive. The generated ones are not guaranteed to be stable, and cause a test failure when submitting to BCR.

https://buildkite.com/bazel/bcr-presubmit/builds/1361#018857db-81f5-4ff0-b07c-05f5587d41a3

BcrValidationResult.FAILED: jsonnet@0.20.0 is using an unstable source url: https://github.com/google/jsonnet/archive/refs/tags/v0.20.0.zip.
  | You should use a release archive URL in the format of https://github.com/<ORGANIZATION>/<REPO>/releases/download/<version>/<name>.tar.gz to ensure the archive checksum stability.
  | See https://blog.bazel.build/2023/02/15/github-archive-checksum.html for more context.

Is that something you'd be willing to take a PR to do?
The solutions I've seen to this are either a GitHub Action that does the thing, or various ways of doing it manually.

Edit: The request to add Jsonnet to BCR is here: bazelbuild/bazel-central-registry#667

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