crates.tsv: the vector cut moves 13 command modules; the 11 shared engines
(float, frame, slice, symmetry, transform, type, type_extra, type_spell, warp,
smart, vector) map to model and stay in core until step 12; notes'
stored-values tests move with notes.
engine_cut.py: super:: paths are rewritten only at a moved file's own depth;
trait imports are added per module scope; import names come from whole use
trees; branch moves TABLES entries into the crate's install.rs before removing
them from core and finishes the moved files at their new paths; a widened name
keeps its use statement's cfg; single-name groups widen as whole imports;
re-exports from lib.rs resolve from the crate root.
move_tests.py: an existing target module gets the new tests appended (in a
module of their own when a name would clash or the file is organised by
source file); helpers are copied as written, and only those the moved tests
name unqualified; trait imports stay only when a method of the trait is
called; path rewrites skip string literals; ci-test-times remaps only this
run's tests, without duplicate rows; list reads the crate's spec functions for
its ids, ignores ids whose result is dropped, and lists test functions at the
top of production files, which move without their production siblings;
test-module parents are found inside inline modules; cleanup touches only the
modules the move emptied and keeps those other code names; --previous needs
--old-ref.
install_tables.py matches a table's full module path to its crate;
table_fragments.py reports a branch-added entry whose handler is in a crate the
predecessor's fragment can't reach.
add_import inserts before the first import's outer attributes and after multi-line inner
attributes; fix mode moves inline-module offsets past the edits it applied above them.
module_file resolves a crate root's children beside it whatever the file's name, and
inline_mods takes an enclosing module's #[path] as its directory.
compiled_files walks each crate's targets (standard paths and Cargo.toml target paths) through
mod lines, inline modules included. tools/analysis_ui.rs, which no module reaches, keeps main's text.
scripts/engine_split/slot_access.py rewrites the slot fields to their accessors
(Tracked presets deref through one more *), adds the trait imports, turns
s.presets_changed() into presets::presets_changed(s) and points Session::method doc
links at the trait methods. Its fix mode applies what cargo check reports; branch
mode serves open branches and lists their edits to the moved methods. The
definition-span helpers session_state.py uses move to rust_source.py so both
scripts share them (session_state.py's output is unchanged).
This commit is split plus the fix rounds against cargo check of engine-core,
engine, ui-egui and automation (lib and tests). Part of #15710.
The relocation check matched only the definition's name in the changed
lines, so a branch that changed a line inside builtin() got no report.
It also compares each hunk's old-side line range with the definition's
lines (doc comments and attributes included) in the base version.
crates/engine keeps the package photocraft-engine: src/facade.rs re-exports
photocraft-engine-core, and its Session wraps core's and installs every engine
command. Core's Session::new() installs nothing; core gets install() and session().
The command registry keeps main's behaviour (empty before an install).
The top crate's dev-dependencies cover tests/ and examples/, including
craft-develop-model (camera raw baseline test) and photocraft-testkit (the
corpus-gated Photoshop oracle test). Dependents that need the core type or
borrowed two fields through the wrapper are fixed at the call site, and tests
that reach the registry before any session install first.
Tooling follows the package: workspace dependency, cl selection, xtask layers,
i18n report, scorecard and corpus paths, nextest overrides, ci-test-times rows,
display-names roots, prefs_usage paths, the engine split scripts, docs, and the
two release-perf steps in ci.yml.
Corpus .atn paths, the layer_menu registry read and the craft-develop-model
dev-dependency are FredApps' fixes from #16431.
Part of #15710
python3 scripts/engine_split/crate_shell.py split, then rustfmt on the files it edited.
The sources and the manifest move to crates/engine-core; core's tests start from
crate::session() (1,673 sites), 32 tests that read the registry first install with
crate::install(), and 12 Session imports the rewrite left unused are dropped.
The command registry moves to `registry.rs`: `CommandSpec`, the `Install`
record, `install()`, `find`, `spec`, `command_specs` and the command-list
helpers. A process installs its command tables once; installing the same
tables again does nothing, and different tables are refused with
`InstallConflict`, which every later command then reports. A session that
runs a command before any install gets `NotInstalled`.
`install.rs` holds the full table list in today's order, `install()`, and
the `command_specs`/`find` wrappers that install first, which the public
`commands::` paths name. `Session::new()` installs. The order test and
`command_ids.txt` move with the list and read the ids from it.
The tables `install.rs` lists are public: the table fragments and seven
command modules that were private.
`scripts/engine_split/install_tables.py` moves a branch's added or removed
command tables (the old `v.extend(...)` lines or `SPECS` entries) into the
install list.
The codemod three-way merges the adjustment table into table/image/adjustments.rs,
reports other build() edits as unhandled, compares entries without comments and
whitespace, adds the comma after a single-entry fragment, checks removals and
duplicate ids, and adds the imports new entries need. The order test's failure
message names the regeneration variable.
Fragments live in cmd/table/<owner>/<menu>.rs, one directory per future crate
(core, model, store, paint, image). SPECS names each fragment so the order test
can say which one a misplaced command comes from. scripts/engine_split/table_fragments.py
moves a branch's edits of the old inline table into the fragments.