Skip to content

Upstream tracking - #165

Draft
grahamc wants to merge 4164 commits into
2.34-maintenancefrom
main
Draft

Upstream tracking#165
grahamc wants to merge 4164 commits into
2.34-maintenancefrom
main

Conversation

@grahamc

@grahamc grahamc commented Jul 31, 2025

Copy link
Copy Markdown
Member

Motivation

Not intended to be merged directly. This PR is a convenience to show the diff between upstream Nix and Determinate Nix (the main branch).

Continuation of #4.

@grahamc
grahamc requested a review from edolstra as a code owner July 31, 2025 17:14
@github-actions
github-actions Bot temporarily deployed to production July 31, 2025 17:14 Inactive
@DeterminateSystems DeterminateSystems locked as off-topic and limited conversation to collaborators Jul 31, 2025
@github-actions
github-actions Bot temporarily deployed to pull request July 31, 2025 18:20 Inactive
@github-actions
github-actions Bot temporarily deployed to production July 31, 2025 18:21 Inactive
@cole-h
cole-h marked this pull request as draft August 1, 2025 14:26
@github-actions
github-actions Bot temporarily deployed to pull request August 4, 2025 22:15 Inactive
@github-actions
github-actions Bot temporarily deployed to commit August 4, 2025 22:15 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 4, 2025 22:15 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 5, 2025 14:25 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 5, 2025 14:25 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 7, 2025 15:58 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 7, 2025 15:58 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 7, 2025 23:01 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 7, 2025 23:02 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 10, 2025 16:36 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 10, 2025 16:36 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 10, 2025 20:06 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 10, 2025 20:06 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 19, 2025 15:04 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 19, 2025 15:04 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 20, 2025 10:41 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 20, 2025 10:41 Inactive
@github-actions
github-actions Bot temporarily deployed to commit August 20, 2025 10:41 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 25, 2025 16:07 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 25, 2025 16:07 Inactive
@github-actions
github-actions Bot temporarily deployed to production August 25, 2025 16:14 Inactive
edolstra and others added 30 commits August 17, 2026 17:09
…lock"

This reverts commits 41e2fab, 9934b5f.

If multiple processes start the migration at the same time, and one of
them holds the global lock open indefinitely (e.g. magic-nix-cache or
a `nix repl`), then the other processes will hang indefinitly waiting
for an exclusive lock that isn't actually needed anymore.
…ma migration

We should never use SQLite::exec() inside a transaction, because it
catches SQLiteBusy exceptions and retries the statement, which will
just fail again. It's the entire transaction that must be retried.

In addition, we now check inside the transaction whether the migration
has already been done. Thus, on a retry, we will notice that another
process has already done the migration.
Fix "waiting for exclusive access" hangs during schema migrations
`-Dmimalloc=disabled` is not accepted but `nix:mimalloc` seems to be.

(cherry picked from commit ea5d36e)
(cherry picked from commit 1e4f387)
Fix NixOS#16307

`hashDerivationModulo` built the intermediate `inputs2` map with
`insert_or_assign`, so on such a collision the second entry silently
dropped the first entry's output names. Merge the output-name sets
instead.

This changes computed store path of any derivation that hits the
collision. But that's good, we're undoing the bug.

Two *distinct* input derivations can share a hash modulo --- that is the
whole point of the modulo, e.g. they differ only in the provenance of a
fixed-output input. Usually this comes up *temporally*, e.g. between two
different versions of Nixpkgs that have different curls used in
`fetchurl` derivations, but it can also arise *spatially*.

Assisted-by: Claude Code (Claude Opus 5)
(cherry picked from commit b26204b)
(cherry picked from commit 76c15a2)
…542-0260-436f-a7e1-c6905130b0ed

Release v3.22.1
The fallback makes `nix copy` very slow when copying to a older daemon
that doesn't support the AddTempRoots worker protocol operation. Of
course, this is less correct, but it's the behaviour we've had for
years prior to 7beda55.

This reverts commit 334f160.
…ions

This creates GC-rooted symlinks for the store paths in the string
context of the result of `nix eval` (with --raw or --json). Unlike
`nix build --out-link`, derivations are linked to their .drv files
rather than their outputs, since nothing was built.

Assisted-by: Claude Fable 5 <noreply@anthropic.com>
upgradeDBSchema(): Don't show "executing migration" messages on a new store
The cache in CachingFilteringSourceAccessor was a plain std::map
mutated on every cache miss. With parallel evaluation, multiple eval
threads can call isAllowed() on the same accessor concurrently (e.g.
via builtins.readDir on a Git input fetched with exportIgnore), racing
find() against emplace() and corrupting the tree. This caused
segfaults like DETERMINATE-NIX-8W (a SEGV_MAPERR at offset 0x10, i.e.
reading _M_left of a null red-black tree node).

Use boost::concurrent_flat_map instead, following the same pattern as
CachingSourceAccessor.

Assisted-by: Claude Fable 5 <noreply@anthropic.com>
Remove fallback behaviour for RemoteStore::addTempRoots()
…g-source-accessor

CachingFilteringSourceAccessor: Make the isAllowed() cache thread-safe
nix eval: Add --drv-link flag to create symlinks to top-level derivations
…d52-93b9-4419-9060-8a0e0eb8c8c1

Release v3.22.2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants