-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry check
does not take into a account path dependencies
#8633
Comments
cc @radoering since we worked together previously on #6843 and related issues |
I suppose with "PEP-517 dependencies" you are referring to projects that declare their dependencies according to PEP 621 in a
I'd probably keep hashes of path dependencies' pyproject.toml content separately. That way we can still check the
I don't like the idea that In general, I tend to think that we should make such a behavior opt-in. There are several options for making it optional (not sure which would be best):
|
Not really. I meant dependencies for which their sub-dependencies can be statically determined without executing code. That is, not a
Yup that makes sense!
I'd rather make it opt-out, the only users that would be impacted are those that are using path dependencies and those path dependencies are using |
Facing this at the moment with editable dependencies that have changed. I expect the project that relies on the editable dependencies to fail a check. schematically:
edit: sorry if this is missing the point of this ticket. |
If you have a path dependency and add a dependency to its pyproject.toml file then run
poetry check --lock
it will say everything is OK when it shouldn't be. It seems to me that in general the mechanism to check if the lockfile is up to date withpyproject.toml
should take into account path dependencies.I can think of two solutions:
content-hash
metadata ofpoetry.lock
.The first approach suffers from the problem that these path dependencies might not even use a
pyproject.toml
file / PEP 517. They could usesetup.py
or something super dynamic.The second approach would be slow for the common case of path dependencies that do use
PEP-517
(and likely even use poetry).A compromise is best: if all of the path dependencies are PEP-517 dependencies then assume that the build backend is deterministic (I think this is part of the PEP / a fair assumption) and just check the
content-hash
(which would include a hash of all of thepyproject.toml
files). If any path dependency is not PEP-517 compliant fall back to never assuming the lockfile is up to date based on the hash.Does this seem reasonable? If so I can work on an implementation.
The text was updated successfully, but these errors were encountered: