Mic92 / nix-update

Swiss-knife for updating nix packages.
MIT License
504 stars 46 forks source link

nix-update (version=branch) gives wrong results for repos with no releases #276

Closed colemickens closed 1 month ago

colemickens commented 2 months ago

I actually think i spotted the issue and realized the triggers conditions at the same time.

https://github.com/Mic92/nix-update/blob/master/nix_update/version/github.py#L51

I think the issue is this short-circuit. It returns a Version object that results in an incorrect diff. (Since the Version doesn't set rev=commit like in the non-short-circuit case).

colemickens commented 2 months ago

I think my analysis is off. I'm having a bit of a hard time figuring out exactly what the old/new version/rev and replacement logic are. Seems like maybe the more common factor is the version format being used?

Mic92 commented 1 month ago

Afaik our nixpkgs standard is to use 0 as the version in the case there is no release. And this is what nix-update implements.

colemickens commented 1 month ago

I think this more or less is caused by us passing the rev as version in some of our packages. And/or the commit that lily just reverted. Anyway, I think it's safe to close this one for now.