Repository navigation
Conversation
|
cc @edolstra |
|
Oh, "the other PR" is #22 for those who haven't been following this work. |
|
@edolstra ping |
|
Any chance of this making it into 1.1? |
|
@edolstra ping :) |
|
@edolstra I've rebased onto latest master. I'll be doing more work on top of this branch, so future pull requests may assume this was merged. |
…to get one meta attribute
…t to get the description
…yError when forceValue'd
…ors must be assumed not to be prebuilt
…h, and meta attributes
None of the cases that turned handling off didn't have readOnly set anyway.
…tion in read-only mode, we shouldn't throw an exception just because we're trying to check for substitutable paths
|
Rebased, and I'll keep that up if more changes are pushed to master. |
There was a problem hiding this comment.
What's the reason for queryName() and querySystem()?
There was a problem hiding this comment.
So getDerivation() doesn't need to evaluate any of the derivations attributes, and to allow graceful handling of the case where name or system depend on an import from derivation in the future
|
Giving up on this getting merged |
|
@edolstra can we reopen this? |
|
@shlevy thanks for doing this! Could you describe what this is doing to make it easier for someone to pick up and revive it? For example, how would I test that it's behaving as expected? |
We're not going to use it. Fixes: NixOS#31 Change-Id: Ib17a2eb6cae1ecbbf9ad1062e576ba6107a3c13b
Sync with upstream 2.28.2
Adds a verified comparison section answering: how does our approach compare to DetSys lazy-trees, what are the perf characteristics of each, and have we obviated the tecnix builtins? Findings (all checked against ~/ext-sources/nix-src @ main and ~/ext-sources/tecnix @ tecnix-gcs, file:line cited): - Lineage: ours is upstream NixOS/nix 2.35.0 with the storeFS/mountInput mount infra ported but NO lazy-trees setting and NO StorePath::random; DetSys is upstream + a lazy-trees flag (default false); tecnix is the DetSys fork with lazy-trees=true + 11 __unsafeTectonixInternal* builtins in a new tectonix.cc (absent from DetSys). - The two choices we rejected: random store paths (user-hostile, non-deterministic) and string-coercion forcing a copy. Ours uses content-determined SourcePlaceholders that thread through coerceToString losslessly (eval.cc:2544-2546), so interpolation never devirtualizes. - Smoking gun: tecnix PR NixOS#31 added ZonePath alongside ZoneSrc *purely* because DetSys path-coercion devirtualizes ("would tank eval perf in large zones"). Our design removes that duplication by construction. - Obviation scorecard: ZoneSrc/ZonePath/Tree/TreeSha fully obviated; Manifest/ManifestInverted relocate to user-space Nix; the dirty-workdir family is half-obviated (our Overlay combinator covers the mechanism, monorepo policy stays out of scope); GCS transport + pname orthogonal. - Perf head-to-head table + honest gaps: DetSys still wins zero-walk pure-eval of a flake input (our Item 2 mountInput forces synchronously, closed by §6.8 Item 5); filtered builtins.path re-walks structure every eval in all forks; our Git tree-synthesis win is still dormant. Also refreshes the §5 "What we learned" DetSys/tecnix bullet to point at §8 and the ZonePath data point. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This is a new attempt at getting queries to work well with imports from derivations, taking the approach I suggested in the comments on the other PR. Note that currently the case where 'name' or 'system' require importing from an unrealized derivation (A silly case IMO) is not handled, though that can be easily added.