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 --keep_going to bazel mod #23828

Closed
wants to merge 3 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Oct 1, 2024

RELNOTES: bazel mod now skips over extensions that failed to evaluate when used with --keep_going.

@github-actions github-actions bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Oct 1, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Nov 4, 2024

@bazel-io fork 8.0.0

Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

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

Thanks a lot!!

@meteorcloudy meteorcloudy added 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 Nov 4, 2024
Copy link
Member

@Wyverald Wyverald left a comment

Choose a reason for hiding this comment

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

the change overall LGTM. I'm just wondering if we need to check for --keep_going at all. While digging through the code, I found that SkyframeExecutor.prepareAndGet which is used by ModCommand actually always sets "keep going" to true. This makes me wonder if there's ever a case where we don't want to "keep going". WDYT?

src/test/py/bazel/bzlmod/mod_command_test.py Show resolved Hide resolved
@fmeum fmeum force-pushed the bazel-mod-keep-going branch 3 times, most recently from 8d7417e to 4cbbc54 Compare November 6, 2024 12:24
@fmeum fmeum force-pushed the bazel-mod-keep-going branch from b82387e to 4cbbc54 Compare November 6, 2024 13:15
@fmeum fmeum force-pushed the bazel-mod-keep-going branch from 4cbbc54 to a2e0597 Compare November 6, 2024 13:20
Copy link
Member

@Wyverald Wyverald left a comment

Choose a reason for hiding this comment

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

thanks, this looks great! just one last question.

@@ -194,6 +193,7 @@ private BlazeCommandResult execInternal(CommandEnvironment env, OptionsParsingRe
EvaluationContext.newBuilder()
.setParallelism(threadsOption.threads)
.setEventHandler(env.getReporter())
.setKeepGoing(options.getOptions(KeepGoingOption.class).keepGoing)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should just set this to true unconditionally. After all, it's been the case so far, and IMO for an informational subcommand like bazel mod, most people would want to set --keep_going as a default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

While it's technically been enabled so far, I don't think that it had any effect in practice since the relevant SkyFunctions are not catching errors. But I still agree that bazel mod commands should probably keep going by default. I've also implemented this for bazel mod tidy.

@fmeum fmeum requested a review from Wyverald November 6, 2024 20:56
@fmeum fmeum force-pushed the bazel-mod-keep-going branch from fb6b76c to 4a69c89 Compare November 6, 2024 22:21
@copybara-service copybara-service bot closed this in a0471c7 Nov 8, 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 Nov 8, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Nov 8, 2024
RELNOTES: `bazel mod` now tries to evaluate all module extensions, even when some have failed to evaluate.

Closes bazelbuild#23828.

PiperOrigin-RevId: 694448503
Change-Id: I1e4f7a36384c7dfdc16d13cdfcd0b4b3aeb41834
github-merge-queue bot pushed a commit that referenced this pull request Nov 11, 2024
RELNOTES: `bazel mod` now tries to evaluate all module extensions, even
when some have failed to evaluate.

Closes #23828.

PiperOrigin-RevId: 694448503
Change-Id: I1e4f7a36384c7dfdc16d13cdfcd0b4b3aeb41834

Commit
a0471c7

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@fmeum fmeum deleted the bazel-mod-keep-going branch November 18, 2024 07:59
ramil-bitrise pushed a commit to bitrise-io/bazel that referenced this pull request Dec 18, 2024
RELNOTES: `bazel mod` now tries to evaluate all module extensions, even when some have failed to evaluate.

Closes bazelbuild#23828.

PiperOrigin-RevId: 694448503
Change-Id: I1e4f7a36384c7dfdc16d13cdfcd0b4b3aeb41834
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants