rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

feat: implement multiple cache outputs and path optimization

Open zelosleone opened this issue 7 months ago • 0 comments

as per CEP from https://gist.github.com/wolfv/1a160129eb7ba7ccaab51fdf25d7e89b

  • Build scripts are explicitly required in cache outputs.
  • We are using experimental flag for this feature.
  • I didn't delete the old top-level cache yet, i think that would break a lot of recipes. So I decided to support both approaches while allowing backwards compatibility.
  • Child outputs can override specific cache settings while inheriting others
  • There is a topological ordering for cache outputs to correctly resolve inheritance orders. Example:
A --> B
A --> C
B --> D
C --> D

So when D depends on both B and C (which both depend on A), we ensure A is processed first, then B and C, then lastly D.

  • We inherit run_exports by default, but can be disabled.
  • Requirements are not inherited by default, but can be enabled.
  • Build and about sections are merged.
  • Build scripts on the other hand are never inherited.
  • From the CEP, there is an optional path taking with Fast-path optimization check but I just implanted that too, because it's actually nice. if an output inherits from a cache and has no explicit build script, we will skip environment setup and script execution entirely.

zelosleone avatar Jun 14 '25 00:06 zelosleone