Théophane Hufschmitt
de101417eb
Merge pull request #10305 from hercules-ci/addErrorContext-is-great
...
Always print addErrorContext
2024-03-29 09:10:09 +01:00
Robert Hensing
ef26133df3
Merge pull request #10337 from Cyclic4179/patch-1
...
`nix shell` shebang: support O'Caml comments
2024-03-28 19:54:03 +01:00
José Luis Lafuente
061140fc8f
C API: remove unused argument
2024-03-28 19:38:12 +01:00
José Luis Lafuente
925a8fda6e
C API: Use new ListBuilder helper
...
See https://github.com/NixOS/nix/pull/10251
2024-03-28 19:02:01 +01:00
José Luis Lafuente
c57de60522
C API: Keep the structure flat
...
See https://github.com/NixOS/nix/pull/10329
2024-03-28 19:00:04 +01:00
José Luis Lafuente
d96b52bd8b
C api: nix_export_std_string -> nix_observe_string
2024-03-28 10:52:02 +01:00
José Luis Lafuente
940ff6535c
C API: update libstore tests
2024-03-28 10:52:02 +01:00
José Luis Lafuente
1a574c6c60
C API: refactor ListBuilder
2024-03-28 10:52:01 +01:00
José Luis Lafuente
34d15e8f2f
C API: rename nix_store_build -> nix_store_realise
2024-03-28 10:52:01 +01:00
José Luis Lafuente
1093ab64a2
C API: add more tests
2024-03-28 10:52:01 +01:00
José Luis Lafuente
2e1dbbe307
C API: refactor test support
2024-03-28 10:52:01 +01:00
José Luis Lafuente
c49b88b066
C API: update docs based on PR feedback
2024-03-28 10:52:01 +01:00
José Luis Lafuente
7c602d9f01
C API: add tests for external values
2024-03-28 10:52:01 +01:00
José Luis Lafuente
6c231dcf68
C API: disable test
2024-03-28 10:52:00 +01:00
José Luis Lafuente
b9cd24a4a8
C API: fix api_expr tests
2024-03-28 10:52:00 +01:00
José Luis Lafuente
24c8f6864d
C API: if store doesn't have a version, return an empty string
2024-03-28 10:52:00 +01:00
José Luis Lafuente
dfdb90dc8e
C API: Consolidate initializers
2024-03-28 10:52:00 +01:00
José Luis Lafuente
51ff547d9a
C API: add more tests to nix_api_expr
2024-03-28 10:52:00 +01:00
José Luis Lafuente
d5ec1d0617
C API: nix_store_open, check for empty strings
2024-03-28 10:51:59 +01:00
José Luis Lafuente
535694122e
C API: rename State to EvalState
2024-03-28 10:51:59 +01:00
José Luis Lafuente
ac3a9c6605
C API: add nix_api_expr tests
2024-03-28 10:51:48 +01:00
José Luis Lafuente
41f1669dea
C API: add tests for libutil and libstore
2024-03-28 10:50:02 +01:00
Yorick van Pelt
e642bbc2a7
C API: move to src/lib*/c/
2024-03-28 10:46:39 +01:00
Yorick van Pelt
c48b9b8a83
nix_api_util: tests
2024-03-28 10:39:07 +01:00
Tharun T
52359ca00a
move test to correct file
2024-03-28 02:20:33 +05:30
John Ericson
77205b2042
Allow for ergnomically putting Unix-only files in subdirs by creating INLCUDE_$(pkg)
vars
...
Separate platform-specific files will allow avoiding a lot of CPP.
2024-03-27 12:01:59 -04:00
Robert Hensing
981c309057
Remove trace item: while calling the 'addErrorContext' builtin
2024-03-27 16:28:04 +01:00
Robert Hensing
bebacc475c
Always print addErrorContext traces
2024-03-27 16:28:04 +01:00
Cyclic4179
9f7b2b93ce
fixup! add flakes.sh test for shebang supported types of comments
2024-03-27 15:03:54 +01:00
Cyclic4179
6227cd06bd
add flakes.sh test for shebang supported types of comments
2024-03-27 14:55:02 +01:00
Théophane Hufschmitt
6c10cc0eda
Merge pull request #10312 from hercules-ci/add-build-dir
...
Add build-dir setting
2024-03-26 13:51:50 +01:00
Théophane Hufschmitt
1394d4e9c5
Merge pull request #10306 from hercules-ci/baseNameOf
...
Test and document `builtins.baseNameOf`, improve internal `baseNameOf()`
2024-03-26 09:59:27 +01:00
Robert Hensing
8b16cced18
Add build-dir setting
2024-03-25 19:48:59 +01:00
Robert Hensing
6221770c9d
tests/functional: Add count()
2024-03-25 19:46:34 +01:00
Eelco Dolstra
8c0590fa32
Never update values after setting the type
...
Thunks are now overwritten by a helper function
`Value::finishValue(newType, payload)` (where `payload` is the
original anonymous union inside `Value`). This helps to ensure we
never update a value elsewhere, since that would be incompatible with
parallel evaluation (i.e. after a value has transitioned from being a
thunk to being a non-thunk, it should be immutable).
There were two places where this happened: `Value::mkString()` and
`ExprAttrs::eval()`.
This PR also adds a bunch of accessor functions for value contents,
like `Value::integer()` to access the integer field in the union.
2024-03-25 19:21:25 +01:00
Tharun T
53c15336b0
derivation output selection test
2024-03-25 07:43:31 +05:30
John Ericson
2a44b11f55
Fix git-hashing/simple.sh
...
I realized it was checking NAR hashes before of added objects, which
makes little sense --- we don't really care about ancillary NAR hashes.
Now, the bottom `nix store add` tests compare the CA field with a git
hash to hashes calculated by Git. This matches top `nix hash path` ones
in using git as a source of truth.
2024-03-23 22:08:52 -04:00
Robert Hensing
9884018dfa
baseNameOf(): Remove all trailing slashes
2024-03-24 01:38:22 +01:00
Robert Hensing
175afc7106
Test and document builtins.baseNameOf
2024-03-24 01:26:17 +01:00
detroyejr
b11dd58fe4
flakes: test to ensure we get an error if --file isn't used
2024-03-22 21:58:39 -04:00
Robert Hensing
d16d7f5f31
Merge pull request #10251 from edolstra/list-builder
...
Add a ListBuilder helper for constructing list values
2024-03-20 22:30:38 +01:00
John Ericson
18945e3f44
Merge branch 'master' into overlayfs-store
2024-03-18 16:43:33 -04:00
Eelco Dolstra
fecff520d7
Add a ListBuilder helper for constructing list values
...
Previously, `state.mkList()` would set the type of the value to tList
and allocate the list vector, but it would not initialize the values
in the list. This has two problems:
* If an exception occurs, the list is left in an undefined state.
* More importantly, for multithreaded evaluation, if a value
transitions from thunk to non-thunk, it should be final (i.e. other
threads should be able to access the value safely).
To address this, there now is a `ListBuilder` class (analogous to
`BindingsBuilder`) to build the list vector prior to the call to
`Value::mkList()`. Typical usage:
auto list = state.buildList(size);
for (auto & v : list)
v = ... set value ...;
vRes.mkList(list);
2024-03-15 18:26:37 +01:00
Bouke van der Bijl
60c2d15f5a
git fetcher: use resolveRef for getting revision of reference
...
* Add regression test
* Fix 'no repo' test so it doesn't succeed if the data is still in cache
* Use git_revparse_single inside git-utils instead of reimplementing the same logic.
2024-03-14 14:04:51 +01:00
Eelco Dolstra
c1811c1eba
Fix GitHub test
...
Cherry-picked from 03618bb85f609a9b2f3cd6b82628a95b425e3b72.
2024-03-10 13:38:38 +01:00
tomberek
a200ee6bf7
Merge pull request #9874 from pennae/error-reports
...
improve error reports somewhat
2024-03-08 10:51:14 -05:00
Eelco Dolstra
ae2bd460a8
Merge pull request #10166 from bobvanderlinden/profile-regex-all
...
profile: introduce --regex and --all
2024-03-08 15:59:24 +01:00
Bob van der Linden
91f068c193
profile: make --all exclusive
2024-03-07 21:07:03 +01:00
Bob van der Linden
7a4d5e89d3
profile: add --all option to match any package
2024-03-07 21:07:03 +01:00
Bob van der Linden
fb391ebc77
profile: add tests for not matching any packages
2024-03-07 21:07:03 +01:00