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

Fail on inapplicable flags on non-common commands expanded from configs #23105

Closed
wants to merge 5 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Jul 25, 2024

This regressed in 44d3953.

Fixes #22980

@fmeum fmeum changed the title Restore failing on inapplicable flags on non-common commands expanded from configs Fail on inapplicable flags on non-common commands expanded from configs Jul 25, 2024
@fmeum fmeum requested a review from justinhorvitz July 25, 2024 10:43
@fmeum fmeum marked this pull request as ready for review July 25, 2024 10:43
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Jul 25, 2024
if (!args.isEmpty() && args.get(0).startsWith("@")) {
public List<ArgAndFallbackData> preProcess(List<ArgAndFallbackData> args)
throws OptionsParsingException {
if (!args.isEmpty() && args.getFirst().arg.startsWith("@")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you can use getFirst() in this file given the java 11 thing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This actually doesn't break CI since the bootclasspath is determined by the Java runtime version, not the language level. But it would break the consumers that legitimately build with a JDK 11, so good catch on your part.

@cushon @hvadehra Since this is coming up in Bazel code, what do you think of reinvigorating bazelbuild/rules_java#182?

Copy link
Contributor

Choose a reason for hiding this comment

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

I won't take credit, a breakage popped up when I imported.

@fmeum fmeum requested a review from justinhorvitz July 25, 2024 16:25
@fmeum
Copy link
Collaborator Author

fmeum commented Jul 25, 2024

@bazel-io fork 7.3.0

@iancha1992 iancha1992 added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jul 25, 2024
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jul 29, 2024
@fmeum fmeum deleted the 22980-options-parsing branch July 29, 2024 18:52
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jul 29, 2024
This regressed in bazelbuild@44d3953.

Fixes bazelbuild#22980

Closes bazelbuild#23105.

PiperOrigin-RevId: 657276908
Change-Id: If2e88455a344082bfbec405c30c148c0d044adb6
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Aug 19, 2024
This regressed in bazelbuild@44d3953.

Fixes bazelbuild#22980

Closes bazelbuild#23105.

PiperOrigin-RevId: 657276908
Change-Id: If2e88455a344082bfbec405c30c148c0d044adb6
github-merge-queue bot pushed a commit that referenced this pull request Sep 19, 2024
…om configs (#23340)

This regressed in
44d3953.

Fixes #22980

Closes #23105.

PiperOrigin-RevId: 657276908
Change-Id: If2e88455a344082bfbec405c30c148c0d044adb6

Commit
9fbf427

Co-authored-by: Fabian Meumertzheim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flags out of scope for the command are ignored via --config
3 participants