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

bazel help flags-as-proto incorrectly reports has_negative: false for --experimental_convenience_symlinks and --subcommands #24882

Closed
tempoz opened this issue Jan 9, 2025 · 2 comments

Comments

@tempoz
Copy link

tempoz commented Jan 9, 2025

Description of the bug:

bazel help flags-as-proto incorrectly reports has_negative: false for --experimental_convenience_symlinks and --subcommands.

Which category does this issue belong to?

CLI

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

wget https://raw.githubusercontent.com/bazelbuild/bazel/refs/tags/8.0.0/src/main/protobuf/bazel_flags.proto
bazel help flags-as-proto | tail -1 | base64 --decode | protoc --decode bazel_flags.FlagCollection bazel_flags.proto

outputs:

[ other options... ]

flag_infos {
  name: "experimental_convenience_symlinks"
  has_negative_flag: false
  documentation: "This flag controls how the convenience symlinks (the symlinks that appear in the workspace after the build) will be managed. Possible values:\n  normal (default): Each kind of convenience symlink will be created or deleted, as determined by the build.\n  clean: All symlinks will be unconditionally deleted.\n  ignore: Symlinks will not be created or cleaned up.\n  log_only: Generate log messages as if \'normal\' were passed, but don\'t actually performany filesystem operations (useful for tools).\nNote that only symlinks whose names are generated by the current value of --symlink_prefix can be affected; if the prefix changes, any pre-existing symlinks will be left alone."
  commands: "aquery"
  commands: "build"
  commands: "canonicalize-flags"
  commands: "clean"
  commands: "config"
  commands: "coverage"
  commands: "cquery"
  commands: "fetch"
  commands: "info"
  commands: "mobile-install"
  commands: "print_action"
  commands: "run"
  commands: "test"
  commands: "vendor"
  allows_multiple: false
  effect_tags: "AFFECTS_OUTPUTS"
  documentation_category: "OUTPUT_PARAMETERS"
  requires_value: false
}

[ other options... ]

flag_infos {
  name: "subcommands"
  has_negative_flag: false
  documentation: "Display the subcommands executed during a build. Related flags: --execution_log_json_file, --execution_log_binary_file (for logging subcommands to a file in a tool-friendly format)."
  commands: "aquery"
  commands: "build"
  commands: "canonicalize-flags"
  commands: "clean"
  commands: "config"
  commands: "coverage"
  commands: "cquery"
  commands: "fetch"
  commands: "info"
  commands: "mobile-install"
  commands: "print_action"
  commands: "run"
  commands: "test"
  commands: "vendor"
  abbreviation: "s"
  allows_multiple: false
  effect_tags: "TERMINAL_OUTPUT"
  documentation_category: "LOGGING"
  requires_value: false
}

[ other options... ]

This contradicts the bazel documentation here:

--[no]experimental_convenience_symlinks default: "normal"
This flag controls how the convenience symlinks (the symlinks that appear in the workspace after the build) will be managed. Possible values: normal (default): Each kind of convenience symlink will be created or deleted, as determined by the build. clean: All symlinks will be unconditionally deleted. ignore: Symlinks will not be created or cleaned up. log_only: Generate log messages as if 'normal' were passed, but don't actually perform any filesystem operations (useful for tools). Note that only symlinks whose names are generated by the current value of --symlink_prefix can be affected; if the prefix changes, any pre-existing symlinks will be left alone.
Tags: affects_outputs

and here:

--[no]subcommands [-s] default: "false"
Display the subcommands executed during a build. Related flags: --execution_log_json_file, --execution_log_binary_file (for logging subcommands to a file in a tool-friendly format).
Tags: terminal_output

, respectively.

Which operating system are you running Bazel on?

Debian trixie

What is the output of bazel info release?

release 8.0.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

I don't think there's anything that searching the web can help with here.

Any other information, logs, or outputs that you want to share?

No response

@iancha1992 iancha1992 added the team-CLI Console UI label Jan 9, 2025
bazel-io pushed a commit to bazel-io/bazel that referenced this issue Jan 13, 2025
Fixes bazelbuild#24882

Closes bazelbuild#24883.

PiperOrigin-RevId: 714854122
Change-Id: I5e48e84f88606320223a9969e8367924aeeb13dd
bazel-io pushed a commit to bazel-io/bazel that referenced this issue Jan 13, 2025
Fixes bazelbuild#24882

Closes bazelbuild#24883.

PiperOrigin-RevId: 714854122
Change-Id: I5e48e84f88606320223a9969e8367924aeeb13dd
github-merge-queue bot pushed a commit that referenced this issue Jan 13, 2025
…...` (#24909)

Fixes #24882

Closes #24883.

PiperOrigin-RevId: 714854122
Change-Id: I5e48e84f88606320223a9969e8367924aeeb13dd

Commit
6423b04

Co-authored-by: Fabian Meumertzheim <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Jan 13, 2025
…...` (#24908)

Fixes #24882

Closes #24883.

PiperOrigin-RevId: 714854122
Change-Id: I5e48e84f88606320223a9969e8367924aeeb13dd

Commit
6423b04

Co-authored-by: Fabian Meumertzheim <[email protected]>
fmeum added a commit to fmeum/bazel that referenced this issue Jan 14, 2025
Fixes bazelbuild#24882

Closes bazelbuild#24883.

PiperOrigin-RevId: 714854122
Change-Id: I5e48e84f88606320223a9969e8367924aeeb13dd
@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 8.0.1 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=8.0.1rc1. Thanks!

@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 7.5.0 RC2. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=7.5.0rc2. Thanks!

fmeum added a commit to fmeum/bazel that referenced this issue Jan 29, 2025
Fixes bazelbuild#24882

Closes bazelbuild#24883.

PiperOrigin-RevId: 714854122
Change-Id: I5e48e84f88606320223a9969e8367924aeeb13dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants