<#21625 `generate-lockfiles` writes tool lockfiles...
# github-notifications
c
#21625 `generate-lockfiles` writes tool lockfiles twice Issue created by kaos Describe the bug
Copy code
❯ pants generate-lockfiles
11:18:36.09 [INFO] Initializing scheduler...
11:18:36.16 [INFO] Initializing Nailgun pool for 24 processes...
11:18:37.16 [INFO] Scheduler initialized.
11:18:48.46 [INFO] Completed: Generate lockfile for black
11:18:48.49 [INFO] Completed: Generate lockfile for python-default
11:18:48.49 [INFO] Wrote lockfile for the resolve `python-default` to default.lock
11:18:48.49 [INFO] Wrote lockfile for the resolve `black` to black.lock
11:18:48.49 [INFO] Wrote lockfile for the resolve `black` to black.lock

Lockfile diff: default.lock [python-default]

==                      Added dependencies                      ==

  certifi                        2024.8.30
  charset-normalizer             3.4.0
  idna                           3.10
  requests                       2.32.3
  urllib3                        2.2.3

Lockfile diff: black.lock [black]

==                      Added dependencies                      ==

  black                          24.10.0
  click                          8.1.7
  mypy-extensions                1.0.0
  packaging                      24.1
  pathspec                       0.12.1
  platformdirs                   4.3.6

Lockfile diff: black.lock [black]

==                      Added dependencies                      ==

  black                          24.10.0
  click                          8.1.7
  mypy-extensions                1.0.0
  packaging                      24.1
  pathspec                       0.12.1
  platformdirs                   4.3.6
Pants version
2.23.0rc2
OS
MacOS
Additional info Repro, using `txtar` format.
Copy code
-- BUILD --
python_requirements(name="default", source="requirements.txt")
python_requirements(name="black", source="black-requirements.txt", resolve="black")
-- black-requirements.txt --
black
-- pants.toml --
[GLOBAL]
pants_version = "2.23.0rc2"
backend_packages = [
  "pants.backend.python",
  "pants.backend.python.lint.black",
  
]

[python]
interpreter_constraints = ["==3.12.*"]
enable_resolves = true

[python.resolves]
python-default = "default.lock"
black = "black.lock"

[black]
install_from_resolve = "black"

-- requirements.txt --
requests
pantsbuild/pants