Commit graph

988 commits

Author SHA1 Message Date
Jan Tojnar
ce96c79779 maintainers/scripts/update: Allow updating in (reverse) topological order
Previously, when updating multiple packages, we just updated them in arbitrary order. However, when some of those packages depended on each other, it could happen that some of the intermediary commits would not build because of version constraints on dependencies.

If we want each commit in the history to build when feasible, we need to consider four different scenarios:

1. Updated dependant is compatible with both the old and the new version of the dependency. Order of commits does not matter. But updating dependents first (i.e. reverse topological order) is useful since it allows building each package on the commit that updates it with minimal rebuilds.
2. Updated dependant raises the minimal dependency version. Dependency needs to be updated first (i.e. topological order).
3. Old dependant sets the maximal dependency version. Dependant needs to be updated first (i.e. reverse topological order).
4. Updated dependant depends on exact version of dependency and they are expected to be updated in lockstep. The earlier commit will be broken no matter the order.

This change allows selecting the order of updates to facilitate the first three scenarios. Since most package sets only have loose version constraints, the reverse topological order will generally be the most convenient. In major package set updates like bumping GNOME release, there will be exceptions (e.g. libadwaita typically requires GTK 4 from the same release) but those were probably in broken order before as well.

The downside of this feature is that it is quite slow – it requires instantiating each package and then querying Nix store for requisites.
It may also fail to detect dependency if there are multiple variants of the package and dependant uses a different one than the canonical one.

Testing with:

    env GNOME_UPDATE_STABILITY=unstable NIX_PATH=nixpkgs=$HOME/Projects/nixpkgs nix-shell maintainers/scripts/update.nix --arg predicate '(path: pkg: path == ["gnome-shell"] || path == ["mutter"] || path == ["glib"] || path == ["gtk3"] || path == ["pango"] || path == ["gnome-text-editor"])' --argstr order reverse-topological --argstr commit true --argstr max-workers 4
2025-03-03 00:46:17 +01:00
Jan Tojnar
1d2c1810eb maintainers/scripts/update: Prepare for ordered updates
Just minor refactorings:

- Extract `updater_tasks` into a variable.
- Make `main` itself async.
2025-03-03 00:46:17 +01:00
Jan Tojnar
f54d20c3a1 maintainers/scripts/update: Do not try to print error when there is not one
This can happen e.g. due to an error during `merge_changes` since we do not do `stderr=PIPE` for git commands.
2025-03-03 00:46:06 +01:00
Jan Tojnar
e3772a9bcb maintainers/scripts/update: Mark queue jobs as done
I believe this is only relevant if we were to `join` the queue itself but it is a good practice anyway.
https://docs.python.org/3/library/asyncio-queue.html#asyncio.Queue.task_done
2025-03-02 23:03:12 +01:00
Jan Tojnar
fdea10b433 maintainers/scripts/update: Fix update_info type
This was revealed when we added return type to `check_subprocess_output`.
2025-03-02 23:03:12 +01:00
Jan Tojnar
76f44542a8 maintainers/scripts/update: Add missing type hints 2025-03-02 23:03:12 +01:00
Jan Tojnar
81aed8eb80 maintainers/scripts/update: Modernize types
`list`, `dict` and `tuple` can accept generic arguments since Python 3.9:
https://docs.python.org/3.9/whatsnew/3.9.html#type-hinting-generics-in-standard-collections

`T | None` can be used instead of `Optional` since 3.10:
https://docs.python.org/3.10/whatsnew/3.10.html#pep-604-new-type-union-operator
2025-03-02 23:03:12 +01:00
Jan Tojnar
b91cb89649 maintainers/scripts/update: Format with black 2025-03-02 23:03:12 +01:00
PerchunPak
70705198f6
nvim-dbee: build manually instead of using luarocks package
https://github.com/kndndrj/nvim-dbee/issues/189
2025-02-22 12:16:35 +01:00
K900
20fe96061c maintainers/scripts/kde: handle duplicate tarballs properly 2025-02-19 12:58:07 +03:00
Matthieu C.
f30319b36f lua51Packages.lualine-nvim: init
vimPlugins.lualine-nvim: use buildNeovimPlugin instead

now packaged from lua
2025-02-16 22:44:26 +01:00
Matthieu C.
9cd7492b3e vimPlugins.oil-nvim: rebuild via lua51Packages
I tried to run the tests but got ~13 errors so I gave up
2025-02-16 21:19:56 +01:00
Gaétan Lepage
1fd181c4a3
vimPlugins.lzextras: init at 0.1.19 (#381371) 2025-02-16 12:22:12 +01:00
Matthieu C.
daa17d7a0d vimPlugins.nvim-web-devicons: use buildNeovimPlugin instead
now packaged from lua
2025-02-15 17:41:28 +01:00
BirdeeHub
7b2e8203fd vimPlugins.lzextras: init at 0.1.17
extensions repository for https://github.com/BirdeeHub/lze
2025-02-13 16:59:40 -08:00
K900
65ecf34ce2 scripts/kde/generate-sources: use download.kde.org file listings directly 2025-02-11 14:31:37 +03:00
PerchunPak
49e10c7b80
luaPackages.nvim-dbee: init at 0.1.9-1 2025-02-10 14:17:41 +01:00
Austin Horstman
48ac58753b
luarocks-packages: fix sorting 2025-01-28 15:33:33 -06:00
Austin Horstman
19b75068f7
luaPackages.tree-sitter-http: init at 0.0.33-1 2025-01-28 15:33:25 -06:00
Janne Heß
3425323bb4
Introduce script to automatically resolve conflicts after treewide changes (such as reformats) (#363759) 2025-01-21 20:47:57 +01:00
Silvan Mosberger
b0cfc9769a maintainers/scripts/auto-rebase: init 2025-01-21 20:29:25 +01:00
Austin Horstman
ed4efc01cf
luaPackages.orgmode: init at 0.3.61-1 2025-01-20 15:10:51 -06:00
Austin Horstman
aad44b3412
luaPackages.tree-sitter-orgmode: init at 1.3.2-1 2025-01-20 15:10:48 -06:00
github-actions[bot]
a0509da074
Merge master into staging-next 2025-01-07 18:04:37 +00:00
lucasew
67e33c0740 maintainers/scripts: remove with lib from meta
Signed-off-by: lucasew <lucas59356@gmail.com>
2025-01-07 14:27:16 -03:00
K900
9e51fd8b02 Merge remote-tracking branch 'origin/master' into staging-next 2025-01-06 21:13:31 +03:00
Gaetan Lepage
a84a96f683 luaPackages.papis-nvim: init at 0.7.0-1 2025-01-06 12:57:12 +01:00
sternenseemann
ca5dc07d37 haskellPackages: stackage LTS 22.40 -> LTS 22.43
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
2024-12-26 15:41:54 +01:00
sternenseemann
b3692b3250 haskellPackages.cabal2nix-unstable: 2024-12-04 -> 2024-12-22
Includes https://github.com/NixOS/cabal2nix/pull/638.
2024-12-22 13:47:07 +01:00
github-actions[bot]
f0fa98d059
Merge master into staging-next 2024-12-20 07:59:30 +00:00
Austin Horstman
7319e39b0d
luaPackages.datafile: init at 0.10-1 2024-12-19 14:15:25 -06:00
github-actions[bot]
dd1d7cff2b
Merge master into staging-next 2024-12-18 18:04:46 +00:00
GGG
318b37a8d6 update-dotnet-lockfiles: update comment to mention nuget-to-json 2024-12-17 19:46:36 -03:00
K900
81eb6d64ab Merge remote-tracking branch 'origin/master' into staging-next 2024-12-12 21:08:33 +03:00
K900
bf019896f7 kdePackages: Gear 24.08 -> 24.12 2024-12-12 16:08:49 +03:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Silvan Mosberger
84d4f874c2 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 78e9caf153
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:23:58 +01:00
K900
2236e731a3 Merge remote-tracking branch 'origin/master' into staging-next 2024-12-06 21:27:37 +03:00
Philip Taron
f9175022d6
update-python-libraries: migrate git revs to tag (#362222) 2024-12-06 08:18:39 -08:00
FliegendeWurst
2361852cc5 maintainers/scripts: add check-maintainer-usernames
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2024-12-06 14:18:06 +01:00
Martin Weinelt
b8704b00bc
update-python-libraries: fix helper script after by-name migration 2024-12-05 23:26:00 +01:00
Sefa Eyeoglu
2115f02b9a
.editorconfig: Format .bash files like .sh (#354885) 2024-11-29 23:36:19 +01:00
Matthieu Coudron
8ac1f15e2c
teal-language-server: dev-1 -> 0.0.5.1 (#356677) 2024-11-23 14:48:24 +01:00
barsoosayque
e6c6a56f64 teal-language-server: dev-1 -> 0.0.5.1
teal-language-server is now out of dev channel
in luarocks
2024-11-23 13:30:20 +07:00
barsoosayque
0967e2f2c5 tl: 0.15.3-1 -> 0.24.1-1
https://github.com/teal-language/tl/blob/v0.24.1/CHANGELOG.md#0241

This update introduced a lock file in tl, which
needs to be removed in order to build the package
2024-11-23 13:28:07 +07:00
barsoosayque
f7b46bfd5f lusc_luv: init at 4.0.1-1 2024-11-23 13:25:04 +07:00
Matthieu Coudron
d6c5afdca4
pluginupdate.py: add support for adding/updating individual plugins (#336137) 2024-11-21 20:26:17 +01:00
David McFarland
3d38ecca0c maintainers/scripts/update: add dependencies to nativeBuildInputs
This allows update.nix to work with a pure shell.
2024-11-17 18:35:20 -04:00
David McFarland
9fb173da94 maintainers/scripts/update-dotnet-lockfiles.nix: use update.nix 2024-11-17 18:35:20 -04:00
David McFarland
e3736259f7 maintainers/scripts/update: disable aliases 2024-11-17 18:35:20 -04:00