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

Unrecognized build option errors when trying to use @io_bazel_rules_go//go/config:strip #3325

Closed
aw185176 opened this issue Oct 18, 2022 · 4 comments · Fixed by #3527
Closed

Comments

@aw185176
Copy link

What version of rules_go are you using?

0.35.0

What version of gazelle are you using?

0.26.0

What version of Bazel are you using?

5.3.1

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

Linux x86-64

Any other potentially useful information about your toolchain?

What did you do?

❯ bazel build //... --@io_bazel_rules_go//go/config:strip
INFO: Invocation ID: 548294b5-5b52-465c-ad99-b6361c85c0af
INFO: Invocation ID: 548294b5-5b52-465c-ad99-b6361c85c0af
ERROR: Unrecognized option: @io_bazel_rules_go//go/config:strip=true

What did you expect to see?

What did you see instead?

Unrecognized option error. Other options appear to work that are documented

@fmeum
Copy link
Member

fmeum commented Oct 18, 2022

It's a bool_setting rather than a bool_flag, which explains the error. As to why it is I'm not sure.

@jayconrod I think this line hasn't changed since the switch to transitions. Could you provide insight into the decision not to expose this setting to users?

@aw185176
Copy link
Author

Based on the wording in the docs, I would guess that it is probably an oversight: https://github.com/bazelbuild/rules_go/blob/master/go/modes.rst#build-settings

@malt3
Copy link
Contributor

malt3 commented May 2, 2023

Very gentle reminder that this is open and has two possible resolutions ready as PRs: #3526, #3527.
I think what is needed here is for someone more familiar with the project (maybe @jayconrod) to decide what the expected behavior should be:

  1. Respect global bazel strip setting
  2. Have strip setting only for rules_go
  3. A combination of the above
  4. Something else entirely

I would be happy to implement a fix for whatever the intended behavior is.

@fmeum
Copy link
Member

fmeum commented May 2, 2023

@malt3 Sorry for the delay, I haven't forgotten about the PRs and will take another look soon. What's difficult about this is considering user expectations and potential implications for backwards compatibility, including with the usual Go toolchain.

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 a pull request may close this issue.

3 participants