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

Add method of recognizing generated files #34

Closed
jakemac53 opened this issue Feb 8, 2016 · 5 comments
Closed

Add method of recognizing generated files #34

jakemac53 opened this issue Feb 8, 2016 · 5 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@jakemac53
Copy link
Contributor

After a build, the next build needs to know which files were generated previously, so that they aren't treated as inputs.

Proposed solution:

Output a build_outputs.json file under a new hidden folder .build, eventually this will be replaced by the dependency graph file, but for now it will just be a list of all output file ids. Just using JSON for now as its the easiest, eventually more formats need to be evaluated.

On startup, check if the file exists and:

  • If it does exists, read the file and ignore all listed files as inputs. Probably also delete those files from disk (otherwise we can easily end up with stranded files, we can be smarter about this later on).
  • If it doesn't exist, call declareOutputs on all builders in all phases, recording all declared outputs which would conflict with an existing file on disk. If there are conflicts then summarize the results to the user to confirm deletion of these files, and then start over.
@jakemac53 jakemac53 added this to the v0.1.1 release milestone Feb 8, 2016
@jakemac53
Copy link
Contributor Author

cc @kegluneq @nex3 @munificent please review proposed solution. This should mean we don't need to require any specific file extensions in order to discover which files are generated files.

@jakemac53
Copy link
Contributor Author

cc @kevmoo as well

@kegluneq
Copy link

kegluneq commented Feb 8, 2016

I like this idea better than the other solutions we've discussed.

@nex3
Copy link
Member

nex3 commented Feb 8, 2016

👍

I like that this dovetails well with on-disk caching of derived information.

@jakemac53
Copy link
Contributor Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants