Skip to content

Add option for disabling closure computation in GHA cache#112

Open
yfyf wants to merge 1 commit intoDeterminateSystems:mainfrom
yfyf:no-closure
Open

Add option for disabling closure computation in GHA cache#112
yfyf wants to merge 1 commit intoDeterminateSystems:mainfrom
yfyf:no-closure

Conversation

@yfyf
Copy link

@yfyf yfyf commented Nov 22, 2024

Allows to only cache the built derivations without their closures.

This avoids polluting the GHA cache with many duplicate entries, which happens when a downstream derivation changes (and is rebuilt), but its dependencies don't (but would get pushed to the cache each time regardless).

Should reduce the impact of issues like #75.

Not sure how to test this properly, but verified manually that OUT_PATHS=$(which bash) ./target/debug/magic-nix-cache --no-closure enqueues only the bash NAR.

Allows to only cache the built derivations without their closures.

This avoids polluting the GHA cache with many duplicate entries, which
happens when a downstream derivation changes (and is rebuilt), but
its dependencies don't (but would get pushed to the cache each time
regardless).
@yfyf
Copy link
Author

yfyf commented Nov 22, 2024

Amended the commit after cargo fmt

@Camsbury
Copy link

What is holding this PR up? This is a pretty significant fix, willing to help.

@icovada
Copy link

icovada commented Feb 17, 2026

Bump, this is a significant fix (if it works)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants