Instrument and improve incremental workspace checks
Profile source capture, Nix evaluation/realization, resource/query checking, and implementation builds without putting timings into immutable outputs. Keep modular repositories; bound independent capture work, snapshot jj once per observation, and retain final concurrent-edit and Git completeness checks. Compose exact resource/closure/frontend/toolchain checks as memoized Nix derivations. Preserve whole-workspace validation and the full compiler path when no checked dependency is supplied. Share canonical Nixpkgs by content, index workspace build contexts once, and narrow lock/driver/compiler inputs with conservative complete-source fallback. Batch React witness checks only when distinct source closures cannot share ambient declarations; otherwise run the original independent TypeScript checks. Seed local authoring toolchains with exact canonical fetch identities when they match the selected inputs; retain store-path inputs for overrides. Add generic correctness checks rather than permanent Reader timing/content fixtures. Verify actual Reader edits and rejection/recovery in a private workbench, preserving the original user's workbench and runtime. Query checking currently caches at resource/closure boundaries, not individual query semantic dependency boundaries. Template helper pins and reproducible fixture snapshots follow in a separate publication change.
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
{
|
||||
pkgs,
|
||||
nixpkgs,
|
||||
system,
|
||||
}:
|
||||
let
|
||||
packageSet = (import ./quixos-package-helpers.nix).packageSet;
|
||||
shared = {
|
||||
marker = "shared";
|
||||
};
|
||||
environment = {
|
||||
inherit system;
|
||||
nixpkgsSource = toString nixpkgs;
|
||||
pkgs = shared;
|
||||
narHash = nixpkgs.narHash;
|
||||
};
|
||||
standard = {
|
||||
inherit nixpkgs system;
|
||||
context.buildEnvironment = environment;
|
||||
};
|
||||
fallback = packageSet { inherit nixpkgs system; };
|
||||
in
|
||||
assert packageSet standard == shared;
|
||||
assert
|
||||
packageSet (
|
||||
standard
|
||||
// {
|
||||
context.buildEnvironment = environment // {
|
||||
nixpkgsSource = "same-content-under-another-name";
|
||||
};
|
||||
}
|
||||
) == shared;
|
||||
assert
|
||||
(packageSet (
|
||||
standard
|
||||
// {
|
||||
context.buildEnvironment = environment // {
|
||||
system = "another-system";
|
||||
};
|
||||
}
|
||||
)).path == fallback.path;
|
||||
assert
|
||||
(packageSet (
|
||||
standard
|
||||
// {
|
||||
context.buildEnvironment = environment // {
|
||||
nixpkgsSource = "another-source";
|
||||
narHash = "another-hash";
|
||||
};
|
||||
}
|
||||
)).path == fallback.path;
|
||||
assert
|
||||
(packageSet (standard // { overlays = [ (_: _: { marker = "overlay"; }) ]; })).marker == "overlay";
|
||||
assert (packageSet (standard // { config.allowBroken = true; })).config.allowBroken;
|
||||
pkgs.runCommand "camino-package-set-check" { } ''
|
||||
touch "$out"
|
||||
''
|
||||
Reference in New Issue
Block a user