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

Add support for user-defined build settings in external repositories #10975

Closed
chsigg opened this issue Mar 17, 2020 · 2 comments
Closed

Add support for user-defined build settings in external repositories #10975

chsigg opened this issue Mar 17, 2020 · 2 comments

Comments

@chsigg
Copy link

chsigg commented Mar 17, 2020

When trying it all out, --//:myflag=foo works, but --@rules_my_language//:myflag=foo does not. I've tried to make an alias and then go for the first alternative, but that fails as well with ERROR: Unrecognized option: //:myflag.

Is it a design choice to not allow command line flags from external dependencies? Is a bug so I should file a bug report? Is it a feature request to allow it in v2, possibly via the WORKSPACE file?

Originally posted by @moroten in #5577 (comment)

@moroten
Copy link
Contributor

moroten commented Mar 19, 2020

My example in #10499 exercises both --//:myflag=foo and --@rules_my_language//:myflag=foo. Which Bazel version are you using?

The problem in #10499 is that @rules_my_language//:myflag and //:myflag are not mapped to the same instance, so you end up in errors you would not expect. As a workaround, I do never define any build setting in the root workspace.

@chsigg
Copy link
Author

chsigg commented Mar 20, 2020

That's wonderful, thanks for the info. Indeed, I got tripped by trying this out in the root workspace. When referencing from another repo, it works as expected. That is the actual use case for me. Closing.

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

No branches or pull requests

2 participants