Skip to content

coding-conventions: include the preceding upstream version#234201

Merged
7c6f434c merged 1 commit intoNixOS:masterfrom
7c6f434c:fix-untagged-version
Jun 8, 2023
Merged

coding-conventions: include the preceding upstream version#234201
7c6f434c merged 1 commit intoNixOS:masterfrom
7c6f434c:fix-untagged-version

Conversation

@7c6f434c
Copy link
Copy Markdown
Member

Description of changes

The only thing that seems clear after all the versioning discussions is that we do want the previous upstream-assigned version in the beginning when packaging something untagged.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • N/A Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label May 26, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 26, 2023
Copy link
Copy Markdown
Member

@rhendric rhendric left a comment

Choose a reason for hiding this comment

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

This is better than what we have and so I support it. (Should probably use English quotation marks and not guillemets, but that's completely superficial.)

@7c6f434c 7c6f434c force-pushed the fix-untagged-version branch from a9d2f9c to f1db774 Compare May 26, 2023 21:45
@mweinelt mweinelt added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 2, 2023
@7c6f434c 7c6f434c force-pushed the fix-untagged-version branch from f1db774 to 5b90f7a Compare June 2, 2023 11:20
- If a package is not a release but a commit from a repository, then the `version` attribute _must_ be the date of that (fetched) commit. The date _must_ be in `"unstable-YYYY-MM-DD"` format.
- If a package is a commit from a repository without a version assigned, then the `version` attribute _should_ be the latest upstream version preceding that commit, followed by `-unstable-` and the date of the (fetched) commit. The date _must_ be in `"YYYY-MM-DD"` format.

Example: Given a project had its latest releases `2.2` in November 2021, and `3.0` in January 2022, a commit authored on March 15, 2022 for an upcoming bugfix release `2.2.1` would have `version = "2.2-unstable-2022-03-15"`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

or 3.0 and to know that for sure you would need to inspect the git tree. If upstream is using multiple branches to track releases that would not be that easy because the commit could be in both, so you would need to browse around the repo to double check things which is another burden for reviewers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's not like a domain change, there are always small things where we can trust the patch author if everything looks sensible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am running a lot into situations where authors do not set the version number correct and suggesting the old format is trivial while the new one requires several extra steps I need to take to make sure the suggestion is correct.

Under those conditions I cannot just trust authors to set this correct and I think having wrong information is more harmful than not having that information at all.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's automate the work, then. It should be fairly straightforward to write a maintainer script that checks the Git repository for the most recent tag preceding a commit and edits the version accordingly, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A first attempt: #241428

@SuperSandro2000
Copy link
Copy Markdown
Member

So we closed the RFC now and that's the compromise? Also I didn't know about this until 5 minutes ago which is concerning because I am belonging to the group of most active people in this repo and didn't notice this reviewer relevant change for 3 weeks.

@donovanglover donovanglover mentioned this pull request Jul 4, 2023
12 tasks
@lilyinstarlight
Copy link
Copy Markdown
Member

Should we update unstableGitUpdater to handle and preserve version numbers done like the new convention? Right now it will revert them to not include the latest upstream tag (if one exists)

@jtojnar
Copy link
Copy Markdown
Member

jtojnar commented Jul 4, 2023

Yes. It already has option for the previous proposal so it should be as easy as turning it on by default and tweaking the format slightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants