Skip to content

Understanding Source Filtering/Loading with Crane #658

Answered by ipetkov
Gastove asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Gastove! It is totally fine to use the "entire", cleaned src for the workspace, but this has the effect that if you touch any file (kept by the filter) then all derivations which use that same src will need to be rebuilt. Imagine you have a workspace of three crates: foo, bar, and common, where common is a dependency of both foo and bar. Touching any of the source files for foo should not require rebuilding bar, so if you have a slow build it may be more useful to apply the fileSetForCrate technique to avoid accidental rebuilds (what this example illustrates is that only the top-level crate's source along with any common code is included for each leaf binary).

If you have a smaller pr…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ipetkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants