Repository navigation
Include a file every time it is named; notice edited includes - #18
Merged
Merged
Conversation
Same fix as openscad_parser #32. A single visited set spanned the whole resolution, so a file was included at most once; OpenSCAD includes it each time and refuses only a file open on the current include chain (the top file is not one). The resolved cache now records every file a resolution read and is valid only while none has changed -- keyed on the top file alone, an edited include kept serving the old tree. Co-Authored-By: Claude Opus 5.5 <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.
The same two fixes as openscad_parser #32.
Repeated include. A file included twice, or reached through two others, was included once. OpenSCAD 2026.02.01 includes it every time, and refuses only a file already open on the current include chain (the top-level file isn't one). The tests are the same four cases, each matching the reference's ECHO output.
Edited include. The resolved cache was keyed only on the top file's modification time, so an edited include kept serving the old tree. It now records every file a resolution read, and a cached tree is used only while none of them has changed.
For openscad_evaluator, which uses this parser: BOSL2's
std.scadresolves to the same 1,341 top-level nodes as before, all 1,050 evaluator tests pass against this branch, and a 30-cuboid BOSL2 script's resolve time is unchanged (~1,040 ms).1,188 tests pass, including 4 new ones.
🤖 Generated with Claude Code