Skip to content

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

@jrmlhermitte

Description

@jrmlhermitte

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions