Skip to content

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Jul 31, 2025

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.

xokdvium and others added 30 commits July 18, 2025 22:26
* It is tough to contribute to a project that doesn't use a formatter,
* It is extra hard to contribute to a project which has configured the formatter, but ignores it for some files
* Code formatting makes it harder to hide obscure / weird bugs by accident or on purpose,

Let's rip the bandaid off?

Note that PRs currently in flight should be able to be merged relatively easily by applying `clang-format` to their tip prior to merge.

Co-authored-by: Graham Christensen <[email protected]>
…/pr-13108

Rip off the bandaid: Format the codebase with clang-format (backport NixOS#13108)
…-eval-cache

Revert "Use WAL mode for SQLite cache databases"
…f3-4d7b-40f3-bd21-4367a87321a5

Release v3.8.4
Since recently we call isValidPath() a lot from the evaluator,
specifically from
LocalStoreAccessor::requireStoreObject(). Unfortunately, isValidPath()
uses but does not populate the in-memory path info cache; only
queryPathInfo() does that. So isValidPath() is fast *if* we happened
to call queryPathInfo() on the same path previously. This is not the
case when lazy-trees is enabled, so we got a lot of superfluous,
high-latency calls to the daemon (which show up in verbose output as
`performing daemon worker op: 1`).

Similarly, `fetchToStore()` called `isValidPath()` as well.

The fix is to use `queryPathInfo()`, which for one particular eval
reduced the number of daemon calls from 15246 to 2324. This may cause
Nix to fetch some unnecessary information from the daemon, but that
probably doesn't matter much given the high latency.
…/pr-13514

treewide: Fix Meson CPU names for powerpc CPUs (backport NixOS#13514)
This is a workaround for NixOS#13515
(opening the SQLite DB randomly taking a couple of seconds on ZFS).
(cherry picked from commit 6896761)
@github-actions github-actions bot temporarily deployed to production September 8, 2025 16:58 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 8, 2025 16:58 Inactive
…ails

Previously we always tried to substitute first (by calling
`ensurePath()`). This wasn't a problem before lazy trees, because we
always end up copying to the store anyway. But that's not the case
with lazy trees. So frequently we ended up substituting an input that
we had already fetched.

This showed up as

  fetching source from https://cache.nixos.org

for inputs that you could swear Nix had already fetched just
before. This was especially a problem for Nixpkgs inputs, since many
Nixpkgs revisions are in cache.nixos.org.

Note that this could also be a problem without lazy trees, e.g. with a
local input (like a Nixpkgs clone) that happens to be in the binary
cache.

So we now only try substitution as a last resort, if we cannot fetch
the input normally.
…failure-only

Only try to substitute input if fetching from its original location fails
@github-actions github-actions bot temporarily deployed to pull request September 12, 2025 15:16 Inactive
@github-actions github-actions bot temporarily deployed to production September 12, 2025 15:16 Inactive
@github-actions github-actions bot temporarily deployed to production September 12, 2025 17:04 Inactive
@github-actions github-actions bot temporarily deployed to pull request September 12, 2025 17:04 Inactive
They're currently incompatible and it's not obvious how to fix this,
so let's just disable parallel eval when the debugger is enabled.
Disable parallel eval if the debugger is enabled
In particular, this makes Ctrl-C work in case of infinite recursion.
@github-actions github-actions bot temporarily deployed to pull request September 17, 2025 17:29 Inactive
@github-actions github-actions bot temporarily deployed to production September 17, 2025 17:29 Inactive
edolstra and others added 3 commits September 17, 2025 19:36
…tible

Make threads waiting on thunks interruptible
With the migration to /nix/var/nix/builds we now have failing builds
when the derivation name is too long.
This change removes the derivation name from the temporary build to have
a predictable prefix length:

Also see: NixOS/infra#764
for context.

(cherry picked from commit 725a2f3)
(cherry picked from commit 7c3fd50)
@github-actions github-actions bot temporarily deployed to pull request September 17, 2025 18:13 Inactive
@github-actions github-actions bot temporarily deployed to production September 17, 2025 18:13 Inactive
don't include derivation name in temporary build directories
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.

7 participants