Comparing changes
Open a pull request
base repository: NixOS/nixpkgs
base: 1b17aea63e33
head repository: NixOS/nixpkgs
compare: 74c547209048
- 15 commits
- 4 files changed
- 1 contributor
Commits on Sep 18, 2020
-
update.nix: use ThreadPoolExecutor
Not sure why I chose ProcessPoolExecutor in the first place.
Commits on Sep 19, 2020
-
common-updater-scripts: add --print-changes flag
Printing the changed file and new version can be used to commit the changes to git.
Commits on Sep 20, 2020
-
maintainers/scripts/update.nix: Add support for auto-commiting changes
Update scripts can now declare features using passthru.updateScript = { command = [ ../../update.sh pname ]; supportedFeatures = [ "commit" ]; }; A `commit` feature means that when the update script finishes successfully, it will print a JSON list like the following: [ { "attrPath": "volume_key", "oldVersion": "0.3.11", "newVersion": "0.3.12", "files": [ "/path/to/nixpkgs/pkgs/development/libraries/volume-key/default.nix" ] } ] and data from that will be used when update.nix is run with --argstr commit true to create commits. We will create a new git worktree for each thread in the pool and run the update script there. Then we will commit the change and cherry pick it in the main repo, releasing the worktree for a next change.
-
-
maintainers/scripts/update.nix: refactoring
Get rid of some globals, split main into smaller functions, rename some variables, add typehints.
-
maintainers/scripts/update.nix: switch to asyncio
This will make it cleaner and also better respect SIGTERM.
-
maintainers/scripts/update.nix: support auto-committing by passing at…
…trPath Instead of having the updateScript support returning JSON object, it should be sufficient to specify attrPath in passthru.updateScript. It is much easier to use. The former is now considered experimental.
-
maintainers/scripts/update.nix: support filling in auto-commit attrib…
…utes We can determine all of them when attrPath is present so we might jsut as well do it.
-
-
doc: Undocument attr-set of passthru.updateScript
We no longer need it for most use cases so I am making it experimental. I have something in mind where it might be useful in the future (customizing commit messages) but for now, it would only confuse people.
-
maintainers/scripts/update.nix: run update script with UPDATE_NIX_ATT…
…R_PATH The environment variable will contain the attribute path the script is supposed to update.
-
maintainers/scripts/update.nix: Run update scripts from the worktree
`update.nix` extracts `passthru.updateScript` attributes in the main repo and when they are relative paths (e.g. `./update.sh`), Nix will resolve them to absolute paths in the main repo. Update scripts can use $(dirname $0) to get the location of files they should update but that would point to the main repo. We want them to modify the appropriate git worktree instead so we replace the prefix accordingly. `git rev-parse --show-toplevel` will resolve symlinks but, fortunately, Nix will do that as well, so the path will match: #98304 (comment)
-
maintainers/scripts/update.nix: Clean up
- Make some arguments more fitting (the path is actually full, not just relative to prefix…). - Increase the purity of packages* functions (they now take pkgs from argument, not from scope). - Add some documentation comments.
Commits on Oct 2, 2020
-
Merge pull request #98304 from jtojnar/updateScript-commit3
maintainers/scripts/update.nix: Add support for auto-commiting changes
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 1b17aea63e33...74c547209048