Skip to content

Fix packaged spelling runtime and dictionary portability - #11

Closed
graywolf336 wants to merge 1 commit into
releasefrom
fix/packaged-runtime-portability
Closed

graywolf336 wants to merge 1 commit into
releasefrom
fix/packaged-runtime-portability

Conversation

@graywolf336

Copy link
Copy Markdown
Contributor

Problem

The existing packaged spell engine returned checked: false, no diagnostics, and no corrections for wrod because it could not resolve @cspell/cspell-bundled-dicts/cspell-default.json outside the build checkout.

Changes

  • Load spelling through an ESM runtime resolved from the installed extension URI.
  • Preserve cspell's complete JavaScript/configuration/dictionary production dependency layout under dist/spell/node_modules, including nested versions; no native binaries.
  • Await default settings before merging workspace configuration.
  • Add a packaged spelling smoke to all three CI platforms. It checks diagnostics, a real correction, imported project configuration and relative custom dictionaries while Node denies checkout filesystem reads.
  • Document the package layout and verification command. No export implementation changes were needed.

Verification

  • Typecheck and all 224 existing tests passed.
  • Universal VSIX packaging/archived nodeatomic consumer verification passed; production audit: zero vulnerabilities.
  • Exact archived spell runtime passed restricted-filesystem smokes on Node 20.18.1, Node 22 and Node 24.
  • Built checkout was moved out of its original path before clean-profile installation. In actual VS Code 1.145.3 on macOS ARM64: qwick was flagged, quick was suggested/applied/saved to disk, and the imported project dictionary's custom word remained accepted.
  • Exact archived HTML/PDF runtime rendered Markdown, syntax highlighting, math/fonts, Mermaid and an embedded image. Final HTML had no scripts or failed requests; the 119,220-byte PDF opened and rendered as one page. Normal Chrome sandbox used for final run with build paths absent. Initial denial smoke also explicitly blocked both checkout roots (using a disposable browser wrapper because macOS disallows nested Chrome sandboxes).

Base / limits

Based on freshly pulled release at 08ffad7, including merged PR #10. Fetched default branches for Sherpa/nodeatomic (release), Atomic/storage (dev), and Homebrew (main); original worktrees untouched. Only Sherpa required edits.

Node 20 smoke is not full VS Code 1.97 certification. Linux/Windows Electron-host validation remains separate. No release tag, Marketplace upload, or version bump.

@graywolf336

Copy link
Copy Markdown
Contributor Author

Fresh CI passed on Windows, macOS, and Linux, including the new real archived-spelling smoke with checkout filesystem reads denied:
https://github.com/atomicdotdev/sherpa-vscode/actions/runs/43329154814

The locally exercised universal VSIX is retained separately as releases/atomic-sherpa-1.0.0-portability.vsix (not published). SHA-256: 09a848631cfe7df379f72fa1a0815ffc262847106c2325431d1aa7b4aea8d522. It was installed and exercised in actual macOS ARM64 VS Code with its original build tree absent; spelling correction was applied/saved and HTML/PDF rendering passed. Disposable editor profiles, runtime probes, and export fixtures were removed. Original worktrees and their local changes were untouched.

@graywolf336

Copy link
Copy Markdown
Contributor Author

Superseded by #12. The chosen approach removes Sherpa's bundled spellchecker and its dependency/configuration/lifecycle overhead, while preserving optional external diagnostics and corrections. Verified actual editor behavior both without a spellchecker and with Code Spell Checker 4.10.0. Do not merge this bundled-runtime proposal.

@graywolf336
graywolf336 deleted the fix/packaged-runtime-portability branch November 16, 2026 18:52
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