You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9380156
Browse filesBrowse the repository at this point in the historyBrowse files
fix(engine): measure layers in shared steps, and say plugin commands are never steps (#2645) (#2653)
* fix(engine): measure layers in shared steps, and say plugin commands are never steps (#2645)
What a shared step changed is compared before and after it; that now
includes each map's layers, in every build, instead of a debug-only check.
A step that failed inside its savepoint was undone whole and no longer
counts as an edit; shared_step runs the savepoint itself, so the two can't
disagree. Other failed steps that mutate still count: nothing undoes what
they did part way, and measuring it would copy each layer per call.
A plugin's command can't be a step of another command (scripts and tasks
run registered commands only, and a plugin can't run another's), so
invoke refuses one with a shared transaction instead of opening a nested
transaction with an undo step of its own.
* test(engine): a failed step is undone by its savepoint and only then isn't an edit (#2645)
* fix(engine): a command says it runs as a savepoint, and the tests check every declaration (#2645)
CommandSpec::savepoint replaces the command id written into the
dispatcher: shared_step reads it from the spec. In the tests, invoke
fails a command declared as not mutating that changes the layers without
moving the rest of what undo restores, by itself or as a step, so a wrong
declaration fails the suite instead of only a debug assertion on script
steps.
* fix(engine): marking the project unsaved doesn't excuse a layer change in the declaration check (#2645)
The test-time check in invoke now lets a command declared as not
mutating change the layers only when it moved the history state or the
project, not when it only marked the project unsaved. CommandSpec's flag
is renamed atomic, so it no longer shares its name with Session::savepoint.
* fix(engine): failing doesn't excuse a layer change in the declaration check (#2645)
* refactor(engine): read the declaration check and shared_step plainly (#2645)
* docs: say what .view() promises about the layers, and the check that holds it (#2645)
* fix(engine): the declaration check excuses a layer change by what a command declares (#2645)
A command declared as not mutating may change the layers only when it
declares that it moves the history (Undo, Redo) or replaces the project.
What it does on the way, a nested edit included, no longer excuses it:
a nested edit moved the history state the check used to read.
* test(engine): the declaration check runs in the integration tests too (#2645)
0 commit comments