-
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
Cannot use the same package in develop mode for dev and non-develop mode for non-dev #2837
Comments
What happens if you install with i.e. is this a bug that the dependency is in both lists, and gets merged or is it a bug that it sees the dependency is present, but not that its Edit: Someone replicated this in #1168 (comment), and the apparent answer is that it always obeys the details of the dev-dependency. It's visible earlier in the thread that if the requirements conflict between dev and non-dev, Poetry will reject the build resolution, which seems reasonable. So my guess is that Poetry's approach is to just merge all the dev-dependencies into the non-dev dependencies, with the develop flag not considered for conflict-resolution and hence taking dev-dependency's value as the result, and then building the lock file, so that Since the lockfile contains whether the dependency was 'develop' or not, I suspect this will be not simple to fix, since that would require tracking two versions of the dependency, and choosing the right one (even though they're the same apart from |
Thinking about this, does it even make sense for path-dependencies to appear in the lock file? Unlike a git dependency (which probably has very similar issues...) you can't feasibly lock a path-dependency to a particular version, the best you can do is validate at install-time that it matches the version specification, if you're using one. A git dependency can capture the specific commit at lock-time, but I'm not sure if Poetry does this. |
You can't lock a path dependency to a version, but presumably it needs to exist in the lockfile in order for the transitive dependencies to be included. For the original issue, I've hit this as well. You ultimately need the Alternatively, this somewhat seems to be analogous to installation-time constraints like |
Please have a look into this discussion: https://github.com/orgs/python-poetry/discussions/3646 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
This is my
poproject.toml
poetry install
The contents of poetry.lock will be:
poetry install --no-dev
The contents of poetry.lock will be unchanged:
I would expect
develop = false
after the last command. This is needed to be able to debug withmy-lib
indev
mode and install the package innon-dev
mode for deployment. It seems like this would be the expected behavior which apparently is not working.Thanks.
The text was updated successfully, but these errors were encountered: