-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Frequent "Requested groups not in lockfile" errors. #2086
Comments
Okay, I have a reproducer! But now I wonder if this is intended behavior or not. I'd argue that it makes for confusing UX.
Notice how |
|
Okay, that kind of makes sense, although it's a little less intuitive that |
Maybe, the following is related? I added some dependencies to a |
Fixes #2086 Signed-off-by: Frost Ming <me@frostming.com>
That seems a bug, thanks |
This feels unintuitive. I get the usefullness in certain cases, but I feel the majority of users will use |
What's the reason to not pin dependencies from all groups by default? |
Cause it is likely to cause dependency conflicts and it's easier to add group than to remove. |
Thanks for this thread. @frostming A few follow-ups on the above:
Also, following up on @rafalkrupinski questions, @frostming:
|
Despite #1796 and #2050 I think this is a different bug. It definitely occurs for more than just the
default
group and optional dependencies. E.g. on a $work PR, I see the missing group istesting
. I've also seen this in the past with some of my OSS projects.pdm lock
doesn't seem to solve it.Steps to reproduce
Unfortunately, I don't have a reliable reproducer. Sometimes this happens when local testing passes, but CI testing fails. Sometimes local testing also fails. Sometimes it happens after
pdm update
.The only reliable way to resolve the problem is to
rm -f pdm.lock
(and note thatpdm.lock
is committed to git), then re-run my tests which will have the effect of recreating a usablepdm.lock
file. I haven't come up with another way to fix the problem.Actual behavior
I'll see an error like
[PdmUsageError]: Requested groups not in lockfile: testing
Expected behavior
I have a
testing
group in my[tool.pdm.dev-dependencies]
section, so I would expect PDM to be able to execute thepdm install -G testing
command in mytox.ini
testenv
.Environment Information
# Paste the output of `pdm info && pdm info --env` below:
Sorry, I can't paste that directly because of $work, but I am using PDM 2.7.4 installed from brew and Python 3.8.17, but I have definitely seen it with newer Pythons on my OSS work.
The text was updated successfully, but these errors were encountered: