Commit graph

109 commits

Author SHA1 Message Date
0c0c4b5d22 (zilch magic): support devirtualising zexpr without losing zexpr-ness
Change-Id: I6a6a6964787b3a1fcd3223df258e34a8daba5dc8
2025-11-14 13:01:04 +00:00
c685ff31df (zilch lang ninja build): add shared object stubs for linked libraries
This adds a second derivation containing a .so (stubbed) to all `.so.symbols`
edges, which represents a shared object stub. This stub is then used for all
linking afterwards, rather than the bubbled-up .so file, which was used as
workaround.

Change-Id: I6a6a69649ff04f8efe329c59e4d0172532aa7adb
2025-11-14 13:01:04 +00:00
4008106946 (zilch nixpkgs): remove other load-bearing derivation attrs on drv-to-env
Change-Id: I6a6a6964cda47ecb852e71490412e6236398fe60
2025-11-14 13:01:04 +00:00
83c6d94de3 (zilch magic): re-raise the first CA error
Change-Id: I6a6a6964a748b10ec12aa5cbc1cd736bffe077ff
2025-11-14 13:01:04 +00:00
c94279fcb2 (zilch lang ninja build): expose phony build edges better 2025-11-14 13:01:04 +00:00
f3618358aa (zilch magic): fix ca build error conditions more 2025-11-14 13:01:04 +00:00
11709a3eed (zilch lang ninja build): support per-project patches 2025-11-14 13:01:04 +00:00
55dd6a8483 (zilch magic): handle errors properly in CA builds
This properly stops the rest of the builders, instead of causing a
deadlock.
2025-11-14 13:01:04 +00:00
84748541c7 (zilch magic): purposely dangle self-references in IA->CA handling
This is to workaround an issue I don't know how to fix right now.
In effect: Some of the Nix code contains the placeholder for $out,
which then gets translated to $out for that store path. Converting that
fails, for obvious reasons. However, rewriting those to self-references
is more complicated than I want to get into right now, and as the
behavior of self-references is vaguely broken (and this only affects
one test and a comment), I'm going to take the easy way out and make
it generate a dangling reference.
2025-11-14 13:01:04 +00:00
8e2f0f3014 (zilch magic): refuse to handle self-references 2025-11-14 13:01:04 +00:00
9b03914ec1 (zilch magic): Replace daemon-handled CA derivations with Zilch
Lix is deprecating CA derivations, and it's not too difficult to have
this be handled entirely by Zilch. This also improves stability and
future handling of the feature, as Zilch does not depend on how the
daemon handles CA derivations. Though right now, the behavior of
CA derivations is identical to that of the experimental feature, at
this time.

Building CA derivations requires a small scheduler to bypass the Nix
behavior. Each CA derivation is recorded, and then all derivations that
have no CA dependencies get built. These are used to resolve the
realisations for the derivations that depend upon them, and the the
cycle continues.
2025-11-14 13:01:04 +00:00
83a4a0569d (zilch magic): add helper to turn a CA drv into a non-CA equivalent
This reuses the exact NAR, so it cannot depend on the exact path of
$out. That is, however, good enough for the usecases Zilch has.
2025-11-14 13:01:04 +00:00
8859253253 (zilch magic): fix non-CA store path building 2025-11-14 13:01:04 +00:00
7e8e504f89 (zilch magic): whitespace fixes 2025-11-14 13:01:04 +00:00
ec41674598 (zilch magic): add helper to turn a store path into its FOD equivalent 2025-11-14 13:01:04 +00:00
9d72e8a246 (zilch nix path): support content-addressed paths with references 2025-11-14 13:01:04 +00:00
f8dd673609 (zilch nix daemon): add more daemon calls 2025-11-14 13:01:04 +00:00
7cdf45ef96 (zilch lang ninja build): support phony rules 2025-11-14 13:01:04 +00:00
355af66489 (zilch nix drv): finally fix overlapping environment variables
Having an `out` environment variable now correctly gets it ignored
entirely, rather than behave unexpectedly.
2025-11-14 13:01:04 +00:00
3f2e90543e (zilch nix drv): fix failed derivation output logging 2025-11-14 13:01:04 +00:00
ca920c0ae3 (zilch lang ninja build): fix relative-to normalisation for empty paths 2025-11-14 13:01:04 +00:00
5b4bb8cd8a (zilch nix drv): fix serialized derivation format caching
This was broken at some point, and I'm not sure if this is a load-bearing
bug. Let's find out.
2025-11-14 13:01:04 +00:00
fc2d2551fe (zilch vfs): add vfs-to-string 2025-11-14 13:01:04 +00:00
ec05d19a1e (zilch lang ninja build): don't print missing errors for nix store paths 2025-11-14 13:01:04 +00:00
40638ad666 (zilch lang ninja build): workaround Meson .so linking
Meson implements early-cutoff for shared library linking by having each .so
generate a .symbols file, and only relinking when that changes. The issue is
that this loses the direct dependency to the .so, and I'm unwilling to commit
to putting every transitive dependency in the environment's VFS. Instead,
work around it specifically for Meson.
2025-11-14 13:01:04 +00:00
be1b4c3792 (zilch lang ninja build): improve build environment + setup times
Turns out generating one full VFS for every single build step is really
expensive.
2025-11-14 13:01:04 +00:00
95e7ca1277 (zilch lang ninja build): don't generate empty derivation names 2025-11-14 13:01:04 +00:00
559350369c (zilch lang ninja): parse (then throw away) pool information 2025-11-14 13:01:04 +00:00
8080da3ba0 (zilch vfs): add parent directories when using vfs-append-file 2025-11-14 13:01:04 +00:00
0cf6d7a9af (zilch lang ninja): improve parser performance 2025-11-14 13:01:04 +00:00
499bacd9c8 (zilch lang ninja): support processing simple build scripts 2025-11-14 13:01:04 +00:00
8eb1934d03 (zilch vfs): add vfs-append-file 2025-11-14 13:01:04 +00:00
80883d3206 (zilch core nixpkgs): add "eval raw in nixpkgs" function
This allows evaluating code that isn't as obviously "one derivation";
e.g. `pkgs.mkShell'.
2025-11-14 13:01:04 +00:00
5176533e0a (zilch core nix daemon): fix error handling 2025-11-14 13:01:04 +00:00
994d50c732 (zilch vfs): fix importing executable files 2025-11-14 13:01:04 +00:00
40d213520a (zilch lang ninja): add ninja build file parser 2025-11-14 13:01:04 +00:00
0dc3c7e154 docs: add more modules 2025-04-14 12:17:56 +00:00
6ed7b2f2d6 (zilch core nix drv): build fixes 2025-04-14 12:17:00 +00:00
e65143d89e (zilch magic): add nix-build build step 2025-03-20 17:46:22 +00:00
3e3b9a8bb9 (zilch planner step): fix batch steps 2025-03-20 17:43:55 +00:00
20f06e2eb9 (zilch planner step): track historical build plan steps 2025-03-09 09:47:26 +00:00
43322a8f05 (zilch planner step): remove debug output 2025-03-08 14:31:59 +00:00
5a69ffa8fa shell.nix: add (zilch planner) 2025-03-08 14:28:27 +00:00
c23a039972 (zilch planner step): add (build-plan-next-id) 2025-03-08 14:11:51 +00:00
930e9f6b15 (zilch planner): initialize build planner
This provides the core for a persistent unified build plan format.
2025-03-08 13:54:15 +00:00
bac63118d2 zilch-cli-rust: fix ordering of append-dir 2025-03-03 15:13:27 +00:00
974290206c zilch-cli-rust: add overrides for the crates that alacritty depends on 2025-03-02 22:14:28 +00:00
f610d937b3 (zilch lang rust resolver): fix feature detection for some proc-macros 2025-03-02 22:14:12 +00:00
c6364fa6aa (zilch lang rust cargo): find target-specific build dependencies 2025-03-02 22:13:55 +00:00
307b1c7218 (ziclh lang rust): use compile-time path for yj
This will have to be replaced with a small Rust program, but I don't
want to resolve the chicken-egg problem right now.
2025-03-02 22:13:05 +00:00