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: e93767d5a080
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 1484e1acfeee
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 23, 2020

  1. cleanSourceWith: don't use baseNameOf

    Currently, not providing `name` to `cleanSourceWith` will use the name
    of the imported directory. However, a common case is for this to be the
    top level of some repository. In that case, the name will be the name of
    the checkout on the current machine, which is not necessarily
    reproducible across different settings, and can lead to e.g. cache
    misses in CI.
    
    This is documented in the comment on `cleanSourceWith`, but this does
    not stop it being a subtle trap for users.
    
    There are different tradeoffs in each case:
    
    1. If `cleanSourceWith` defaults to `"source"`, then we may end up with a
    user not knowing what directory a source store path corresponds to.
    However, it being called "unnamed" may give them a clue that there is a
    way for them to name it, and lead them to the definition of the
    function, which has a clear `name` parameter.
    
    2. If `cleanSoureWith` defaults to the directory name, then a user may face
    occasional loss of caching, which is hard to notice, and hard to track
    down. Tracking it down likely requires use of more advanced tools like
    `nix-diff`, and reading the source of a lot of nix code.
    
    I think the downside of the status quo is worse.
    
    This is really another iteration of
    NixOS/nix#1305: that led to adding the `name`
    argument in the first place, this just makes us use a better default
    `name`.
    michaelpj committed Mar 23, 2020
    Copy the full SHA
    07f363f View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2020

  1. Merge pull request #83201 from michaelpj/imp/sources-unnamed

    cleanSourceWith: don't use baseNameOf
    roberth committed Mar 24, 2020
    Copy the full SHA
    1484e1a View commit details
    Browse the repository at this point in the history