Repository navigation
feat: delete stale generated files listed by an output manifest - #37
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A renamed or removed query group, or a changed
java.package, used to leave the previous repository behind injava.out, where it kept compiling. A successfulsqlcj generatenow records its output insqlcj-manifest.txtinsidejava.out. The next successful run deletes only the files that manifest listed and it no longer generates, so stale repositories go away while user files stay.Changes
GeneratedOutputManifest. It reads the previous manifest, deletes stale files, and writes a UTF-8 manifest with one sorted,/-separated path relative tojava.outper line, each line ending in\n.SqlcjCompilerreads the previous manifest after generation and before the first write. It deletes stale files after every generated file is written, and writes the new manifest last, so a failed write or cleanup keeps the previous manifest for the next run.java.outis deleted. Entries that are absolute, escape the directory, are not normalized, or are empty are skipped, as are directories and any file that is the same file as one this run wrote.Cannot read output manifest: <file>,Cannot delete stale generated file: <file>andCannot write output manifest: <file>end the run with exit status1.Scope and non-goals
java.outleaves the previous output directory untouched.generate --checkmode and no change to configuration or generated code.