Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-01-10 | Parse string context elements properly | John Ericson | |
Prior to this change, we had a bunch of ad-hoc string manipulation code scattered around. This made it hard to figure out what data model for string contexts is. Now, we still store string contexts most of the time as encoded strings --- I was wary of the performance implications of changing that --- but whenever we parse them we do so only through the `NixStringContextElem::parse` method, which handles all cases. This creates a data type that is very similar to `DerivedPath` but: - Represents the funky `=<drvpath>` case as properly distinct from the others. - Only encodes a single output, no wildcards and no set, for the "built" case. (I would like to deprecate `=<path>`, after which we are in spitting distance of `DerivedPath` and could maybe get away with fewer types, but that is another topic for another day.) | |||
2023-01-10 | Merge remote-tracking branch 'origin/master' into fix-7417 | Eelco Dolstra | |
2023-01-02 | Merge remote-tracking branch 'origin/master' into coerce-string | Eelco Dolstra | |
2023-01-02 | Merge pull request #7351 from NaN-git/fix-mkString | Théophane Hufschmitt | |
cleanup eval.hh/eval.cc | |||
2022-12-24 | remove function makeImmutableStringWithLen | Philipp Otterbein | |
2022-12-20 | EvalState::copyPathToStore(): Return a StorePath | Eelco Dolstra | |
2022-12-20 | Merge pull request #7451 from edolstra/abstract-pos | Eelco Dolstra | |
Introduce AbstractPos | |||
2022-12-13 | Fix compilation | Eelco Dolstra | |
2022-12-13 | Improve cast safety | Eelco Dolstra | |
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | |||
2022-12-13 | Merge pull request #6741 from Mindavi/nix-no-gc | Théophane Hufschmitt | |
support building with --enable-gc=no | |||
2022-12-13 | Introduce AbstractPos | Eelco Dolstra | |
This makes the position object used in exceptions abstract, with a method getSource() to get the source code of the file in which the error originated. This is needed for lazy trees because source files don't necessarily exist in the filesystem, and we don't want to make libutil depend on the InputAccessor type in libfetcher. | |||
2022-12-12 | support building with --enable-gc=no | Rick van Schijndel | |
Some minor changes fixing the build without boehm. Fixes NixOS#6250 | |||
2022-12-12 | Fix stack context notes to not rely on order | John Ericson | |
Make everything be in the form "while ..." (most things were already), and in particular *don't* use other propositions that must go after or before specific "while ..." clauses to make sense. | |||
2022-12-12 | Support flake references in the old CLI | Eelco Dolstra | |
Fixes #7026. | |||
2022-12-12 | Move isUri() and resolveUri() out of filetransfer.cc | Eelco Dolstra | |
These are purely related to NIX_PATH / -I command line parsing, so put them in libexpr. | |||
2022-12-12 | Update URL | Eelco Dolstra | |
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> | |||
2022-12-07 | Trivial changes from the lazy-trees branch | Eelco Dolstra | |
2022-12-02 | Change "while evaluating <fun>" to "while *calling*" in trace | John Ericson | |
The old way was not correct. Here is an example: ``` $ nix-instantiate --eval --expr 'let x = a: throw "asdf"; in x 1' --show-trace error: asdf … while evaluating 'x' at «string»:1:9: 1| let x = a: throw "asdf"; in x 1 | ^ … from call site at «string»:1:29: 1| let x = a: throw "asdf"; in x 1 | ^ ``` and yet also: ``` $ nix-instantiate --eval --expr 'let x = a: throw "asdf"; in x' --show-trace <LAMBDA> ``` Here is the thing: in both cases we are evaluating `x`! Nix is a higher-order languages, and functions are a sort of value. When we write `x = a: ...`, `a: ...` is the expression that `x` is being defined to be, and that is already a value. Therefore, we should *never* get an trace that says "while evaluating `x`", because evaluating `a: ...` is *trival* and nothing happens during it! What is actually happening here is we are applying `x` and evaluating its *body* with arguments substituted for parameters. I think the simplest way to say is just "while *calling* `x`", and so that is what I changed it to. | |||
2022-11-28 | Merge pull request #7313 from yorickvP/nlohmann-everywhere | Eelco Dolstra | |
Replace src/libutil/json.cc with nlohmann | |||
2022-11-25 | Don't use GC_STRNDUP | Eelco Dolstra | |
It calls strlen() on the input (rather than simply copying at most `size` bytes), which can fail if the input is not zero-terminated and is inefficient in any case. Fixes #7347. | |||
2022-11-16 | Replace src/libutil/json.cc with nlohmann json generation | Yorick van Pelt | |
2022-11-04 | Fix printing of eval errors with two format placeholders | Naïm Favier | |
2022-10-25 | Rework error throwing, and test it | Guillaume Maudoux | |
2022-10-23 | Try to please clang with convoluted templates | Guillaume Maudoux | |
2022-10-22 | Introduce an Error builder to tackle complexity | Guillaume Maudoux | |
2022-10-20 | Rollback unneeded throwFrameErrorWithTrace function | Guillaume Maudoux | |
2022-10-20 | Fix context message being printed twice with forceStringNoCtx | Guillaume Maudoux | |
2022-10-17 | Initial frames support | Guillaume Maudoux | |
2022-09-11 | fix remaining fixtures | Guillaume Maudoux | |
2022-09-11 | Cleanup error strings rebase | Guillaume Maudoux | |
2022-09-07 | WIP: broken merge but need a git checkpoint | Guillaume Maudoux | |
2022-08-03 | Fix NIX_COUNT_CALLS=1 | Eelco Dolstra | |
Also, make the JSON writer support std::string_view. Fixes #6857. | |||
2022-07-11 | move ignore-try to EvalSettings | Ben Burdette | |
2022-07-11 | 'tryEval' not 'try clause' | Ben Burdette | |
2022-06-10 | remove unused parameter | Ben Burdette | |
2022-06-02 | print message with exceptions in a try clause | Ben Burdette | |
2022-06-02 | ignore-try flag | Ben Burdette | |
2022-05-30 | Respect the outputSpecified attribute | Eelco Dolstra | |
E.g. 'nix build nixpkgs#libxml2.dev' will build the 'dev' output. | |||
2022-05-25 | back to ref<EvalState> in NixRepl | Ben Burdette | |
2022-05-25 | Style tweaks | Eelco Dolstra | |
2022-05-22 | remove redundant 'debugMode' flag | Ben Burdette | |
2022-05-20 | debugRepl ftn pointer | Ben Burdette | |
2022-05-19 | 'debugMode' | Ben Burdette | |
2022-05-19 | de-const evalState exceptions | Ben Burdette | |
2022-05-19 | Merge branch 'debug-exploratory-PR' into debuggerHook-eval-arg | Ben Burdette | |
2022-05-19 | use an expr->StaticEnv table in evalState | Ben Burdette | |
2022-05-16 | first whack at passing evalState as an arg to debuggerHook. | Ben Burdette | |
2022-05-15 | fix thunk issue | Ben Burdette | |
2022-05-12 | Merge branch 'debugThrow' into debug-exploratory-PR | Ben Burdette | |
2022-05-12 | template-ize debugThrow | Ben Burdette | |