Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different bzlmod lock digest on different host platforms #110

Open
jwnrt opened this issue Dec 9, 2024 · 0 comments
Open

Different bzlmod lock digest on different host platforms #110

jwnrt opened this issue Dec 9, 2024 · 0 comments

Comments

@jwnrt
Copy link

jwnrt commented Dec 9, 2024

When using bzlmod on two slightly different host platforms (Ubuntu with glibc 2.39 and Debian with glibc 2.40), the usageDigest hash of @platforms//host:extension.bzl%host_platform changes:

--- a/MODULE.bazel.lock
+++ b/MODULE.bazel.lock
@@ -92,7 +95,7 @@
     "@@platforms//host:extension.bzl%host_platform": {
       "general": {
         "bzlTransitiveDigest": "xelQcPZH8+tmuOHVjL9vDxMnnQNMlwj0SlvgoqBkm4U=",
-        "usagesDigest": "meSzxn3DUCcYEhq4HQwExWkWtU4EjriRBQLsZN+Q0SU=",
+        "usagesDigest": "pCYpDQmqMbmiiPI1p2Kd3VLm5T48rRAht5WdW0X2GlA=",
         "recordedFileInputs": {},
         "recordedDirentsInputs": {},
         "envVariables": {},

This is an issue when the lockfile is checked into the repo.

From some investigation, it seems that module extensions must set the use_os and use_arch parameters if they are dependent on the OS or architecture:

bazelbuild/bazel@2f032d4

I believe this applies to host_platform too since its behaviour changes based on the OS. Should these parameters be set, or am I misunderstanding?

Apologies for the lack of minimal reproduction, this is quite difficult to test.

EDIT: I see these params were renamed to os_dependent and arch_dependent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant