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.

Implement "Locating runfiles with Bzlmod" proposal

See original GitHub issue

The “Locating runfiles with Bzlmod” proposal consists of the following individual steps:

Status of runfiles libraries in third-party rulesets:

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
lberkicommented, Oct 7, 2022

The most likely future seems to be that we’ll standardize on Python imports not containing the repository name, in which case bzlmod is a no-op.

It’s not an optimal solution because it requires an entry in $PYTHONPATH for each repository in the transitive closure of the Python binary, but it’s the status quo and I’d much prefer thinking up a solution to that (e.g. binary-specific symlink trees that do not look like runfiles trees, dunno) than to standardize on having the repository names in imports because the concept of “repository” is specific to Bazel.

Put differently: the only way for bzlmod to cause trouble for Python is if we decide to require repository names in imports, which seems to be unlikely and it looks like the decision on that will take a while and I prefer not blocking either Bazel 6.0 or the removal of bzlmod from the experimental domain to avoid an unlikely failure mode. And should that happen, we can always paper over it with some sort of import hook.

/cc @rickeylev

1reaction
Wyveraldcommented, Sep 16, 2022

It’s the “To fix #NNN” line… GitHub trying to be clever here

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Proposal] Locating runfiles with Bzlmod - Google Groups
I submitted a draft of a proposal on how to locate runfiles with Bzlmod and ... repository (e.g. it implements a custom lookup...
Read more >
Command-Line Reference | Bazel
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries ...
Read more >
Why can't my programs find resource files when using bazel ...
Use the C++ runfiles library to find them. Add the dependency in your BUILD file: cc_binary( name = "lazy-foo-02", srcs = [ "main.cpp",...
Read more >
CHANGELOG.md - Google Git
When Bzlmod is enabled, all Bzlmod-generated repos will have an extra '@' prepended to their ... Find runfiles in directories that are themselves...
Read more >
Adopting Bazel's new package manager - Aspect Blog
You can read about the design of the feature in the Bzlmod User Guide ... Follow github.com/bazelbuild/bazel/issues/14013 to find out when ...
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