Skip to content

Reduce size of MODULE.bazel.lock file #4278

Closed as not planned
Closed as not planned

Description

🚀 feature request

Description

I would like the MODULE.bazel.lock file to be smaller if possible.

Describe the solution you'd like

Open to any solution but I'm noticing that if you pass a limited set of platforms to pip.parse, the MODULE.bazel.lock contains hashes for other platforms as well:

  "facts": {
    "@@rules_python+//python/extensions:pip.bzl%pip": {
      "dist_hashes": {
        "https://pypi.org/simple": {
          ...
          "cffi": {
            "https://files.pythonhosted.org/packages/01/9a/11f687cb39d6a3504060d5242f04f48c735afb4d3d533958a20594890cb2/cffi-2.1.1-cp313-cp313-win_arm64.whl": "sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973",
            "https://files.pythonhosted.org/packages/02/10/4b3c75dde3d9663c9e02ba05c2668b954f671d4bbe346413ca8c696b295a/cffi-2.1.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264",
...

which probably could be omitted.

Activity

  1. aignas commented on Oct 31, 2026

    @aignas
    Collaborator

    You can use uv.lock file format if you would like these to be omitted entirely.

    Because the module lock file has to be platform agnostic we have to include all of the hashes, having the logic to filter only the ones that are used in the end could be done, but that means a non-trivial amount of rearchitecting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions