Skip to content

[Bug]: tools_telemetry 0.3.0 is unstable under bazel mod deps #20

@mrdomino

Description

@mrdomino

What happened?

If one has, somewhere in one’s pre-commit hook, a check for an up-to-date MODULE.bazel.lock:

bazel mod deps --lockfile_mode=error

Then if one depends, even transitively, upon aspect_tools_telemetry 0.3.0, this check becomes unsatisfiable:

diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
index 9a2aed6bb..4ba8f4450 100644
--- a/MODULE.bazel.lock
+++ b/MODULE.bazel.lock
@@ -799,7 +799,7 @@
         "bzlTransitiveDigest": "voOu6h+obIjLZjmhCP9gOsl4nOwrvViT36dPMhDxK1Q=",
         "usagesDigest": "T7SBPdIVyJ2gQ9HjvsNirpZIcUbBUwt97l0VIkIb1f0=",
         "recordedFileInputs": {
-          "@@//MODULE.bazel.lock": "76b6ee6fa441bd43685106d7f81ebe4b134e42b2bc7c00ea048c527ea0d2e229"
+          "@@//MODULE.bazel.lock": "6fc28f7bd11c107e6382e0bcf91977520ec3c21dd0a9e7d0148b3fb947d9778f"
         },
         "recordedDirentsInputs": {},
         "envVariables": {},

Rerunning bazel mod deps will (…almost) certainly produce a new digest for @@//MODULE.bazel.lock, by taking into account its prior digest. A subsequent run will find yet another new digest, because of the new digest. And so on, unless and until a SHA-2 fixed point is found.

Version

Development (host) and target OS/architectures: darwin-arm64 / linux-amd64

Output of bazel --version: bazel 8.4.2

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

0.3.0, fwiw I noticed this because the problematic version of tools_telemetry was pulled in by rules_rs version 0.0.15.

Language(s) and/or frameworks involved:

How to reproduce

git init bzltest
cd bzltest
cat >MODULE.bazel <<EOF
module(name = "bzltest")
EOF
echo 8.4.2 > .bazelversion
touch BUILD
bazel mod deps
cat >>MODULE.bazel <<EOF
bazel_dep(name = "aspect_tools_telemetry", version = "0.3.0")
EOF
bazel mod deps
bazel mod deps  # for good measure
git add .
bazel mod deps
git diff --exit-code

Any other information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions