Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the configuration cache support. #9

Merged
merged 6 commits into from
Sep 4, 2021
Merged

Conversation

nedtwigg
Copy link
Member

@nedtwigg nedtwigg commented Sep 4, 2021

2.2.0 was supposed to add support for configuration cache, but was actually broken. This PR fixes it, but at the following cost:

  • a single input SVG can produce 0 to n output files
  • because of this, our task has to maintain the mapping from input to output files manually, there isn't a guaranteed 1 -> 1
  • previously, we did this with a locally mutable cache, which was always a risky choice
  • now we have an InputFile mappingFileIn and OutputFile mappingFileOut, the last step of the task is to write mappingFileOut and copy it back to mappingFileIn
  • this means that whenever the file topology changes (files added, removed, or changed in a way that affects the number of output files), we have to a full rerun of the task. Incremental only works when on pure modifications, no change in number of outputs.

Overall not a big deal. EDIT: See next comment.

@nedtwigg
Copy link
Member Author

nedtwigg commented Sep 4, 2021

It actually is a big deal. It breaks the buildcache, which is more important most of the time, and adds a ton of complexity.

To do this right, we would need an incremental task that does .svg -> .tar, 1:1, where the tar would have each file's path and content in some temp dir. Then a separate non-cached, non-incremental task which untars each of those to the destination directory.

More complexity than it's worth, I think.

For now, I'm just ripping out the incremental part, which makes everything else much simpler anyway.

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.

1 participant