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 tries to reinstall from git when using annotated tags as references #1916

Closed
3 tasks done
jrmlhermitte opened this issue Jan 18, 2020 · 4 comments · Fixed by #1948
Closed
3 tasks done

poetry tries to reinstall from git when using annotated tags as references #1916

jrmlhermitte opened this issue Jan 18, 2020 · 4 comments · Fixed by #1948
Labels
kind/bug Something isn't working as expected

Comments

@jrmlhermitte
Copy link
Contributor

Issue

This came from a discussion on issue #691

If we re-run the gist included above, poetry will try re-installing the referred library, even though the git tag has not changed.

This was discovered on the issue mentioned above. Here is the reply from @bibz

Thanks for the MRE.

I can reproduce your example now.
You found a different bug than we had, due to how git handled signed annotated tags.

To summarise:

The (annotated) tag v5.1.3 itself is a git object with the short sha 73f60e6
The tree pointed to by the tag has the short sha 4056bbb

The lock file refers to the tag object, because it is what v5.1.3 resolves to directly.
Since the checked-out tree has a different sha, poetry thinks it is not up-to-date (the references are different) and then re-install it.

I think we need a new issue for this.

Would it be possible to investigate this, and possibly change the behaviour to not re-install the package?

Thanks for the great work on this wonderful library, keep it up!

@jrmlhermitte jrmlhermitte added the kind/bug Something isn't working as expected label Jan 18, 2020
@jrmlhermitte
Copy link
Contributor Author

Would you guys need help with this?
I can try to use this commit as a model (referenced by @bibz). I'm a bit busy until the weekend though, and I may be slow.

If you have it covered, no worries, just trying to offer help when I can, awesome library :)

(PS: I've switched to non-annotated tags so it's not pressing for me, but I don't want others to encounter this :) )

@finswimmer
Copy link
Member

Hello @jrmlhermitte ,

we appreciate any help. So if you like to work on this issue, just go on. 👍

Thank you for your help!

fin swimmer

@jrmlhermitte
Copy link
Contributor Author

@finswimmer I think #1948 is all we need.
I would like to test this by actually running poetry. Is there a recommended way to do that?

I would like to poetry install poetry from a virtual environment and then poetry install another package from this environment. Would that be the right way to do it?

Copy link

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

2 participants