Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 1b17aea63e33
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 74c547209048
Choose a head ref
  • 15 commits
  • 4 files changed
  • 1 contributor

Commits on Sep 18, 2020

  1. update.nix: use ThreadPoolExecutor

    Not sure why I chose ProcessPoolExecutor in the first place.
    jtojnar committed Sep 18, 2020
    Copy the full SHA
    5adbeb1 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2020

  1. common-updater-scripts: add --print-changes flag

    Printing the changed file and new version can be used to commit the changes to git.
    jtojnar committed Sep 19, 2020
    Copy the full SHA
    d351cea View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2020

  1. 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.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    1efc042 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    74c1b8d View commit details
    Browse the repository at this point in the history
  3. maintainers/scripts/update.nix: refactoring

    Get rid of some globals, split main into smaller functions, rename some variables, add typehints.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    17f8966 View commit details
    Browse the repository at this point in the history
  4. maintainers/scripts/update.nix: switch to asyncio

    This will make it cleaner and also better respect SIGTERM.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    01b9d53 View commit details
    Browse the repository at this point in the history
  5. 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.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    4a161dd View commit details
    Browse the repository at this point in the history
  6. 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.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    b828285 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    b351de0 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    c21a85c View commit details
    Browse the repository at this point in the history
  9. 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.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    c1b0544 View commit details
    Browse the repository at this point in the history
  10. 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.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    0c5ddf3 View commit details
    Browse the repository at this point in the history
  11. 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)
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    71c246c View commit details
    Browse the repository at this point in the history
  12. 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.
    jtojnar committed Sep 20, 2020
    Copy the full SHA
    74a5bb4 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2020

  1. Merge pull request #98304 from jtojnar/updateScript-commit3

    maintainers/scripts/update.nix: Add support for auto-commiting changes
    jtojnar committed Oct 2, 2020
    Copy the full SHA
    74c5472 View commit details
    Browse the repository at this point in the history