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

Respect Starlark options with values in removeStarlarkOptions() #5

Merged
merged 1 commit into from
Dec 8, 2020
Merged

Conversation

trustin
Copy link

@trustin trustin commented Dec 7, 2020

Related: bazelbuild#11301
(Partially fixed in bazelbuild@2ec58f6)

Motivation:

StarlarkOptionsParser.removeStarlarkOptions() doesn't take the case
into account where the specified Starlark option has a value, e.g.
--//my_rules/custom_flags:foo=bar.

Modifications:

  • Do not pass a Starlark flag value when validating the flag name.

Result:

bazel info does not fail anymore when .bazelrc contains a statement
like the following:

build --//my_rules/custom_flags:foo=bar

Related: bazelbuild#11301
(Fixed in bazelbuild@2ec58f6)

Motivation:

`StarlarkOptionsParser.removeStarlarkOptions()` doesn't take the case
into account where the specified Starlark option has a value, e.g.
`--//my_rules/custom_flags:foo=bar`.

Modifications:

- Do not pass a Starlark flag value when validating the flag name.

Result:

`bazel info` does not fail anymore when `.bazelrc` contains a statement
like the following:

    build --//my_rules/custom_flags:foo=bar
@trustin
Copy link
Author

trustin commented Dec 7, 2020

Upstream PR: bazelbuild#12648

Copy link
Collaborator

@apattidb apattidb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a small comment with an edge case. Please, check if it can be addressed, otherwise LGTM.

@apattidb apattidb merged commit e130ab0 into databricks:databricks-bazel-3.2.0 Dec 8, 2020
@trustin trustin deleted the fix_compile_error branch December 8, 2020 13:35
@trustin
Copy link
Author

trustin commented Dec 8, 2020

Thanks, @apattidb 🙇

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 this pull request may close these issues.

2 participants