Repository navigation
Conversation
|
Why would we want this? Why not just not set outputs to null? If it's about giving a better error message, then you should do something like `if ! isList outputs then throw ... else ...". |
|
For the same reason we have Note that the specific case is https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/manual-config.nix#L77 . We could of course just do |
|
The only reason for __ignoreNulls was to introduce a change to the derivation hashing scheme (namely, that nulls are equivalent to not setting an attribute) in a backward-compatible way. It's not intended to imply some sort of universal overloading that nulls are acceptable values everywhere. The type of So yes, you should set it to |
|
Why is it desirable for |
|
Because null is only intended to be equivalent to not setting an attribute for the purpose of hash computation. |
|
Alright |
….3.2 chore(deps): bump sphinx from 4.3.1 to 4.3.2
This is terrible UX, and frankly an eval failure should be a cache invalidation anyway. This removes the CachedEvalError type entirely. Fixes NixOS#223. Change-Id: I91f8003eabd0ea45003024e96d1de3c7ae8e49d8
It already works for `dependencies` and `build-dependencies`, just seems like an oversight. I ran `cargo test`, seems to pass. Fixes NixOS#223.
…p amends Three new catalog candidates filed during the post-audit follow-up sweep: - NixOS#222 (libmain → 11-legacy-cli.md): --max-freed parses as int64_t then std::max-clamps before assigning to uint64_t. Implemented on vibe-coding/cleanup/libmain: both call sites switched to getIntArg<uint64_t> with the clamp dropped. User-visible behaviour change: --max-freed -1 now errors at parse time instead of silently disabling, and N above int64_t::max() is now honoured up to uint64_t::max(). - NixOS#223 (libmain → 11-legacy-cli.md): getIntArg<N> is now a 5-line wrapper; inlining at the two call sites would let it be deleted from shared.hh. Filed but NOT implemented — the inline form is 3 lines per site vs 1 line currently, and the candidate body itself notes "stylistic regression, not behavioural". - NixOS#224 (libutil → 12-libutil-libstore-core-extras.md): NarIndexer::createMember computes path depth via `for (auto _ : path) (void) _; ++level;` instead of any idiomatic accessor. Filed but NOT implemented — the cleaner factor is to add `CanonPath::numSegments()` first; deferred to a future libutil batch where canon-path.hh is already being touched. Plus four code/doc follow-up amends folded into existing commits: - libexpr NixOS#214 (eval.hh): added "// Only instantiated in eval.cc" note above the mkFailedFromCurrentException declaration to prevent future contributors from adding cross-TU callers that would link-fail. - libstore NixOS#135 (unix/user-lock.cc): nested UidRange inside AutoUserLock since it is the only user; eliminates a file-scope type for a struct used by exactly one method. - libstore NixOS#221 (configuration.hh): expanded the parseSettingTokens docstring to document why the libutil specialisations (Strings/StringSet/list<path>/set<path>/set<ExperimentalFeature>) were intentionally not migrated, so future readers don't try to "finish the job". - libutil NixOS#163 (file-descriptor.hh): added a "calling-style note" to the PipeOptions docstring documenting that pipe.create({}) is intentionally NOT recommended due to the latent ambiguity with the existing arity-asymmetric overload's default arg. INVENTORY.md catalog total updated 221+44 → 224+44. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ild-dir reconfigure After the post-audit follow-up sweep landed: - NixOS#222 implemented on libmain (a7bb49f): --max-freed parses as uint64_t directly, std::max clamp dropped. - NixOS#223 filed but not implemented (inline tradeoff documented). - NixOS#224 filed but not implemented (depends on a CanonPath accessor that hasn't been added). - Four code/doc amends folded into existing commits: libexpr NixOS#214 instantiation note, libstore NixOS#135 UidRange nested in AutoUserLock, libstore NixOS#221 doxygen scope expansion, libutil NixOS#163 PipeOptions ambiguity note. - Plus a load-bearing protocol fix: libmain build dir was misconfigured against master source per the worktree-source- drift gotcha in HANDOFF.md; reconfigured against the worktree so all subsequent builds compile the actual cleanup tree. Final tip SHAs: libexpr c9401c3, libfetchers dc5dc00, libflake fd75c93, libmain a7bb49f, libstore e565149, libutil e3f2287, nix-cli ef32368. All seven branches Local-only past their pushed tips; push policy explicit-only. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Landed 18 commits across 6 shards covering 20 candidates: - libstore +8 (NixOS#1+NixOS#3, NixOS#7, NixOS#11, NixOS#55, NixOS#59, NixOS#101, NixOS#153, NixOS#185) - libexpr +3 covering 4 (NixOS#192, NixOS#202+NixOS#203 folded, NixOS#204) - libutil +4 (NixOS#97, NixOS#124, NixOS#167, NixOS#224) - libfetchers +1 (NixOS#53) - libflake +1 (NixOS#133, rename only — deviation documented) - libmain +1 (NixOS#223; NixOS#222 already on branch) Skipped: NixOS#76 (libc++ in dev shell lacks <generator>) and several RED-bucket items. 4-pass review chain: Pass A (parallel adversarial) caught 2 BLOCKERS — libstore NixOS#153 over-broad rename corrupted the external-builders JSON wire-key, and libutil NixOS#97 dropped the inline allowed-name list breaking eval-fail-hashString-2.err.exp. Both fixed via amend; parseEnumOrThrow extended to render 'a', 'b', or 'c' with Oxford comma + suggestions. Pass B (/code-review) found no blockers; substantive amends include libexpr's callFunction hot-path now reading a ctor-frozen profilerHooks snapshot, libstore's tryUpperFallLower returning std::pair<R, bool>, libutil completing three migration gaps. Pass C found one real clang-tidy error (parse-enum.hh missing configuration.hh include); other shards only show the 5 known pre-existing master errors. Pass D nix build -L . green on all six shards. New catalog candidates surfaced by review: NixOS#225 (libfetchers getUserRegistry/getSystemRegistry/getGlobalRegistry share NixOS#53's first-call-wins shape on the hot path), NixOS#226 (showCompressionAlgo vs printHashAlgo enum-rendering inconsistency). Catalog total: 226 + 44. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The original complaint — that getIntArg<N> had become a 5-line wrapper that did its own iterator advance, end-check, and parse — was real: after NixOS#128 dropped the bool allowUnit parameter, the body was just a near-duplicate of the free getArg(opt, i, end) function followed by a call to string2IntWithUnitPrefix<N>(*i). Delegate the advance-and-error half to getArg, which already does exactly that. Body collapses to one line; semantics are preserved (same UsageError wording, same end-check timing, same iterator state after the call). The function template stays in the shipped libmain/include/nix/main/shared.hh so external callers (Hydra, Lix) continue to see the same signature. The candidate body warned about a "stylistic regression" — re-spelling the "requires an argument" error at each call site if the wrapper were inlined. Keeping getIntArg as a wrapper avoids that regression entirely; the two in-tree call sites in nix-store/nix-store.cc::opGC and nix-collect-garbage/nix-collect-garbage.cc::main_nix_collect_garbage keep their getIntArg<uint64_t>(...) form unchanged. Refs candidate NixOS#223. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
opInstall's --priority arm hand-rolled the same advance + end-check + "requires an argument" throw + parse pattern that getArg encapsulates. After libmain NixOS#223 turned getIntArg<N> into a one-line wrapper around getArg(opt, i, end) + string2IntWithUnitPrefix<N>, this was the only remaining in-tree CLI-arg-parse site doing the work inline. The site can't use getIntArg directly because getIntArg parses with string2IntWithUnitPrefix<N>, which accepts K/M/G suffixes that don't make sense for a profile priority. opInstall wants string2Int (no unit prefix) with explicit nullopt-handling for the "couldn't parse as int" diagnostic. Replace the inline end-check + iterator advance + UsageError throw with a single getArg(arg, i, opFlags.end()) call; keep the string2Int<int>(...) parse + nullopt-check unchanged. Three lines become one; the diagnostic for "missing argument" now matches the canonical "'%1%' requires an argument" wording getArg emits (which is what the inline code was throwing anyway). Refs candidate NixOS#231. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
See http://thread.gmane.org/gmane.linux.distributions.nixos/12376