Repository navigation
Conversation
Member
|
Applied, thanks. |
meditans
pushed a commit
to Ericson2314/nix
that referenced
this pull request
Aug 28, 2020
…velop-merge Ipfs binary cache develop merge
zolodev
pushed a commit
to zolodev/nix
that referenced
this pull request
Jan 1, 2024
Stop using anti patterns
ConnorBaker
pushed a commit
to ConnorBaker/nix
that referenced
this pull request
Jul 25, 2025
…tar-error Improve 'cannot read file from tarball' error
ConnorBaker
added a commit
to ConnorBaker/nix
that referenced
this pull request
May 23, 2026
`FormalsBuilder::has(Symbol)` (parser-time builder backed by `std::vector<Formal>`) and `Formals::has(Symbol)` (post-allocation view backed by `std::span<Formal>`) implemented identical lower-bound lookups against a sorted-by-name range. Lift the lookup into a free `formalsHas(std::span<const Formal>, Symbol)` inline helper next to `Formal`, and have both struct methods forward to it. The `vector`-vs-`span` divergence vanishes because both implicitly convert to `std::span<const Formal>`. Refs candidate NixOS#64. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ConnorBaker
added a commit
to ConnorBaker/nix
that referenced
this pull request
May 23, 2026
…ards Adds **Branch:** lines to the 30 catalog entries that landed as commits on the four cleanup shard branches (libexpr, libstore, libutil, nix-cli) over the previous batch. Per-shard tally (commits on each branch beyond the previously-pushed tip): - libexpr (HEAD 437eea9 -> +10): NixOS#64, NixOS#66, NixOS#68, NixOS#106, NixOS#107, NixOS#109, NixOS#110, NixOS#112, NixOS#196, NixOS#199. Two of the original twelve were skipped on rule grounds: NixOS#194 (LookupPath::Elem flatten) — the candidate framing claimed the types were internal, but search-path.hh ships via install_headers, so collapsing is a public-ABI break, not a trivial flatten; NixOS#197 (one-arg findFile drop) — EvalState::lookupPath is a private member, so the candidate's "have callers pass it explicitly" prescription cannot apply. - libstore (HEAD 5f5b815 -> +12): NixOS#4, NixOS#5, NixOS#6, NixOS#14, NixOS#47, NixOS#82, NixOS#114, NixOS#115, NixOS#119, NixOS#157, NixOS#159, NixOS#165. Several departures from the literal prescription, recorded in each commit body and in the per-candidate Branch line: NixOS#14 lifted only getRemoteFSAccessor with a getLocalNarCacheDir hook (left the trivial getFSAccessor overrides per-class); NixOS#115 extracted only the prelude (lockProfile + findGenerations) since two callers use stateful reverse iteration; NixOS#119 confirmed init's setDefault is a different shape and stayed out; NixOS#159 dropped the assert(!childEOF) defensive check after walking Goal::handleEOF producers; NixOS#165 used option (b) of the prescription (a new derivation-output-fwd.hh) because option (a) would have introduced an include cycle. - libutil (HEAD 784a4f4 -> +3): NixOS#29, NixOS#99, NixOS#117. NixOS#29's commit body caveat (XDG_*_HOME / XDG_CONFIG_DIRS reads moved from per-call to cached) is recorded on the candidate Branch line. - nix-cli (HEAD 48524e0 -> +5): NixOS#24, NixOS#77, NixOS#89, NixOS#91, NixOS#187. NixOS#91 shipped the GcRootNamer + nameForCurrent consolidation but deferred the candidate's addPermRootWithCounter free helper because three behavioural differences across call sites (rootNr increment position, absPath timing, printGCWarning conditions on store2 null) would have either changed user-visible path naming or grown the API. STATUS.md's cleanup-branches table is updated with each shard's expanded Addresses list, and the Status column now distinguishes the already-pushed tips (libfetchers/libflake/libmain remain Pushed since they got no new commits) from the four shards whose new commits are local-only. Push policy is explicit-only — none of the four shard branches has been pushed past its prior tip. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ConnorBaker
added a commit
to ConnorBaker/nix
that referenced
this pull request
May 24, 2026
`FormalsBuilder::has(Symbol)` (parser-time builder backed by `std::vector<Formal>`) and `Formals::has(Symbol)` (post-allocation view backed by `std::span<Formal>`) implemented identical lower-bound lookups against a sorted-by-name range. Lift the lookup into a free `formalsHas(std::span<const Formal>, Symbol)` inline helper next to `Formal`, and have both struct methods forward to it. The `vector`-vs-`span` divergence vanishes because both implicitly convert to `std::span<const Formal>`. Refs candidate NixOS#64. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
roberth
added a commit
to roberth/nix
that referenced
this pull request
Aug 9, 2026
Task NixOS#68 followup to NixOS#64. Audited all strict stateHashAt/After callsites for Derived-trap risk. Found three additional sites in resolveStateHash's cell-chain match plus one via stateHashConverged. resolveStateHash (tracing-replay-evaluator.cc) iterates ArgCell ancestors and computes state hashes for each cell's liveObject Subject. That Subject can be a DerivedSubject — navigation children (from maybeGetAttr on a parent proxy) inherit the parent's ArgCell, and the liveObject at construction time can carry any variant. Strict stateHashAt would trap. Same bug shape as NixOS#64, different callsites. Fixes: - initialStateHash lookup (line 482): stateHashAt → stateHashAtSubject - argSubjectHash / cur in trie-navigation block (498, 500): same - stateHashConverged: if the subject is Derived, delegate to stateHashAtSubject (returns producerQueryHashAt for Derived) — Derived has no own-loop to fold, so converged and polymorphic agree by definition. Prevents the internal stateHashAt call from trapping. Regression test: cb-attr-apply-nested exercises `g.deep.inner.fn 7` against inner `{f}: f { deep = { inner = { fn = a: a*3; }; }; }`. Three levels of DerivedSubject navigation before apply. Also audited all other strict callers and verified safe by construction: - All roots from pathAndRootsFromSubject() (5 callsites) — that function returns only Arg / PostulatedIdempotentRead leaves. - All local Subject{Arg{...}} constructions (4 callsites). - All liveProxies entries (1 callsite) — resolver.liveProxies is asserted to contain only Arg. - All ApplyResultSubject inputs (5 callsites) — the ApplyResult branch of stateHashAt already uses stateHashAtSubject internally on constituents. Tests green (325/0/7 unit + builtins-cache functional). Assisted-by: Claude Code (Claude Opus 4.6-4.7)
roberth
added a commit
to roberth/nix
that referenced
this pull request
Aug 9, 2026
Task NixOS#71. Perf scripts under tests/perf/tracing-cache/ referenced pre-consolidation table names (Asks/Terminals plural, FactSets, Responses). Current schema per tracing-eval-cache.md: - Requests, Queries, Results, RequestSetNodes (atoms + trie) - Ask, Terminal (edge tables, singular) - Ambient adds InnerValueResponse, AmbientAsk, SubjectEvolutionEdge Sweep: FROM Asks → FROM Ask, FROM Terminals → FROM Terminal, FROM FactSets → FROM Requests (FactSets never persisted; the useful cardinality now is Requests), FROM Responses → FROM Results (no Responses table; response bytes not persisted at Env layer). Files: cold-warm.sh, scale.sh, hit-rate.sh, complex-workload.sh, with-reads.sh, inspect.sh, nixpkgs-validate.sh. Also updated cold-warm.sh's "v13" language to "tracing-eval-cache" (consistent with the vocab-cleanup arc). Verified: smoke.sh green, cold-warm.sh green (20-25ms per eval on trivial expr; no meaningful cache benefit at that scale is expected), synthetic.sh correctness green. synthetic.sh's stats subcommand fails ("'stats' is not a recognised command") — that's the removed `nix eval-cache` subcommand, listed under Future Work in tracing-eval-cache-primop.md. Not caused by this session. Scale-testing scripts (scale.sh, scaling-threshold.sh, etc.) require a nixpkgs checkout that isn't available in this sandbox; their SQL is fixed but their execution defers to a benchmarking environment with NIXPKGS set. This session's changes touched hash computations at record and walker sites (NixOS#64 poly-dispatch fix, NixOS#68 cell-chain match fix, subject-id parameter renames). No correctness regression observed in the perf scripts I could run. Assisted-by: Claude Code (Claude Opus 4.6-4.7)
roberth
added a commit
to roberth/nix
that referenced
this pull request
Aug 9, 2026
Task NixOS#72 followup. Adding regression tests for the three sites I "fixed" in NixOS#68 uncovered that I couldn't find any test that exercises those paths with a DerivedSubject subject in the first place. Instrumented builds and manual reproductions (nested-attr apply, arg-with-derived pass, cb-higher-order cold/warm/outer- change) never trigger the code path with a Derived subj — the `live->getSubject()` gate returns nullptr or Arg in every case observed. My NixOS#68 commit message claimed "reachable, bug shape" but the reachability was a code-reading inference, not a triggered observation. The fixes were defensive against a hypothetical class of bug I couldn't demonstrate. Honest position: revert the three poly-dispatch swaps and the stateHashConverged guard, restore the strict stateHashAt, and add an assert on the Derived precondition so if my assumption ever breaks — a new proxy type registers a Derived-subject liveObject at an ArgCell, some future callback shape reaches this loop — we get a clear signal to add the fix back with a real repro to justify it. Kept: task NixOS#64's tracing-evaluator.cc and replay-callback-arg.cc fixes, since those DO have a live reproducer (cb-attr-apply.sh `g.foo 10` pattern triggers the nix::unreachable() without the poly dispatch). Also drops the "nested attr" regression test I added under NixOS#68 — it doesn't exercise the code path it was supposed to. The cb-attr-apply single-level test that ships with NixOS#64 is the real regression coverage. Tests green (325/0/7 unit + builtins-cache functional). Assisted-by: Claude Code (Claude Opus 4.6-4.7)
roberth
added a commit
to roberth/nix
that referenced
this pull request
Aug 9, 2026
The previous commit's message said this test would be dropped (along with the revert of the code paths it was meant to exercise), but I only touched the code and forgot the test file. Fixing that now — dropping the test so the tree matches the narrative in commit f0455b8. The single-level cb-attr-apply test (still in tree, from NixOS#64) provides the real regression coverage for the writer + replay polymorphic-dispatch fix. Assisted-by: Claude Code (Claude Opus 4.6-4.7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will allow nix built with newer kernel headers to be run on older kernels, so for example the binary distribution will work in more cases.