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: dfaa313d437d
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 7102388834f1
Choose a head ref
  • 9 commits
  • 9 files changed
  • 2 contributors

Commits on Oct 22, 2020

  1. Copy the full SHA
    4d4682c View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    5aa2a98 View commit details
    Browse the repository at this point in the history
  3. lib: Use Nix's static scope checking, fix error message, optimize

    Nix can perform static scope checking, but whenever code is inside
    a `with` expression, the analysis breaks down, because it can't
    know statically what's in the attribute set whose attributes were
    brought into scope. In those cases, Nix has to assume that
    everything works out.
    
    Except it doesnt. Removing `with` from lib/ revealed an undefined
    variable in an error message.
    
    If that doesn't convince you that we're better off without `with`,
    I can tell you that this PR results in a 3% evaluation performance
    improvement because Nix can look up local variables by index.
    This adds up with applications like the module system.
    
    Furthermore, removing `with` makes the binding site of each
    variable obvious, which helps with comprehension.
    roberth committed Oct 22, 2020
    Copy the full SHA
    afa6c51 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    c9f8f66 View commit details
    Browse the repository at this point in the history
  5. lib: Add lib.isFloat for consistency

    Unlike the other three is* functions in lib.trivial, it was only
    available as lib.trivial.isFloat
    roberth committed Oct 22, 2020
    Copy the full SHA
    9a4bed1 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    f8ab5fc View commit details
    Browse the repository at this point in the history
  7. lib: Add lib.trace for consistency

    This puts it among the trace* family of functions derived from it.
    roberth committed Oct 22, 2020
    Copy the full SHA
    fe4a58e View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    a4019a4 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2020

  1. Merge pull request #101139 from roberth/lib-use-static-scope-checking

    lib: Use Nix's static scope checking, fix error message, optimize
    roberth committed Oct 26, 2020
    Copy the full SHA
    7102388 View commit details
    Browse the repository at this point in the history