-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
Do not add local package to lockfile #1481
Conversation
It can be fixed by dropping the self-package from the resolution result. Then no need to skip it in |
src/pdm/resolver/core.py
Outdated
@@ -2,7 +2,9 @@ | |||
|
|||
from typing import TYPE_CHECKING, Dict, cast | |||
|
|||
from pdm.cli.utils import normalize_name, strip_extras |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong import path, please fix it
It seems the latest ubuntu runner has some issues with setup-python 3.6. But I can't find a bug report about this. |
Replaces #1470
Pull Request Check List
news/
describing what is new.Describe what you have changed in this PR.
If you have a pyproject where you depend on yourself using the pattern described in #1441, with a config such as this:
The project will appear multiple times in the lockfile. Changing the version or name of the local package will desync from the lockfile; leading to
pdm sync
failing. This PR removes the local package from the lockfile, and instead adds a generator for it when running from aLockedRepository
.This works and all tests pass. I did however notice that when using this pattern the local package gets installed twice; but that happens on main as well:
Not sure if there's a good opportunity to fix that here as well.