-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Comparing changes
Open a pull request
base repository: NixOS/nixpkgs
base: master
head repository: Profpatsch/nixpkgs
compare: types-simple-standalone
- 14 commits
- 7 files changed
- 1 contributor
Commits on Mar 19, 2018
-
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.
Configuration menu - View commit details
-
Copy full SHA for b75602d - Browse repository at this point
Copy the full SHA b75602dView commit details -
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`.
Configuration menu - View commit details
-
Copy full SHA for 0ec18b2 - Browse repository at this point
Copy the full SHA 0ec18b2View commit details
Commits on Apr 25, 2018
-
lib/types-simple: add lots more (inline) documentation
Especially document the inner workings of the `checkType` function.
Configuration menu - View commit details
-
Copy full SHA for 42d49ec - Browse repository at this point
Copy the full SHA 42d49ecView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 8bc4a9e - Browse repository at this point
Copy the full SHA 8bc4a9eView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 7d647a1 - Browse repository at this point
Copy the full SHA 7d647a1View commit details -
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`).
Configuration menu - View commit details
-
Copy full SHA for 36c916a - Browse repository at this point
Copy the full SHA 36c916aView commit details -
lib/types-simple: assert
reqandoptare disjunctWhen defining a `productOpt` type, `req` and `opt` must not contain the same fields, otherwise the type checking behaviour is undefined.
Configuration menu - View commit details
-
Copy full SHA for 261e673 - Browse repository at this point
Copy the full SHA 261e673View commit details -
Configuration menu - View commit details
-
Copy full SHA for 057b991 - Browse repository at this point
Copy the full SHA 057b991View commit details -
Configuration menu - View commit details
-
Copy full SHA for da5a5f4 - Browse repository at this point
Copy the full SHA da5a5f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff5fce8 - Browse repository at this point
Copy the full SHA ff5fce8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 855125b - Browse repository at this point
Copy the full SHA 855125bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9495e7 - Browse repository at this point
Copy the full SHA d9495e7View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 7a2caa0 - Browse repository at this point
Copy the full SHA 7a2caa0View commit details -
lib/types-simple: remove
namesattribute`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.
Configuration menu - View commit details
-
Copy full SHA for 43a5946 - Browse repository at this point
Copy the full SHA 43a5946View commit details
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 master...types-simple-standalone