-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
update-python-libraries: migrate git revs to tag #362222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very familiar with this part of Nixpkgs but it looks sane to me at a glance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the Python. 🐍
Hey, can we please give codeowners time to review and merge? Thank you. |
My apologies for jumping the metaphorical gun. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/statistics-on-nixpkgs-prs-over-time/55916/14 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/statistics-on-nixpkgs-prs-over-time/55916/17 |
Thanks for working on and reviewing this change! |
@@ -496,7 +496,7 @@ def _update_package(path, target): | |||
else: | |||
# forcefully rewrite rev, incase tagging conventions changed for a release | |||
match = matches[0] | |||
text = text.replace(match, f'rev = "refs/tags/{prefix}${{version}}";') | |||
text = text.replace(match, f'tag = "{prefix}${{version}}";') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing this now, we should unquote and then not interpolate the version, when the prefix is empty.
@mweinelt Seems this is blocking a lot of |
That's a good time to stop doing that; you shouldn't assume anything about src other than that it's a path. You might need to switch between rev and tag on updates or users may override src with anything they like. Depending on src's internals feels like a layer violation to me. |
The assumption is that |
Sorry, I what I wrote was ambiguous: To stop depending on You'd necessarily need to pass the tag to the "constructor" of |
Perhaps what I wrote was also ambiguous or maybe we're just talking past each other: nixpkgs-update doesn't depend on src for meta. The issue is that sometimes the migration of a python package from rev to tag is incomplete. |
Yes and the cause of that is the layer violation I talked about; depending on an internal property of |
Yeah, I think we're just talking past each other. |
Thanks, I'll have a look in the next few days. |
Not forgotten, but not so straightforward. |
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.