John Ericson
7c82213813
Merge branch 'path-info' into ca-drv-exotic
2023-01-14 17:09:58 -05:00
John Ericson
b3d91239ae
Make ValidPathInfo
have plain StorePathSet
references like before
...
This change can wait for another PR.
2023-01-14 16:42:03 -05:00
John Ericson
056cc1c1b9
Merge remote-tracking branch 'upstream/master' into path-info
2023-01-14 14:27:28 -05:00
John Ericson
ce2f91d356
Split OutputsSpec
and ExtendedOutputsSpec
, use the former more
...
`DerivedPath::Built` and `DerivationGoal` were previously using a
regular set with the convention that the empty set means all outputs.
But it is easy to forget about this rule when processing those sets.
Using `OutputSpec` forces us to get it right.
2023-01-11 18:57:18 -05:00
John Ericson
a7c0cff07f
Rename OutputPath
-> ExtendedOutputPath
...
Do this prior to making a new more limitted `OutputPath` we will use in
more places.
2023-01-11 18:55:29 -05:00
John Ericson
a8f45b5e5a
Improve OutputsSpec
slightly
...
A few little changes preparing for the rest.
2023-01-11 18:54:50 -05:00
Théophane Hufschmitt
a3ba80357d
Merge pull request #7543 from obsidiansystems/typed-string-context
...
Parse string context elements properly
2023-01-11 07:09:37 +01:00
Robert Hensing
f58c301112
Merge pull request #7541 from hercules-ci/check-manual-links
...
Check links in the manual
2023-01-10 23:07:38 +01:00
Robert Hensing
fefa3a49ce
doc/manual: Apply suggestions from code review
...
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-01-10 22:30:41 +01:00
Robert Hensing
e79f935718
doc/manual: Fix broken internal links
...
The targets I could find.
2023-01-10 22:30:41 +01:00
Robert Hensing
34a1e0d29b
doc/manual: Introduce @docroot@ as a stable base for includable snippets
...
This way the links are clearly within the manual (ie not absolute paths),
while allowing snippets to reference the documentation root reliably,
regardless of at which base url they're included.
2023-01-10 22:30:41 +01:00
John Ericson
5576d5e987
Parse string context elements properly
...
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 13:10:49 -05:00
John Ericson
da64f026dd
Make clear that StorePathWithOutputs
is a deprecated type
...
- Add a comment
- Put `OutputsSpec` in a different header (First part of #6815 )
- Make a few stray uses of it in new code use `DerivedPath` instead.
2023-01-10 11:27:19 -05:00
Eelco Dolstra
8e923bf4c5
Merge remote-tracking branch 'origin/master' into fix-7417
2023-01-10 14:35:06 +01:00
Will Bush
05b13aff3d
Fix typo in example for builtin function map
2023-01-06 23:04:43 -06:00
John Ericson
81727f85cb
Merge branch 'path-info' into ca-drv-exotic
2023-01-06 15:45:34 -05:00
John Ericson
46e942ff9e
Do big rename to clean up code
...
- `PathReferences` -> `References`
- `PathReferences<StorePath>` -> `StoreReference`
- `references` -> `others`
- `hasSelfReference` -> `self`
And get rid of silly subclassing
2023-01-06 15:36:05 -05:00
John Ericson
7e1cfa97c6
Make derivation primop code for fixed output more concise
2023-01-06 12:52:16 -05:00
John Ericson
848b0832b5
Merge branch 'path-info' into ca-drv-exotic
2023-01-06 12:39:14 -05:00
John Ericson
6a168254ce
Use named field initialization for references
2023-01-06 12:24:20 -05:00
John Ericson
989b8065b4
Merge branch 'path-info' into ca-drv-exotic
2023-01-06 10:56:22 -05:00
John Ericson
e9fc1e4fdb
Merge remote-tracking branch 'upstream/master' into path-info
2023-01-06 10:35:20 -05:00
Eelco Dolstra
c548e35498
Don't use state.positions[noPos]
...
This caused traces 'at «none»:0: (source not available)'.
2023-01-02 20:53:58 +01:00
Eelco Dolstra
6b69652385
Merge remote-tracking branch 'origin/master' into coerce-string
2023-01-02 20:53:39 +01:00
Théophane Hufschmitt
9af16c5f74
Merge pull request #5941 from hercules-ci/optimize-intersectAttrs
...
Optimize intersectAttrs performance
2023-01-02 15:22:38 +01:00
Valentin Gagarin
e0c4a95611
antiquotation -> string interpolation
...
as proposed by @mkaito[1] and @tazjin[2] and discussed with @edolstra
and Nix maintainers
[1]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270076332
[2]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270201979
Co-authored-by: John Ericson <git@JohnEricson.me>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-02 14:38:57 +01:00
Théophane Hufschmitt
fb8fc6fda6
Merge pull request #7478 from hercules-ci/make-sure-initNix-called
...
libstore: Make sure that initNix has been called
2023-01-02 14:12:49 +01:00
Théophane Hufschmitt
b3285c7722
Merge pull request #7351 from NaN-git/fix-mkString
...
cleanup eval.hh/eval.cc
2023-01-02 11:41:52 +01:00
Robert Hensing
336908cf4c
Optimize intersectAttrs performance
...
Always traverse the shortest set.
2022-12-24 14:51:05 +01:00
Robert Hensing
aba6eb348e
libstore: Make sure that initNix has been called
...
Prevent bugs like https://github.com/cachix/cachix/pull/477
2022-12-24 14:39:30 +01:00
Philipp Otterbein
8af839f48c
remove undefined function
2022-12-24 12:19:53 +01:00
Philipp Otterbein
a6e9d9cb2f
remove function makeImmutableStringWithLen
2022-12-24 12:09:06 +01:00
mupdt
a33e45b60b
primops storeDir
test uses settings.nixStore
2022-12-21 07:01:57 -05:00
Eelco Dolstra
bda879170f
EvalState::copyPathToStore(): Return a StorePath
2022-12-20 14:58:39 +01:00
Eelco Dolstra
8332ac6a1d
Merge pull request #7451 from edolstra/abstract-pos
...
Introduce AbstractPos
2022-12-20 12:55:13 +01:00
Solène Rapenne
d0660c6c0b
printMsg replacement by printInfo
...
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-12-16 09:34:22 +01:00
Solène Rapenne
98e01da0b1
warnings: switch to info level when using a saved substituter
2022-12-14 14:11:21 +01:00
Eelco Dolstra
c9b0a85b08
Restore display of source lines for stdin/string inputs
2022-12-13 16:00:44 +01:00
Eelco Dolstra
aea97f07a3
Fix compilation
2022-12-13 15:23:12 +01:00
Eelco Dolstra
1315133b50
Improve cast safety
...
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-12-13 12:38:33 +01:00
Théophane Hufschmitt
6e31d27cba
Merge pull request #6741 from Mindavi/nix-no-gc
...
support building with --enable-gc=no
2022-12-13 10:36:59 +01:00
Eelco Dolstra
b3fdab28a2
Introduce AbstractPos
...
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-13 00:50:43 +01:00
Rick van Schijndel
672ee88231
support building with --enable-gc=no
...
Some minor changes fixing the build without boehm.
Fixes NixOS#6250
2022-12-12 23:31:30 +01:00
John Ericson
7b122d43a4
Fix stack context notes to not rely on order
...
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 18:41:00 +00:00
Eelco Dolstra
fd0ed75118
Support flake references in the old CLI
...
Fixes #7026 .
2022-12-12 14:05:52 +01:00
Eelco Dolstra
ae5f62a894
Move isUri() and resolveUri() out of filetransfer.cc
...
These are purely related to NIX_PATH / -I command line parsing, so put
them in libexpr.
2022-12-12 14:05:35 +01:00
Eelco Dolstra
877ea1dab8
Use get_ptr()
...
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-12-12 12:46:13 +01:00
Eelco Dolstra
f3d1e92856
Update URL
...
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-12 12:37:55 +01:00
Eelco Dolstra
703d863a48
Trivial changes from the lazy-trees branch
2022-12-07 14:06:34 +01:00
Eelco Dolstra
3a8341f57e
Merge pull request #7395 from obsidiansystems/evaluating-to-calling
...
Change "while evaluating <fun>" to "while *calling*" in trace
2022-12-02 15:53:57 +01:00