Repository navigation
logic rename: classify template calls across files like the compile - #425
Merged
Merged
Conversation
plan_rename parsed each file on its own and merged the items without classifying instances, so a template called from another file stayed a block and every scoped setting on its body (a.lc.Desc = ...) failed as "not a template instance". It now classifies with the module's templates, reads file(...) per fragment and merges with fragment ends, as load_module does, and validates the expanded module after the rename too.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
=======================================
Coverage 77.29% 77.30%
=======================================
Files 163 163
Lines 53347 53359 +12
=======================================
+ Hits 41235 41247 +12
Misses 12112 12112
🚀 New features to boost your workflow:
|
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.
lox logic renamefailed on every name in the house module withplan_renameparsed each file withparse_fragmentand concatenated the items. A call of a template declared in another file (licht_kueche = Licht(…)withtemplate Lichtin_vorlagen.loxl) stays anItem::Blockuntilclassify_instancesruns. The compile does that inModule::from_fragments, and rename never did. So every scoped setting on an instance's block failed validation.Change, mirroring
load_module:file(…)relative to each fragmentModule::from_fragments(fragment ends keeppageper file)Test:
rename_keeps_settings_on_instance_blocks(template and call in different files, a setting on a body block, rename of an unrelated name and of the instance). It fails without the fix with exactly that error.Checked on a copy of the house module:
rename zaehler_kueche_licht zaehler_licht_buero_conny→ 1 file rewritten, 1 lock entry rekeyed, output byte-identical.