-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add gazelle plugin to CI and distribution mechanism #424
Conversation
We now have 3 versions: the tarball version (version.bzl), the skylib module version (MODULE.bazel), and the gazelle plugin module version (gazelle/MODULE.bazel)
…ilegroup for all tarballs
Note: as a followup, I will try to see if we can clean up distro BUILD files to not include distro-only targets. I think this is feasible by updating to a newer version of rules_pkg, but the change is big enough that it would be best done as a separate followup PR. |
This LGTM. Obviously gotta fixup CI but conceptually this seems like the right direction. Thanks @tetromino! |
Needed to allow building/testing gazelle plugin from bazelci and generating release tarballs when in bzlmod mode. Note that the local_path_override will be stripped out in the tarball release, so users of stable skylib releases will not be affected. Users of a live/unreleased version of skylib who depend on it via git_override will need to add a patch to remove or comment out the local_path_override. I expect the number of such users to be tiny, but I have added a comment in MODULE.bazel to guide them.
Needed to cleanly strip ./external/bazel_skylib_gazelle_plugin~* dir prefixes in the tarball. Also allows us to clean up fixed target name vs. versioned tarball file name without needing aliases. Note that we are using 0.7.0 since 0.8.0 is not yet in BCR.
Provide a patch file that users can use in their git_override
This module also needs to be added to the Bazel Central Registry in order to use it - @tetromino is that on your list? Want a PR for it? |
@alexeagle - yes, it's my next todo; I just need to generate the tarball |
I guess it's a wider discussion, but I think we could chat about distribution of the entire repo instead, it's tremendously simpler. |
After #400, the gazelle plugin has been cleanly separated out into its own bazel workspace, which will soon finally allow us to mark it stable. But this means:
bazel build //...
no longer includes the plugin;