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

Optional path dependency cause poetry update to fail when the path is missing #2091

Closed
3 tasks done
dg10a opened this issue Feb 26, 2020 · 5 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@dg10a
Copy link

dg10a commented Feb 26, 2020

  • 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).
  • OS version and name: Arch Linux 5.5.4-arch1-1
  • Poetry version: 1.0.3

Issue

After modifying the pyproject.toml file to include an optional path dependency, poetry update fails with the following error:

[ValueError]
Directory <Some path that doesn't exist on filesystem> does not exist

I would expect poetry to ignore the missing directory as the dependency is optional.

Might be related to #668

@dg10a dg10a added the kind/bug Something isn't working as expected label Feb 26, 2020
@AlexJoz
Copy link

AlexJoz commented Aug 12, 2020

yep, agree, would be very helpful to fix

@abn
Copy link
Member

abn commented Aug 12, 2020

The issue with this is that when doing update or generating lock file all dependencies, including optional ones are required in order get a correct dependency tree. Avoiding this when resolving dependencies, could lead to other issues. It might be better to fail here. If a lock file already exists and the dependency is not activated (via extra etc.), this should not fail.

Re-using the existing package information from the lock file should mitigate this issue. We could, if data is available, treat this as a warning instead of an error.

@charlax
Copy link

charlax commented Sep 10, 2021

I think you get the same error if you want to move a path dependency. Let's it was under /foo and move it + change pyproject.toml to point to /bar, poetry update will still fail with ValueError: Directory /foo does not exist (I'll try to reproduce later).

(seems definitely related to #668)

@finswimmer
Copy link
Member

Duplicate of #668

@finswimmer finswimmer marked this as a duplicate of #668 Oct 7, 2022
@finswimmer finswimmer closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2022
Copy link

github-actions bot commented Mar 1, 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 1, 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

No branches or pull requests

5 participants