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

Updating develop attribute in path dependency forces to recreate the virtualenv to take effect #7088

Open
3 of 4 tasks
slequeux opened this issue Nov 23, 2022 · 4 comments
Open
3 of 4 tasks
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@slequeux
Copy link

  • Poetry version: 1.1.13
  • Python version: 3.8.13
  • OS version and name: macOS 12.4
  • pyproject.toml:
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I have 2 poetry projects, one depending on another, using a path dependency.

First I did not included the develop = true file and was facing the issue that it was difficult to work on a feature that requires modifications on these 2 projects as modification on the dependency was not replicated to my virtualenv.

I updated my dependency with the develop = true part and ran a poetry update. This had no effect. I had to completely delete the virtualenv and recreate it to have an effect.

Steps to reproduce:

  • 1 poetry project with some library code (a simple function would do the job)
  • 1 poetry project depending on the first one project-lib = { path = "../project-lib" }
  • run poetry install on both, virtual envs are correctly created and the code in "project-lib" can be used in the other one.
  • try to change the code in the "project-lib", the modification cannot be used in the other project unless bumping the version of the lib (this is the expected behavior)
  • change the dependency to project-lib = { path = "../project-lib", develop = true }
  • run poetry update, one can see that the lock file is updated

Here I would expect to see changes in the lib from the other project. I can't see them. Once the virtual env has completely been recreated, then any change in the lib can be seen in the other project.

My guess here is that in one mode (develop = false), the module is installed in the virtualenv and not in the other mode (develop = true), but changing mode do not remove the module from the virtualenv as it should do.

@slequeux slequeux added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 23, 2022
@dimbleby
Copy link
Contributor

Poetry version: 1.1.13

please try again with recent poetry

@dimbleby
Copy link
Contributor

as reported against 1.1.13 this duplicates #3085 and #4884 - which were closed on the grounds that #6843 resolved them

however I don't think that #6843 actually did resolve this, so I guess this can stay open and it's all good. (Good from a tracking point of view I mean; of course a bug is still a bug.)

@Samyak2
Copy link

Samyak2 commented Jul 13, 2023

I'm able to reproduce this on v1.5.1

@dkbarn
Copy link

dkbarn commented Jan 15, 2024

Just ran into this on v1.7.1

My workflow was:

  • create virtualenv with poetry install
  • changed a dependency in pyproject.toml to include develop = true
  • refresh lock file with poetry lock --no-update
  • can confirm that poetry.lock correctly includes the develop = true flag for that dependency
  • run poetry update
  • No dependencies to install or update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants