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

Add rich file metadata to poetry.lock #1183

Closed
wants to merge 1 commit into from

Conversation

adisbladis
Copy link
Contributor

@adisbladis adisbladis commented Jun 21, 2019

This is so files can be distinguished based on their meta attributes.
My proposed solution to #1172.

metadata.hashes is still around though I'd like to start seeing that as deprecated and only for backwards compatibility.

  • Added tests for changed code.
  • Updated documentation for changed code.

@adisbladis adisbladis changed the base branch from master to develop June 21, 2019 18:19
@adisbladis adisbladis changed the title WIP: Add rich file metadata to poetry.lock Add rich file metadata to poetry.lock Jun 21, 2019
@adisbladis adisbladis force-pushed the file-metadata branch 5 times, most recently from 38f0aa0 to c7a5cc4 Compare June 21, 2019 20:48
@adisbladis
Copy link
Contributor Author

Here is a demo of how this metadata can be used: https://github.com/adisbladis/poetry2nix/tree/patched-poetry

@adisbladis
Copy link
Contributor Author

@sdispater Could I get a comment on if this is something that you'd like to incorporate? Then I can fix the conflicts.

@Caligatio
Copy link
Contributor

Not a maintainer but I think your approach is entirely reasonable. Quickly glanced at your diff and noticed (maybe) some bugs.

@adisbladis
Copy link
Contributor Author

Not a maintainer but I think your approach is entirely reasonable. Quickly glanced at your diff and noticed (maybe) some bugs.

What bugs did you notice?

@Caligatio
Copy link
Contributor

There is a slight logic bug (I think) with your new files property for a package. In poetry/installation/pip_installer.py, you assume there is a hash key if there is a files property. However, there is an edge case in poetry/repositories/legacy_repository.py in which a hash is not written into the file dict. I believe this would cause a KeyError to be raised on install.

@brycedrennan brycedrennan added the kind/feature Feature requests/implementations label Aug 16, 2019
@adisbladis
Copy link
Contributor Author

@sdispater Is this something that could possibly be merged before 1.0? Since I'm making changes to the lock format itself this needs to go in before 1.0.

@sdispater sdispater added this to the 1.0 milestone Oct 4, 2019
Copy link
Member

@sdispater sdispater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree with the general idea, I think this information should still reside in the metadata section of the lock file as a files property instead of hashes.

@adisbladis
Copy link
Contributor Author

Since #1460 this can be closed.

@adisbladis adisbladis closed this Oct 15, 2019
Copy link

github-actions bot commented Mar 1, 2024

This pull request 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/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants