Files
obsidian-vault/work/projects/vscode-migration/vscode-migration.md
T

4.1 KiB

VSCode/Cursor Builds & Debugging (macOS)

Status: IN PROGRESS · updated 2026-10-01

Asana: Migration to fully VSCode-supported builds&debugging Repo: ~/DuckDuckGo/apple-browsers.git (bare + worktrees) Findings: projects/vscode-migration/findings

Goal

Build, run and debug the macOS app from VSCode/Cursor: make most of the app SPM-compatible, so swift build + SourceKit-LSP work, and configure .vscode (tasks, launch).

Status

Step Status
Move non-Swift code to local packages ✅ Jun 2025
Missing imports, unused files cleanup ✅ Jun 2025
Initial VSCode config ✅ Jun 2025 (stale: sweetpad worktree)
Unify WebKit private methods (Sparkle/AppStore) ✅ Feb 2026
Drop #if SPARKLE/APPSTORE ✅ Mar 2026 — DMG and App Store targets now compile the same 1398 files
Drop storyboards 🔄 4 storyboards + 1 xib left (drop-sb-* worktrees)
Core Data models in code ❌ Cancelled 2026-10-01 — Xcode 27 builds these in SPM
Asset catalogs for swift build ❌ Cancelled 2026-10-01 — Xcode 27 builds these in SPM
swift-build fork (Provisional Inputs) ⏸ not started; may be unnecessary
Remote debugging (VMs, old hardware) ⏸ not started
AI instructions, GitHub MCP subtasks ⏸ not started

Open items after the cancellation

  • PR #6976 (AssetCatalogPlugin, reviewer ayoy): close, or keep until Xcode 27 is the minimum? Branch alex/spm-asset-symbols-plugin.
  • Core Data branch alex/coredata-code-models (draft PR.md, Tech Design subtask): close.
  • Check what Xcode 27 actually does for swift build (native) and SourceKit-LSP: asset symbols, .car, .momd, storyboards? Earlier finding on Xcode 26: only --build-system swiftbuild handles assets, native doesn't. See projects/vscode-migration/findings#Asset catalogs.
  • Re-check whether storyboards still need dropping with Xcode 27.

Plan (next steps)

  1. Extract files shared with helper targets into a package. 46 app files are also compiled into VPN / DBP agent / NetP extensions, with #if NETWORK_EXTENSION / NETP_SYSTEM_EXTENSION / SANDBOX_TEST_TOOL. They block moving the app code into a package. Old draft: worktree netp-dependencies (alex/align-netp-dependencies, Oct 2025, far behind main) — redo on fresh main rather than merge.
  2. Decide on strings & resources in the package (tech design): 1964 NSLocalizedString without bundle: (→ Bundle.main), ~60 resource files, 8 Bundle.main.url(…). bundleIdentifier/appGroup via Bundle.main can stay.
  3. App code as a library package + thin app target (AppMain, Info.plist, entitlements, embed phases for login items / extensions).
  4. VSCode tasks with cached helper targets: gate script hashes each extension's inputs (git-based, not mtime) and skips xcodebuild when unchanged; assemble step copies prebuilt extensions and signs. Only pays off once the app itself builds with swift build. See projects/vscode-migration/findings#Extensions in VSCode tasks.
  5. Convert ~57 string-name image lookups (NSImage(named:), Image("…")) to asset symbols — they break once code moves to Bundle.module.

Worktrees

Worktree Branch What
spm-asset-symbols-plugin alex/spm-asset-symbols-plugin AssetCatalogPlugin, PR #6976
coredata-code-models alex/coredata-code-models Code-defined Core Data models (cancelled)
coredata-code-models-bookmarks alex/coredata-code-models-bookmarks Bookmarks models (not started, cancelled)
drop-sb-* (5) alex/drop-*-storyboard, …-xib Remaining storyboards
netp-dependencies alex/align-netp-dependencies Old draft: move files by target
vscode, vscode2 alex/fix-imports-cleanup, alex/vscode2 Old: SwiftGenPlugin draft (uncommitted), root Package.swift
sweetpad alex/cursor-fix-build Old .vscode (SweetPad) config

Demo project proving the asset approach: ~/Developer/SPMAssetSymbolsDemo (./verify.sh).