Sergei Zimmerman
ef5fedbc0d
Merge pull request #13936 from xokdvium/empty-list-bindings
...
libexpr: Make constant Values global constants, move out of EvalState
2025-09-10 23:12:20 +00:00
Sergei Zimmerman
5db4b0699c
libexpr: Make constant Values global constants, move out of EvalState
...
These constant Values have no business being in the EvalState in the
first place. The ultimate goal is to get rid of the ugly `getBuiltins`
and its relience (in `createBaseEnv`) on these global constants is getting in the way.
Same idea as in f017f9ddd3 .
Co-authored-by: eldritch horrors <pennae@lix.systems>
2025-09-11 01:53:41 +03:00
Sergei Zimmerman
462b9ac49c
libexpr: Make Value::isa and Value::getStorage private methods
...
This was always intended to be the case, but accidentally left
in the public interface.
2025-09-11 01:52:17 +03:00
Sergei Zimmerman
4df1a3ca76
libexpr: Make emptyBindings a global constant
...
This object is always constant and will never get modified.
Having it as a global (constant) static is much easier and
unclutters the EvalState.
Same idea as in f017f9ddd3 .
Co-authored-by: eldritch horrors <pennae@lix.systems>
2025-09-11 01:51:48 +03:00
Philipp Otterbein
9dbc2cae4f
hashmaps with string keys: add transparent lookups
2025-09-10 23:04:44 +02:00
Philipp Otterbein
9f2b6a1b94
replace more std::unordered_* types by faster boost hash maps
2025-09-10 23:04:44 +02:00
Philipp Otterbein
4f8c50fb77
libexpr: replace std::unordered_* types by faster boost hash maps
2025-09-10 23:04:44 +02:00
John Ericson
c0fd9146d6
Move exportPaths() / importPaths() out of the Store class ( #13959 )
2025-09-10 15:39:20 -04:00
Eelco Dolstra
3898a7343a
Merge pull request #13961 from NyCodeGHG/push-prlsssvmxwvl
...
meson: link to libatomic on powerpc-linux
2025-09-10 19:22:54 +02:00
Marie Ramlow
37eec84bc1
meson: link to libatomic on powerpc-linux
...
Like 32-bit Arm, 32-bit PowerPC also needs linking against libatomic
because it doesn't support some atomic instructions in hardware.
2025-09-10 18:50:35 +02:00
Eelco Dolstra
fe5b669534
Move exportPaths() / importPaths() out of the Store class
2025-09-10 14:22:46 +02:00
Jörg Thalheim
5e46df973f
Merge pull request #13957 from NixOS/drop-old-serve-protocol
...
Remove support for serve protocol version < 5
2025-09-10 13:50:12 +02:00
Eelco Dolstra
9df99e0658
Remove ServeProto::Command::ExportPaths
...
This seems to have been unused since the build-remote.pl removal in February 2017 (27dc76c1a5 ).
2025-09-10 10:57:15 +02:00
Eelco Dolstra
fa048e4383
Remove support for serve protocol < 5
...
This was introduced in August 2018 (2825e05d21 ).
2025-09-10 10:57:15 +02:00
Jörg Thalheim
8c789db05b
Merge pull request #13956 from NixOS/drop-unused-addMultipleToStoreLegacy
...
Drop unused LegacySSHStore::addMultipleToStoreLegacy()
2025-09-10 10:52:05 +02:00
Eelco Dolstra
f8b15bfc7f
Merge pull request #13951 from NixOS/drop-old-daemon-protocol
...
Remove support for worker protocol version < 18
2025-09-10 10:43:48 +02:00
Eelco Dolstra
5013b38df4
Drop unused LegacySSHStore::addMultipleToStoreLegacy()
2025-09-10 10:27:07 +02:00
Eelco Dolstra
247d16a530
Merge pull request #13954 from xokdvium/empty-list-elems-fix
...
libexpr: Fix Value::mkList for empty lists
2025-09-10 10:23:49 +02:00
Eelco Dolstra
d1d3ed6241
Add release note
2025-09-10 10:20:37 +02:00
Jörg Thalheim
7d26bf8cc7
Merge pull request #13906 from obsidiansystems/derivation-builder-simpler
...
More `DerivationBuilder` simplifications
2025-09-10 09:58:07 +02:00
Jörg Thalheim
9c186c35fa
Merge pull request #13932 from NixOS/move-pathInfoCache
...
Reduce false sharing between pathInfoCache and Store
2025-09-10 09:56:46 +02:00
Sergei Zimmerman
2ed2c79721
libexpr: Fix Value::mkList for empty lists
...
This code used to save the pointer to a small
list allocated on the stack to the Value, which
is unintended.
2025-09-10 01:37:39 +03:00
Sergei Zimmerman
3c331b7ef3
Merge pull request #13953 from xokdvium/value-alignment
...
libexpr: Overalign Value to 16 bytes
2025-09-09 20:44:43 +00:00
Sergei Zimmerman
4524235af4
libexpr: Overalign Value to 16 bytes
...
This is necessary to make use of 128 bit atomics on x86_64 [1],
since MOVAPD, MOVAPS, and MOVDQA need memory operands to be 16-byte
aligned. We are not losing anything here, because Value is already 16-byte
wide and Boehm allocates memory in granules that are 16 bytes by default
on 64 bit systems [2].
[1]: https://patchwork.sourceware.org/project/gcc/patch/YhxkfzGEEQ9KHbBC@tucnak/
[2]: 54ac18ccbc/include/gc/gc_tiny_fl.h (L31-L33)
2025-09-09 22:18:52 +03:00
Eelco Dolstra
86d19956f2
Remove WorkerProto::Op::ImportPaths
...
This was obsoleted in May 2016 (538a64e8c3 ).
2025-09-09 15:41:17 +02:00
Eelco Dolstra
4fb61bc5af
Remove WorkerProto::Op::ExportPath
...
This was obsoleted in May 2016 (538a64e8c3 ).
2025-09-09 15:41:12 +02:00
Eelco Dolstra
137a55122c
Remove support for daemon protocol version < 18
...
Version 18 was introduced in November 2016 (4b8f1b0ec0 ).
2025-09-09 15:41:01 +02:00
Eelco Dolstra
7658f00bb1
Merge pull request #13941 from NixOS/dependabot/github_actions/actions/labeler-6
...
build(deps): bump actions/labeler from 5 to 6
2025-09-09 09:37:08 +02:00
Eelco Dolstra
a97c5df47c
Merge pull request #13939 from DeterminateSystems/fix-inputs-from-ignoring-dir-param-upstreaming
...
Pass `dir` in extraAttrs when overriding the registry
2025-09-09 09:36:33 +02:00
Sergei Zimmerman
371623bf0c
Merge pull request #13940 from xokdvium/unbracketed-ipv6
...
libstore: Reallow unbracketed IPv6 addresses in store references
2025-09-08 23:21:34 +00:00
dependabot[bot]
7128abd217
build(deps): bump actions/labeler from 5 to 6
...
Bumps [actions/labeler](https://github.com/actions/labeler ) from 5 to 6.
- [Release notes](https://github.com/actions/labeler/releases )
- [Commits](https://github.com/actions/labeler/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/labeler
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 22:00:58 +00:00
Sergei Zimmerman
7cc654afa9
libstore: Reallow unbracketed IPv6 addresses in store references
...
This implements a special back-compat shim to specifically allow
unbracketed IPv6 addresses in store references. This is something
that is relied upon in the wild and the old parsing logic accepted
both ways (brackets were optional). This patch restores this behavior.
As always, we didn't have any tests for this.
Addresses #13937 .
2025-09-09 00:41:03 +03:00
Cole Helbling
38663fb434
Pass dir in extraAttrs when overriding the registry
...
This is handled similarly in the handler for `--override-flake` in
`MixEvalArgs`.
2025-09-08 09:00:59 +02:00
Cole Helbling
ed6ef7cdf4
Test that using --inputs-from with a flakeref that has a dir works
...
Will not pass until the next commit.
2025-09-08 09:00:59 +02:00
Eelco Dolstra
12db0726e9
Merge pull request #13934 from DeterminateSystems/fix-flake-registry-ignoring-dir-param-upstreaming
...
Fix flake registry ignoring `dir` parameter
2025-09-08 07:50:54 +02:00
Eelco Dolstra
525245181a
Merge pull request #13933 from NixOS/local-store-state
...
LocalStore::State: Put behind a ref to reduce false sharing
2025-09-08 06:22:04 +02:00
Eelco Dolstra
9302ec5e0e
Add comment
2025-09-08 05:57:02 +02:00
Cole Helbling
9c832a08b0
fixup: cached case
...
I couldn't come up with a test that failed before this, but my existing
test still passes so 🤷
2025-09-07 19:40:24 +02:00
Cole Helbling
bccdb95a86
Fix flake registry ignoring dir parameter
...
This broke in e3042f10af .
2025-09-07 19:40:24 +02:00
Cole Helbling
258d41bfb6
Test that dir is propagated from registry entry
2025-09-07 19:40:23 +02:00
Tom Westerhout
dbc235cc62
Generalize recognized git url schemas ( #13925 )
...
Use `parseUrlScheme` instead of manually parsing `url.scheme`.
2025-09-07 15:22:20 +02:00
Eelco Dolstra
df9b3bfba8
Merge pull request #13845 from NixOS/nix-flake-check-build-test
...
Add a test for `nix flake check` building checks
2025-09-07 14:53:19 +02:00
Eelco Dolstra
14c001d613
Add a test for nix flake check building checks
2025-09-07 14:41:40 +02:00
Eelco Dolstra
e791ede495
LocalStore::State: Put behind a ref to reduce false sharing
2025-09-07 14:32:24 +02:00
Eelco Dolstra
a73cf447ac
Reduce false sharing between pathInfoCache and Store
...
`perf c2c` shows a lot of cacheline conflicts between purely read-only
Store methods (like `parseStorePath()`) and the Sync classes. So
allocate pathInfoCache separately to avoid that.
2025-09-07 14:27:38 +02:00
Eelco Dolstra
9ff427d7ba
Merge pull request #13911 from xokdvium/store-uri-daemon-local
...
libstore: Do not normalize daemon -> unix://, local -> local://
2025-09-07 14:10:45 +02:00
Eelco Dolstra
4dd27a292c
Merge pull request #13929 from NixOS/remove-unused
...
Remove unused function setChildSignalMask()
2025-09-07 13:30:09 +02:00
Jörg Thalheim
5ae1b5f88b
Merge pull request #13916 from sinanmohd/fix/develop-interactive-shell
...
nix/develop: pass down the interactive shell to subshells
2025-09-07 10:14:25 +02:00
Eelco Dolstra
a7c6a42344
Merge pull request #13923 from NixOS/fix-multithreaded-chroot-hang
...
Fix hang in enterChroot() draining userNamespaceSync
2025-09-07 09:13:54 +02:00
Eelco Dolstra
f363d958a7
Fix hang in enterChroot() draining userNamespaceSync
...
Calling `drainFD()` will hang if another process has the write side
open, since then the child won't get an EOF. This can happen if we
have multiple threads doing a build, since in that case another thread
may fork a child process that inherits the write side of the first
thread.
We could set O_CLOEXEC on the write side (using pipe2()) but it won't
help here since we don't always do an exec() in the child, e.g. in the
case of builtin builders. (We need a "close-on-fork", not a
"close-on-exec".)
2025-09-07 01:12:44 +02:00