Skip to content

Sync with upstream 2.30.0 #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 337 commits into from
Jul 9, 2025
Merged

Sync with upstream 2.30.0 #135

merged 337 commits into from
Jul 9, 2025

Conversation

edolstra
Copy link
Collaborator

@edolstra edolstra commented Jul 7, 2025

Motivation

Note: this drops #79 (showing the source location of the "double copy" error) because there is no room in Value anymore for position info due to NixOS#13407. We could bring it back by dropping the accessor field in path values (it's not really needed anymore in lazy-trees-v2) but that's a fairly big change.

Context

Mic92 and others added 30 commits May 23, 2025 10:45
Add `json-log-path` setting (revisted)
export/meson: Don't require `-std=c++2a` for -c libraries in `.pc` files
libmain: Catch logger exceptions in `handleExceptions`
Fixes

  error: [json.exception.type_error.302] type must be array, but is string

and other crashes.

Fixes NixOS#13254.
Waiting for the minio unit is apparently not reliable enough, so let's
also wait for the port.
Fix nlohmann error in fromStructuredAttrs()
...and also NIX_STATE_HOME in nix-profile.fish. This is directly
translated from the bash scripts and makes the fish scripts equivalent
in functionality to the bash scripts.

Note that nix-profile.fish checks for NIX_STATE_HOME and
nix-profile-daemon.fish does not, so the two scripts are no longer
identical.
nix-profile{,-daemon}.fish: fix do not source twice
Sometimes the profiler might want to do evaluation (e.g. for getting
derivation names). This is not ideal, but is really necessary
to make the profiler stack traces useful for end users.
This makes the profiler much more useful by actually distiguishing
different derivations being evaluated. This does make the implementation
a bit more convoluted, but I think it's worth it.
libexpr: Include derivation names in the call stack profile
This only touches code comments, class names, documentation,
enumeration names and tests.
Fix various typos in source code
nix-profile{,-daemon}.fish: check for profile in XDG_DATA_HOME
This can never work and leads to a crash bug.
Before we got something like this but only inside the VM test:

 vm-test-run-functional-tests-on-nixos_user> machine # fetchGit.sh: line 286: unexpected EOF while looking for matching `)'

We now try to do not too much in a single line, so that the bash parser does not get confused.
This also seems more readable and better quoted.
Improve errors when we are trying to access a git repository with partial history (+ fix fetchGit on these repos)
The use of a `buildUser` is an implementation detail of some types of
sandboxes that shouldn't exposed.
Having the exact same doc comments isn't very useful/maintainable.
Remove `buildUser` from `DerivationBuilder`
xokdvium and others added 24 commits July 2, 2025 22:27
This shaves off a very significand amount of memory used
for evaluation as well as reduces the GC-managed heap.

Previously the union discriminator (InternalType) was
stored as a separate field in the Value, which takes up
whole 8 bytes due to padding needed for member alignment.
This effectively wasted 7 whole bytes of memory. Instead
of doing that InternalType is instead packed into pointer
alignment niches. As it turns out, there's more than enough
unused bits there for the bit packing to be effective.

See the doxygen comment in the ValueStorage specialization
for more details.

This does not add any performance overhead, even though
we now consistently assert the InternalType in all getters.

This can also be made atomic with a double width compare-and-swap
instruction on x86_64 (CMPXCHG16B instruction) for parallel evaluation.
libexpr: Reduce the size of Value down to 16 bytes (on 64 bit systems)
Git fetcher: Do not consider a null revision (i.e. workdir) to be locked
The use of R"(...)" added a bunch of unnecessary whitespace, e.g.

  error:
                             Unable to start any build;
                             either increase '--max-jobs' or enable remote builds.

                             For more information run 'man nix.conf' and search for '/machines'.

Now we get

  error: Unable to start any build; either increase '--max-jobs' or enable remote builds.

         For more information run 'man nix.conf' and search for '/machines'.
...instead of having a bunch of pass-by-reference arguments.
This is already done by Worker::run().
docker: add docu references & remove duplicate code
Introduce MissingPaths struct for queryMissing() / printMissing()
…aths

fix throwing output paths out of sandbox paths
Mostly in the 2.30 release notes
fix: make setuid tests use new build-dir location /nix/var/nix/builds
@cole-h cole-h added this pull request to the merge queue Jul 9, 2025
Merged via the queue into detsys-main with commit 0638370 Jul 9, 2025
32 checks passed
@cole-h cole-h deleted the sync-2.30.0 branch July 9, 2025 17:13
@cole-h cole-h mentioned this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.