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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Profpatsch/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: types-simple-standalone
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 14 commits
  • 7 files changed
  • 1 contributor

Commits on Mar 19, 2018

  1. lib: add types-simple

    A simple type system to check plain nix values.
    Please see the module comments for further explanations.
    
    Will be used to correct the buggy meta-field checks and help in sanity-checking
    other parts of nixpkgs.
    Profpatsch committed Mar 19, 2018
    Configuration menu
    Copy the full SHA
    b75602d View commit details
    Browse the repository at this point in the history
  2. lib/types-simple: add productOpt and defaults

    productOpt: a product type with the possibility for optional fields
    defaults: generate (semi-arbitrary) default values for a given type
    
    In preparation for the rewrite of `check-meta.nix`.
    Profpatsch committed Mar 19, 2018
    Configuration menu
    Copy the full SHA
    0ec18b2 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2018

  1. lib/types-simple: add lots more (inline) documentation

    Especially document the inner workings of the `checkType` function.
    Profpatsch committed Apr 25, 2018
    Configuration menu
    Copy the full SHA
    42d49ec View commit details
    Browse the repository at this point in the history
  2. lib/types-simple: remove defaults & small improvement

    `defaults` originally only was a crutch to make products accept optional
    attributes shallowly, but that has been replaced by `productOpt`, so we don’t
    need it anymore.
    
    Also a few other changes based on input by @aszlig.
    Profpatsch committed Apr 25, 2018
    Configuration menu
    Copy the full SHA
    8bc4a9e View commit details
    Browse the repository at this point in the history
  3. lib/types-simple: add restrict

    `restrict` is able to restrict the inhabitants of a type, meaning only a subset
    of a type is allowed, the new type is “smaller”, but still gives nice type
    errors if a nested value has the wrong type.
    
    See the tests for some usage examples.
    Profpatsch committed Apr 25, 2018
    Configuration menu
    Copy the full SHA
    7d647a1 View commit details
    Browse the repository at this point in the history
  4. lib/types-simple: enable “open” products

    Open products can have additional fields in the actual value, which always
    succeed in the type check (effectively default to `any`).
    Profpatsch committed Apr 25, 2018
    Configuration menu
    Copy the full SHA
    36c916a View commit details
    Browse the repository at this point in the history
  5. lib/types-simple: assert req and opt are disjunct

    When defining a `productOpt` type, `req` and `opt` must not contain the same
    fields, otherwise the type checking behaviour is undefined.
    Profpatsch committed Apr 25, 2018
    Configuration menu
    Copy the full SHA
    261e673 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    057b991 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    da5a5f4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ff5fce8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    855125b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d9495e7 View commit details
    Browse the repository at this point in the history
  11. stdenv: add a types-simple type for derivations

    This can be used to check the fields of derivations (according to the
    descriptions in the nix manual) and will also recurse into the meta fields.
    Profpatsch committed Apr 25, 2018
    Configuration menu
    Copy the full SHA
    7a2caa0 View commit details
    Browse the repository at this point in the history
  12. lib/types-simple: remove names attribute

    `names` was originally intended to be able to match on the specific instance of
    a type, but it breaks the abstraction in a way.
    Since the function that used it was removed, we can remove the name attributes
    as well.
    Profpatsch committed Apr 25, 2018
    Configuration menu
    Copy the full SHA
    43a5946 View commit details
    Browse the repository at this point in the history
Loading