Skip to content

refactor(editor)!: move the vendored editor into Packages/TableProEditor and rename its modules - #2886

Merged
datlechin merged 7 commits into
mainfrom
refactor/move-editor-package
Sep 15, 2026
Merged

datlechin merged 7 commits into
mainfrom
refactor/move-editor-package

Conversation

@datlechin

@datlechin datlechin commented Sep 15, 2026

Copy link
Copy Markdown
Member

Stacked on #2885.

LocalPackages/ held two SwiftPM packages that were forks in name only: 342 of their files
had TablePro changes in them, the last upstream commit either could take is eight months old,
and nothing in the tree ever resolved them from a remote. They were vendored source living
under a directory name that said otherwise, in a location no other first-party package uses.

This moves them to Packages/TableProEditor, as one package with the same three targets, and
renames the modules to match:

Was Is
LocalPackages/CodeEditTextViewCodeEditTextViewObjC Packages/TableProEditorTableProTextEngineObjC
LocalPackages/CodeEditTextViewCodeEditTextView Packages/TableProEditorTableProTextEngine
LocalPackages/CodeEditSourceEditorCodeEditSourceEditor Packages/TableProEditorTableProEditorKit

One package, not two

Upstream split the engine from the editor because they ship as two products. Here they are one:
32% of the commits that touched either touched both, and the strongest co-change pair in the
repository is TableProEditorKit's controller against TableProTextEngine's text view, which
the old package boundary put on opposite sides. The three targets keep the layering the split
was for, and SwiftPM rejects a cycle between targets exactly as it did between packages, so
nothing about the dependency direction is loosened.

Provenance

Packages/TableProEditor/ORIGIN.md records the upstream URL and SHA each target came from,
both MIT notices stay beside the sources as LICENSE-CodeEditTextView.md and
LICENSE-CodeEditSourceEditor.md, and licenses.yml points at both. The acknowledgements
screen is unchanged in content; only the paths moved.

It also says plainly that a rebase onto upstream will not work: 42 of the 65 engine files
TablePro touched, and 41 of the 70 editor files, collide with what upstream changed in its own
last 60 commits. Taking a specific upstream fix means reading it and writing it here.

Also in this PR

  • project.yml declares one TableProEditor package with two products instead of two packages.
  • .github/workflows/macos-tests.yml runs one Run TableProEditor package tests step, and
    LocalPackages/** comes out of every path filter.
  • CLAUDE.md, docs/development/{setup,code-style,architecture,building}.mdx,
    .claude/skills/fix-issue/references/verification.md, scripts/check-doc-symbols.sh and
    .gitignore follow the paths.
  • Import blocks in the 67 app and test files that name an editor module re-sorted, since
    the module names changed position.
  • swift-custom-dump dropped from the package, the same removal as build(editor): drop swift-custom-dump so the editor package's lockfile is toolchain-independent #2889 and for the same
    reason: it is a test-only dependency whose transitive package was renamed, so the lockfile
    records whichever identity the toolchain that wrote it chose and --force-resolved-versions
    refuses on the other one. Its eleven expectNoDifference call sites all compare two Strings,
    which XCTAssertEqual already prints both sides of.

No behaviour change: this is a move, a rename and the wiring that follows them.

Verification

  • swift build --package-path Packages/TableProEditor: clean.
  • swift test --package-path Packages/TableProEditor: 333 engine cases and 102 kit cases under
    Swift Testing, plus 112 XCTest cases (2 skipped), 0 failures.
  • verify.sh generate, build, plugins, docs: PASS.
  • swiftlint lint --strict over TablePro, Packages, TableProTests, TableProUITests,
    Plugins: 0 violations.
  • No file under Plugins/ changed, so the PluginKit ABI cannot have moved; the gate confirms it.

No CHANGELOG entry: nothing here is visible to a user.

Base automatically changed from chore/editor-style-pass to main September 15, 2026 08:05
…package

# Conflicts:
#	CLAUDE.md
#	LocalPackages/CodeEditTextView/Sources/CodeEditTextView/CodeEditTextView.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+TextViewDelegate.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Controller/TextViewController+ToggleComment.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Extensions/NSRange+/NSRange+InputEdit.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+Point.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+TextFormation.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Extensions/TextView+/TextView+createReadBlock.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Filters/DeleteWhitespaceFilter.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Find/PanelView/FindPanelView.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel+Replace.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/Find/ViewModel/FindPanelViewModel.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/SourceEditor/SourceEditor+Coordinator.swift
#	Packages/TableProEditor/Sources/TableProEditorKit/TextViewCoordinator/CombineCoordinator.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/CaptureModifierSetTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/CodeEditSourceEditorTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewControllerTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/FindPanelTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/GutterNumberOffsetTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/StyledRangeContainerTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/Highlighting/VisibleRangeProviderTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldAccessibilityTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldChunkBoundaryTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldCollapsePathTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldDocumentSwapTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldHoverTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldPlaceholderClickTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldRibbonLookupTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldStorageTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/LineFoldingTests/LineFoldingModelTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/RangeStoreTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/TreeSitterClientTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/AccessibilityTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/CmdUpAtEndOfDocumentTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/IMEInputTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/KillRingTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/OverridingLayoutManagerRenderingTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerAttachmentsTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/LayoutManager/TextLayoutManagerTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/LineEndingTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/MarkedTextTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/NSBezierPathSmoothPathTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/NSTextInputRangeGuardTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/TextLayoutLineStorageTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/TextLineDisplayRangeTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/TextSelectionManagerTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/TextViewTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/TypesetterTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/VisualLineEndOfDocumentTests.swift
#	Packages/TableProEditor/Tests/TableProTextEngineTests/WordSelectionTests.swift
…package

# Conflicts:
#	LocalPackages/CodeEditSourceEditor/Package.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+IndentTests.swift
#	Packages/TableProEditor/Tests/TableProEditorKitTests/Controller/TextViewController+MoveLinesTests.swift
@datlechin
datlechin merged commit 2ee35d9 into main Sep 15, 2026
6 of 7 checks passed
@datlechin
datlechin deleted the refactor/move-editor-package branch September 15, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant