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

[Bug]: //tools:add_module doesn't tell me how to expose all build targets #1857

Open
pjh opened this issue Apr 22, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@pjh
Copy link

pjh commented Apr 22, 2024

What happened?

I'm trying to follow https://github.com/bazelbuild/bazel-central-registry/tree/main/docs#contribute-a-bazel-module. The interactive helper script is prompting me:

ACTION: Please enter a list of build targets you want to expose to downstream users, separated by `,`:

I just want to expose the module with all of its build targets. How do I do that? Can I just press enter here? Or enter //* or //...? Or do I need to go to the dependency's repo and run bazel query //... | tr '\n' ',' and paste the results into this prompt?

I can do any of those things, but I wish the helper script would tell me which one.

Version

Output of bazel --version: bazel-7.0.2

How to reproduce

$ bazel run //tools:add_module
Starting local Bazel server and connecting to it...
INFO: Analyzed target //tools:add_module (86 packages loaded, 3095 targets configured).
INFO: Found 1 target...
Target //tools:add_module up-to-date:
  bazel-bin/tools/add_module
INFO: Elapsed time: 19.415s, Critical Path: 0.57s
INFO: 5 processes: 5 internal.
INFO: Build completed successfully, 5 total actions
INFO: Running command line: bazel-bin/tools/add_module
INFO: Getting module information from user input...
ACTION: Please enter the module name: nsync
ACTION: Please enter the module version: 1.27.0
ACTION: Please enter the compatibility level [default is 0]:
ACTION: Please enter the URL of the source archive: https://github.com/google/nsync/archive/refs/tags/1.27.0.tar.gz
ACTION: Please enter the strip_prefix value of the archive [default None]: nsync-1.27.0
ACTION: Do you want to add patch files? [y/N]:
ACTION: Do you want to add a BUILD file? [y/N]:
ACTION: Do you want to specify a MODULE.bazel file? [y/N]:
ACTION: Do you want to specify dependencies for this module? [y/N]:
ACTION: Do you want to specify an existing presubmit.yml file? (See https://github.com/bazelbuild/bazel-central-registry/tree/main/docs#presubmit) [y/N]:
ACTION: Please enter a list of build targets you want to expose to downstream users, separated by `,`:

Any other information?

No response

@pjh pjh added the bug Something isn't working label Apr 22, 2024
@fzakaria
Copy link

from what I see in the source, the build targets is only useful for the presubmit.yml; it doesn't control any "exposing"; I think the question in the prompt is worded poorly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants