Repository navigation
Conversation
Re-rendering a template into a directory it was rendered into before needs a way to leave some existing files alone, to know every path written, including symlinks, so the caller can delete what the template no longer renders, and to fail on a mistyped key rather than write "<no value>". JavaScript template functions also returned raw goja values, so a returned array could not be ranged over. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
spectre init (block/spectre#55) re-renders a template into a service checkout on every run, and Alec pointed out it was duplicating scaffolder: rendering into a temp dir, walking it, and writing everything again. These changes let it scaffold straight into the checkout.
Skip(func(path string) bool)leaves a destination path untouched, so a caller can keep files a user has edited. It sees the path after template evaluation, and a skipped directory is not descended into.AfterEachnow also runs for symlinks, so it reports every path written. The caller uses that to delete files the template no longer renders.ErrorOnMissingKey()fails on a key the context does not have, instead of writing<no value>.🤖 Generated with Claude Code