Skip to content

update-scripts: add "version-info" and run it in update CI #3351

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

Merged
merged 5 commits into from
May 22, 2025

Conversation

MattSturgeon
Copy link
Member

  • update-scripts: get nixpkgs using flak-compat
  • update-scripts/version-info: init
  • update-scripts: move update logic from CI to dedicated script
  • update-scripts/update: write version-info during update
  • version-info: init

This ensures we get an actual nixpkgs flake, which will have source info
like `rev`.

It also means we have access to `nixvim` if we need it.
Writes a version-info.toml file.
Copy link
Member

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Looks good overall. Is this to later use nixvimOlder & co?

@MattSturgeon
Copy link
Member Author

Is this to later use nixvimOlder & co?

I've ran into wanting version info a few times. Sometimes it'd be acceptable to use lib.trivial.release, but other times we need to know the "definitely not modified by a follows" info.

I didn't want this PR to grow into also implementing various use-cases for version info.

Some uses include minor improvements to the docs, throwing assertions when the wrong nixpkgs channel is used, improving nixvim's "branching off a release" process, etc.

There's probably other version info worth tracking in the version-info.toml file too; or alternatively introducing a lib.nixvim.version that has a mixture of static and dynamic values? Either way, that's future work.

@MattSturgeon MattSturgeon changed the title update-scripts: add "version-info" and use it in CI update-scripts: add "version-info" and run it in update CI May 22, 2025
@MattSturgeon

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

mergify bot commented May 22, 2025

This pull request, with head sha 46fd0b184cbc5f1bdc5a8325cb973fc54e49ab68, has been successfully merged with fast-forward by Mergify.

This pull request will be automatically closed by GitHub.

As soon as GitHub detects that the sha 46fd0b184cbc5f1bdc5a8325cb973fc54e49ab68 is part of the main branch, it will mark this pull request as merged.

It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch version-info, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit 46fd0b1 into nix-community:main May 22, 2025
4 checks passed
@mergify mergify bot temporarily deployed to github-pages May 22, 2025 20:46 Inactive
@MattSturgeon MattSturgeon deleted the version-info branch May 22, 2025 20:46
@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 3, 2025

Successfully created backport PR for nixos-25.05:

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

Successfully merging this pull request may close these issues.

2 participants