question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad error message - Failed to load Starlark extension

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
nbeloglazovcommented, May 3, 2022

@poppywu I ended up having to update various nodejs-related rules and packages to be up-to-date.

0reactions
poppywucommented, May 3, 2022

Hi, @nbeloglazov, I got the same issue as you , did you figure that out?

Read more comments on GitHub >

github_iconTop Results From Across the Web

hey folks the HEAD is broken for rules kotlin for many folks
ERROR : Failed to load Starlark extension '@rkt_1_4//jvm:opts.bzl'. Cycle in the workspace file detected. This indicates that a repository is used prior to ......
Read more >
Tiltfile API Reference | Tilt
A complete reference of functions available in your Tiltfile.
Read more >
Rules | Bazel
A rule defines a series of actions that Bazel performs on inputs to produce a ... Rules can also be called from Starlark...
Read more >
Starlark in Go: Implementation
Starlark in Go: Implementation. This document (a work in progress) describes some of the design choices of the Go implementation of Starlark.
Read more >
Project History — PyOxidizer 0.23.0 documentation
Before, the Starlark code would emit a message like adding extension module ... in the wrong libpython being loaded and errors like ModuleNotFoundError:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found