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

Regression in rc1: Dependent Chain of Path Dependencies Fails #2999

Closed
3 tasks done
malcolmgreaves opened this issue Sep 29, 2020 · 9 comments
Closed
3 tasks done

Regression in rc1: Dependent Chain of Path Dependencies Fails #2999

malcolmgreaves opened this issue Sep 29, 2020 · 9 comments
Labels
kind/bug Something isn't working as expected

Comments

@malcolmgreaves
Copy link

  • I am on the latest Poetry version. (1.1.0rc1)

  • 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: $ OS X 10.15.6 (Darwin Kernel Version 19.6.0)

  • Poetry version: 1.1.0rc1

  • Link of a Gist with the contents of your pyproject.toml file: actually contains several pyproject.tomls & a link to a tar archive of everything.

Issue

I have found a regression in the first release candidate for version 1.1.0. When using 1.1.0rc1, relative path dependencies are broken. Whenever a poetry project depends on another poetry project via a relative path dependency, poetry install fails to handle this situation. Before (tested as of 1.1.0b2), this would not be the case: poetry install was able to successfully install a relative path dependency to another poetry project.

I've included detailed instructions & command output here: https://gist.github.com/malcolmgreaves/b1eecb9de04ce3d66206e643fbb80b38. This gist contains a reproducible example showing the regression in 1.1.0rc1 from 1.1.0b2. In the comments section, I include a link to a .tar.gz archive of the exact files & directory structure used for re-producing the error.

@malcolmgreaves malcolmgreaves added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 29, 2020
@abn
Copy link
Member

abn commented Sep 29, 2020

@malcolmgreaves I believe the issue you are encountering is due to a change introduced in 1.1.0b3.

Path dependencies will now be installed as editable only when develop option is set to true (#2887).

Non develop installs will require to be built via PEP 517. In such scenarios, the relative paths outside to other projects outside of a directory will not work.

PS: Thank you for a great issue report. Really appreciate that.

@malcolmgreaves
Copy link
Author

@abn Thank you for quickly replying! Adding develop = true fixes my problem.

Is it possible to improve the error message for this case before the 1.1.0 release is cut? e.g. it would have been very helpful to have some message about requiring develop = true for relative path dependencies. Or at least something easier to Google 🙃

@malcolmgreaves
Copy link
Author

malcolmgreaves commented Sep 30, 2020

Hi @abn -- so, it turns out I spoke to soon. I still have this error crop up even with develop = true on 1.1.0rc1 and not on 1.1.0b2. (I am seeing it play out in a project where I have just one more "chained" relative path dependency.) From the logs w/ -vvv, I can see that it's trying to pip install the other relative-path poetry projects.

Would it be helpful to follow up with additional documentation / reproducible examples?

@finswimmer
Copy link
Member

Hello @malcolmgreaves,

you have this in the [build-system] section:

[build-system]
requires = ["poetry>=1.0.9"]
build-backend = "poetry.core.masonry.api"

poetry.core will be available with poetry 1.1, but is not yet available. So change it to build-backend = "poetry.masonry.api" or change the whole build-system to

[build-system]
requires = ["poetry-core>=1.0.0rc1"]
build-backend = "poetry.core.masonry.api"

fin swimmer

@f0ff886f
Copy link

Where exactly does develop = true belong? I'm trying to switch a poetry-managed package from a normal PyPI-based dependency to a relative path-based dependency installed in editable mode.

I am unable to achieve that, using 1.1.0rc1. Does one have to remove the existing dependency and re-add it with poetry add -D?

@abn
Copy link
Member

abn commented Sep 30, 2020

@f0ff886f editable dependencies can be added like this,

foo = { path = "./path/to/foo", develop = true }

@malcolmgreaves
Copy link
Author

Thanks @finswimmer !

@finswimmer
Copy link
Member

Glad if we could help here @malcolmgreaves :)

I guess I can close this issue?

@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

No branches or pull requests

4 participants