salesforce-misc / bazelrc-lsp

bazelrc Language Server
Apache License 2.0
17 stars 1 forks source link

Wrong deprecation notice for --watchfs #2

Open sluongng opened 1 month ago

sluongng commented 1 month ago

I have a .bazelrc file with

common --watchfs

and the lsp server wrongly flagged it as deprecated.

Only the startup flag should be deprecated while the build flag isn't

vogelsgesang commented 4 weeks ago

Unfortunately, this is a bug in Bazel itself. In emitFlagsAsProtoHelp, Bazel uses a HashMap indexed by the flag-name to store information about all flags.

The two flags by the name of watchfs (the startup flag and the build flag), are deduplicated into a single flag by this logic. Due to this, the dump returned by bazel help flags-as-proto contains only the deprecated startup flag, and the build flag is missing from this dump