Repository navigation
feat: move several models in one sqb mv and match carried declaration layouts - #1206
Merged
Merged
Conversation
When sqb mv carries a scoped declaration to a wider owner, the file now matches the layout of the role folder it lands in instead of always being written directly in it. An empty role keeps the source's group folder, a grouped role keeps the source's group, and a direct role drops it. A file without a group that must join a grouped role is refused with a message to move it into a group first, rather than writing a layout that verification rejects for mixing direct and grouped files. Placement relocation now accepts several resource moves at once.
sqb mv now takes several TARGET DESTINATION pairs, or --from-file with one pair per line (tab or space separated, # comments and blank lines allowed). The project compiles once before planning and the edited project once after. Every move is planned together: declarations and unit tests are placed for the state after all moves, a model may take a file or name another move leaves, and a batch that moves a model twice, sends two models to one file or gives them one name is refused. Nothing is written unless the whole batch verifies; --dry-run prints the combined plan, and JSON output lists the moves. A single move plans and prints as before.
Two carried declaration files could share one target, either from two moved models' same-named local files or from grouped files flattened into a direct role. Planning now refuses this up front, naming both files, instead of leaving it to a confusing verification compile error.
kvlonge
enabled auto-merge (squash)
October 21, 2026 21:54
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.
Why
Restructuring a project means many
sqb mvcalls. Each one compiles the project twice, and the states between moves are often invalid even when the end state is valid, for example when a macro has to be carried up and back down. A carried declaration also ignored the destination role's layout, so a grouped role got a direct file that layout rule SQBRDECLARATION302 then rejected.Changes
sqb mvaccepts severalTARGET DESTINATIONpairs, or--from-filewith one pair per line (#comments allowed). The project compiles once before, every move is planned against the final state, and the final state is verified with one compile. The batch is all-or-nothing,--dry-runprints the combined plan, and JSON output addsmoves.Verification
--from-file, dry run, and conflicting batches (including two same-named declaration files) leaving files unchanged.make check-ci; refactor E2E and integration tests; compiler differential failure corpus (refactor goldens unchanged).