Skip to content
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 1.1.6 does not resolve dependencies for "nested"package in develop mode #3956

Closed
2 of 3 tasks
pdeszynski opened this issue Apr 16, 2021 · 3 comments · Fixed by #4202
Closed
2 of 3 tasks

Poetry 1.1.6 does not resolve dependencies for "nested"package in develop mode #3956

pdeszynski opened this issue Apr 16, 2021 · 3 comments · Fixed by #4202
Labels
kind/bug Something isn't working as expected

Comments

@pdeszynski
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

In case you have such dependencies: proj1 -> proj2 -> proj3 marked as develop, newest poetry (1.1.6) will not install proj3 dependencies whether previous release will handle that case. This occurs ONLY if poetry.lock is present.

To reproduce:

git clone https://github.com/pdeszynski/poetry-fail-example
cd poetry-fail-example
docker build -f Dockerfile-1.1.5 -t poetry-1.1.5 .
docker build -f Dockerfile-1.1.6 -t poetry-1.1.6 .

docker run --rm -it poetry-1.1.5 python proj1/proj1/__init__.py  # <- this will succeed
docker run --rm -it poetry-1.1.6 python proj1/proj1/__init__.py # <- this will fail with pydash missing error

@pdeszynski pdeszynski added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Apr 16, 2021
@marns93
Copy link

marns93 commented Apr 28, 2021

Poetry is very nice tool to manage python dependencies!

Unfortunately the problem prevent us to upgrade to the new version 1.1.6.
We would like to upgrade, but the only solution, until this bug is fixed is to bump all our poetry.lock files at this moment.
This is not suitable, because we have lots of repositories.

I can reproduce problems with nested dependency resolution as well.

With the following steps you can reproduce the problem with nested git dependencies without develop mode.

# checkout repository
git clone https://github.com/marns93/test-poetry-nested-deps-1.git
# ensure old poetry version is installed
poetry self update 1.1.5
# install dependencies with old poetry version
poetry install
# update poetry
poetry self update 1.1.6
# try to install dependencies as well
poetry install

Now you can see that all dependencies of the nested git dependency (test-poetry-nested-deps-3) will be removed.

# rollback to old version
poetry self update 1.1.5
# try to install dependencies again
poetry install

The nested git dependencies will be installed.

If there is no poetry.lock I can't reproduce the problem. Only if a poetry.lock exists created with poetry 1.1.5.

@abn Could you please have a look?

Thanks!

@sdispater
Copy link
Member

The root cause has been identified (see #4202) and this will be fixed in the next bugfix release.

Note that you will to regenerate the lock file for the fix to take effect.

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants