v1.9.1 — Per-Symbol split_file (Item B)
·
140 commits
to main
since this release
v1.9.1 — Per-Symbol split_file (Item B)
Closes the v1.6 Plan 3 deferral and the long-standing E1-py 4-way split byte-identity e2e test.
Highlights
_RopeBridge.move_global— AST-based identifier offset +rope.Project.doin-place apply._split_pythonrewires for per-symbol path — moves are applied in-place viarope.Project.do, NOT batched. Batched edits don't converge becauseMoveGlobal.get_changesis computed against the current view; per-symbol moves only converge when each iteration writes to disk and refreshes rope's project state._rewrite_package_reexportspost-pass — rope'sMoveGlobalupdates direct importers but not package-levelfrom .OLD import Spatterns in__init__.py. The post-pass parses every.pyunder the project, locatesImportFromnodes targeting the source module (relative imports keyed by basename + parent-dir match; absolute imports keyed by full dotted path), and rewrites the moved names onto the new modules. Avoids rewritingfrom calcpy import X(the package) when onlycalcpy.calcpy(the module) was the source.- Reverse iteration — rope's
MoveGlobalprepends each moved symbol to the target file; iteratingreversed(members)yields the user-supplied order in the target. Critical for forward declarations likeExpr = Union[Num, Add, ...]which needNum/Adddefined above. - Buffer-aware
eofpreflight in spike S6.
Engine submodule
Bumped to 550561ba (tag v1.9.1-split-python-symbol-list on o2alexanderfedin/o2-scalpel-engine).
Tests
test_v19_b_split_python_per_symbol_move.py is the contract. E1-py 4-way split byte-identity (failing for >30 days) is GREEN.