-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
bazel --keep_going
exits successfully when encountering starlark errors in package loading
#7674
Comments
Due to bazelbuild/bazel#7674, -k will miss package loading errors.
Due to bazelbuild/bazel#7674, -k will miss package loading errors.
It sounds like the right solution is that blaze should return non-zero if there were errors, regardless of them being package loading related or not. |
We pushed a bad commit to rules_typescript yesterday because of this issue. |
b8ac792 probably fixed this. i believe 0.23.0 was the first bazel release that contained that commit. can anyone complaining about this issue please try again with that bazel release (or a newer one)? i tried with the original repro instructions but was getting errors due to incompatibilities between bazel 0.23.0 and kythe @ c3919636ac995d78ceeef09b1e5b84d287b097c8. |
This is still an issue in 0.24.0. You can repro by attempting to reference any undefined variable in a loaded |
@haxorz It seems like @sergiocampama encountered this in rules_apple again. I'm copying his internal bug report (b/133148805) here:
|
I wonder how many projects in BuildKite may be silently broken (rules_apple definitely is) |
i or someone else will fix this (, probably internally). assigning to myself for tracking purposes. |
bazel --keep_going
exits successfully when encountering package load errorsbazel --keep_going
exits successfully when encountering starlark errors in package loading
When loading all packages under a directory (//foo/...) we use RecursivePkgFunction, which in --keep_going mode was silently ignoring any NoSuchPackageExceptions thrown by PackageFunction. Critically, any exceptions thrown by loading a Starlark .bzl file were being ignored during loading. RecursivePkgFunction now transitively collects presence of errors into the RecursivePkgValue so callers (EnvironmentBackedRecursivePackageProvider) can observe and record that errors happened during loading. Fixes bazelbuild#7674. RELNOTES: None. PiperOrigin-RevId: 251298005
When loading all packages under a directory (//foo/...) we use RecursivePkgFunction, which in --keep_going mode was silently ignoring any NoSuchPackageExceptions thrown by PackageFunction. Critically, any exceptions thrown by loading a Starlark .bzl file were being ignored during loading. RecursivePkgFunction now transitively collects presence of errors into the RecursivePkgValue so callers (EnvironmentBackedRecursivePackageProvider) can observe and record that errors happened during loading. Fixes bazelbuild#7674. RELNOTES: None. PiperOrigin-RevId: 251298005
Description of the problem / feature request:
Bazel will return successfully from a
build
ortest
run that includes package load errors when given--keep_going
.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
Linux
What's the output of
bazel info release
?release 0.20.0
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?https://github.com/kythe/kythe.git
c3919636ac995d78ceeef09b1e5b84d287b097c8
c3919636ac995d78ceeef09b1e5b84d287b097c8
The text was updated successfully, but these errors were encountered: