bazel: Bad error message - Failed to load Starlark extension
Reported by @dhalperi (https://github.com/bazelbuild/bazel/issues/5636#issuecomment-474544205)
@laurentlb - is there any good debugging advice for how to fix/debug related issues in generated code?
I’m trying to make https://github.com/pubref/rules_maven work with this flag. Fix 2 in the original comment worked for the bzl files that are there. But I can’t figure out how to debug issues in generated files – I just get warnings about cycles in the graph – and it seems bazel doesn’t materialize the generated files somewhere I can look at them (and mutate them).
E.g., in https://github.com/batfish/batfish @ master using bazel from yesterday HEAD,
$ bazel build //... --incompatible_no_transitive_loads=true INFO: Invocation ID: 0a92899e-0907-4642-877e-ae1644a13cf9 ERROR: Failed to load Starlark extension '@antlr4_runtime//:rules.bzl'. It usually happens when the repository is not defined prior to being used. This could either mean you have to add the 'antlr4_runtime' repository with a statement like `http_archive` in your WORKSPACE file (note that transitive dependencies are not added automatically), or the repository 'antlr4_runtime' was defined too late in your WORKSPACE file. ERROR: cycles detected during target parsing INFO: Elapsed time: 0.084s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded) Fetching @antlr4_runtime; Restarting.
but no files are materialized (and the bazel-foo symlinks aren’t even created) for me to look at.
The error message is bad, but I don’t think it’s related to the specific flag. I’m filing a separate issue, hoping that someone else can look at this.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (14 by maintainers)
@poppywu I ended up having to update various nodejs-related rules and packages to be up-to-date.