There is generally no use case where any setup is required before init, and requiring the explicit function call is error-prone and unnecessary. It also causes trouble with packages using a similar trick. This change moves argv0 check early and makes it an import side effect. The stub will be removed in v0.5.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This avoids repeating errors belonging to multiple instances of the same artifact in different locations in memory.
Signed-off-by: Ophestra <cat@gensokyo.uk>
The DCE is a slow and overcomplicated solution to a simple problem. This change replaces the DCE by resolving errors in-flight.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This enables a FileArtifact implementation to specify whether its resulting file should be executable. This change also implements shebang and ELF magic checks in the file artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This enables changing the behaviour of an artifact implementation without changing its IR structure. Unfortunately this changes the IR header structure resulting in many rebuilds.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is primarily useful for implementing a mirror service. This change also works around the zero-dependency FloodArtifact edge case.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This avoids running into nasty surprises opening a cache that suffered unclean shutdown due to power loss. All other parts of the cache are not prone to inconsistent state.
Signed-off-by: Ophestra <cat@gensokyo.uk>
The tarArtifact predates FileArtifact pipelining. This migrates decompression and buffering into a standalone artifact implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
While it is still impossible to reliably determine the expected contents of these status files, this checks their nature for expected substitution behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This change introduces a new fast path for FloodArtifact. It is taken when a curing artifact has identical-by-content controlled relevant inputs and are otherwise identical to an already-cured artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This avoids disabling the artifact when using the individual cancel method. Unfortunately this makes the method blocking.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is cleaner than checking cpu count during cure, it is impossible to avoid impurity in both situations but this is configurable.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is quite error-prone and causes cache inconsistency similar to the store inconsistency seen on nix when a similar condition happens. Keep this behind a flag in case it is ever beneficial.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This should hopefully provide good separation between the artifact curing backend implementation and the (still work in progress) language. Making the IR parseable also guarantees uniqueness of the representation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This also rearranges the ident ir to be more predictable, and avoids an obvious and somewhat easy to get into inconsistent state.
Signed-off-by: Ophestra <cat@gensokyo.uk>