Comments (5)
Deleting the lockfile resolved it, until a new build where it fails again.
from bazel.
from bazel.
Dupe of #21845. We should fix it for 7.2.0.
Looks like you have a stray @zlib
label somewhere in your MODULE.bazel, but are not use_repo
ing zlib
.
from bazel.
I use @zlib
in the module extension that calls it in via http_archive
, so I don't use_repo
it. I added an unnecessary use_repo
for it to work around the crash, but I shouldn't have to use_repo
it since it's not used outside of the module extension.
This is the module extension:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
load("@llvm-raw//utils/bazel:terminfo.bzl", "llvm_terminfo_from_env")
load("@llvm-raw//utils/bazel:zlib.bzl", "llvm_zlib_from_env")
def _llvm_deps_impl(_):
llvm_configure(name = "llvm-project")
llvm_terminfo_from_env(
name = "llvm_terminfo",
)
http_archive(
name = "zlib",
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib.BUILD",
sha256 = "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9",
strip_prefix = "zlib-1.2.12",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.12.tar.gz",
"https://zlib.net/zlib-1.2.12.tar.gz",
],
)
llvm_zlib_from_env(
name = "llvm_zlib",
external_zlib = "@zlib",
)
llvm_deps = module_extension(implementation = _llvm_deps_impl)
from bazel.
This here is the problem:
llvm_zlib_from_env( name = "llvm_zlib", external_zlib = "@zlib", )
This @zlib
label cannot be resolved because we don't know what @zlib
is. You might say "it's declared right above!", but that's not how repo mappings in extension impl functions work (for better or for worse...). The repo mapping used here is always the mapping of the module hosting the extension (in this case, your root module), and the root module doesn't see a @zlib
.
I realize this is very confusing, and am open to improving the situation. We could actually just add @zlib
to the repo mapping after we declare @zlib
-- that emulates WORKSPACE behavior to a certain degree -- which would also help address #19055, actually.
from bazel.
Related Issues (20)
- [7.2.0] Track `getenv` calls in module extensions HOT 2
- Forbid the empty-string configuration
- [Mirror] [email protected] HOT 1
- [7.2.0] Correctly detect ContentLengthMismatchException and retry HOT 2
- Prevent persistent action cache from growing indefinitely
- Implement garbage collection for the repository cache
- [7.2.0] Fix getting authentication for URLs in http_archive HOT 1
- Duplicate error message in evaluation of module.bazel HOT 1
- [7.2.0] Skymeld deadlock in `registerAndPlantMissingSymlinks` HOT 1
- [7.2.0] Update buildozer to 7.1.2 HOT 1
- [7.2.0] Make `bazel mod tidy` work with `include()` HOT 2
- Read aspect providers in cquery HOT 3
- [7.2.0] Validate label attributes of repositories created by module extensions HOT 1
- [7.2.0] Do not print repository errors twice HOT 1
- [7.2.0] Add `NestedSet<PathFragment>`- and `Artifact`-typed compile build variables HOT 3
- [Mirror] rules_go v0.48.0 HOT 1
- py3wrapper.sh should fail with an explicit error message if `which` is not present on the PATH HOT 2
- [Mirror] gazelle v0.37.0 HOT 1
- [7.2.0] Close the stdin pipe handle when the respective OutputStream is closed HOT 1
- bazel crash after first run with empty lock file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel.