In the case of CA handling, a large quantity (32+) of daemon
connections may exist at once. Handling this with one single derivation
build counter is counterintuitive, and is why the Ninja CLI did not yet
use the counter.
Change-Id: Ia88b4f014ae8df8b1a900b881ac821ff6a6a6964
When the (current-error-port) is closed, other threads in the middle
of using the port are likely to error out with a "port is closed"
error. When this occurs, the Chicken Scheme runtime will either
deadlock (when this happens on the output port), or worse, _hang_.
As the barf procedure usess the current error port, it itself hits this
same issue.
We can't perfectly protect against this, as there's no mutex on the current
output/error port; but we can improve the chances of hitting it massively,
to the point where a simple program won't hit the deadlock.
Change-Id: I3ccec0073b375ca21e8b46861c2f8c146a6a6964
Dataflow tracking runs the installPhase of a derivation, and then
does its best to track build input -> store path output pathways.
This allows for substituting the installPhase of a derivation as much
as possible with relatively quick store path logic, allowing for cross-
project build input tracking.
Change-Id: I6a6a69642530b32edbc2c521a3f584703731b6e1
The non-Ninja implementations have a lot more derivation-realising
churn; we don't need to realise every single "extract a file from a zip
file" helper again for each file.
A derivation can now be tagged with a fallback, which is substituted in
place of the failed derivation.
Change-Id: I6a6a696418b5d9ced3ba16ce458f55f23813c32b
This will be used to store information for CA derivation fallbacks,
for e.g. handling header dependencies.
Change-Id: I6a6a696467311fcfbb0f01fb13998153b0cc04a7
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.
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.