Skip to content

pdm add --frozen-lockfile --no-sync still runs the resolver #3372

@ncoghlan

Description

@ncoghlan

Describe the bug

There no longer appears to be a way to get pdm add to just edit pyproject.toml without performing a full resolution first.

To reproduce

Run pdm add --frozen-lockfile --no-sync some-file.

This will start a full resolver run (presumably to check locking is still possible) before modifying pyproject.toml, but I don't want pdm add to check that, I have a separate script for updating the lock file for all the required environments and exporting the relevant groups to flat requirements files as needed)

Expected Behavior

PDM edits pyproject.toml and does nothing else.

Environment Information

$ pdm info
PDM version:
  2.22.1
Python Interpreter:
  /home/acoghlan/.../.venv/bin/python (3.12)
Project Root:
  /home/acoghlan/...
Local Packages:

$ pdm info --env
{
  "implementation_name": "cpython",
  "implementation_version": "3.12.6",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.15.167.4-microsoft-standard-WSL2",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Tue Nov 5 00:21:55 UTC 2024",
  "python_full_version": "3.12.6",
  "platform_python_implementation": "CPython",
  "python_version": "3.12",
  "sys_platform": "linux"
}

Verbose Command Output

No response

Additional Context

No response

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.

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