macOS: bundle only the enchant applespell backend - #1
Merged
markiehill merged 1 commit intoJul 24, 2026
Merged
markiehill merged 1 commit into
markiehill merged 1 commit into
Conversation
The macOS DMG workflow bundled every enchant-2 backend Homebrew ships, which includes aspell. On a clean Mac the aspell backend is dead weight: its word-list data is not bundled, so it registers zero dictionaries while still dragging libaspell into the app via Mach-O dependency analysis. Spell-check on the shipped app is provided entirely by the applespell backend, which delegates to the macOS system spell checker (NSSpellChecker) and needs no bundled dictionary data. Bundle only that backend, add a build-time check that it exists in the Homebrew prefix, and tighten the post-build guard to require enchant_applespell.so specifically instead of "at least one .so". Verified on arm64: a frozen novelWriter.app built this way, with the Homebrew enchant and aspell data hidden, loads the applespell backend, exposes 43 OS dictionaries (en_GB/en_US/en_AU/de_DE/fr_FR, ...), and spell-checks correctly. libaspell is no longer bundled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: dfbf93cc-170a-4853-be97-161aa477883e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slims the macOS DMG build (
build-mac.yml) to bundle only the enchantapplespellbackend instead of every backend Homebrew ships.On a clean Mac the
aspellbackend is dead weight: its word-list data is not bundled, so it registers zero dictionaries while still dragginglibaspellinto the app via Mach-O dependency analysis. Spell-check on the shipped app is provided entirely by theapplespellbackend, which delegates to the macOS system spell checker (NSSpellChecker) and needs no bundled dictionary data.Changes
enchant_applespell.so(drop thefor so in .../enchant-2/*.soloop).enchant_applespell.soexists in the Homebrew prefix (fail fast otherwise).enchant_applespell.sospecifically instead of "at least one.so".Validation (arm64, Apple Silicon)
Built a frozen
novelWriter.appwith this exact enchant logic, then hid Homebrew's enchant backends and aspell data to simulate a clean user Mac:enchant-2/contains onlyenchant_applespell.so;libaspellis no longer bundled.['AppleSpell'], 43 dictionaries (en_GB/en_US/en_AU/de_DE/fr_FR, ...),en_GBcheckscolourOK /wronggrejected and suggests "language" for "langauge".This confirms the shipped
.appspell-checks via the macOS system dictionaries with zero bundled dictionary data (fixes the empty-dropdown regression from saga-soft#2705), now without the deadaspell/libaspellweight.Relates to saga-soft#2748.