large_maps_do_not_multiply_stem_scan_work compared the thread CPU time
(or the elapsed time, where /proc/thread-self/schedstat is missing) of
suggestions with 1,000 and 8,000 MAP groups and stems, and printed the
times. A test-only counter now records each letter MapLookup::fold
folds, and each group and member alternatives() reads. The test checks
that the larger dictionary takes at most 10 times the lookups of the
smaller one, and that fold gives the same answers with the groups taken
away, so it reads only its index. With fold scanning the groups, the
lookups grow from 9,007,999 to 408,042,999, and with the groups taken
away fold returns ą for ą instead of a; the test fails either way.
Joined words are now repeat-checked, but the words a language repeats on
purpose are listed without joiners, so જલ્દી જલ્દી (with a ZWJ) was
marked as a repeated word (CodeRabbit on #3911). Compare the word
without its joiners against that list; the mark and suggestion keep the
typed spelling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Marathi is written in Devanagari, like Hindi, but has no proofing
language of its own: `mr`, `mr-IN` and `mar` are pack languages, which
fell to the English rules and got no break. indic::Script::of now maps
them to Devanagari, so Marathi words break between aksharas, joiners
stay inside conjuncts, and a Marathi pack's patterns reach the same
words (the pack check now covers every language Script::of maps).
Part of storytold/vectorcraft#4947.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3905 added indic::is_joiner with the same body as crate::is_joiner
(bflatastic on #3911): drop the lib.rs copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
words() searched past the whole joiner run for every joiner in it, so a
letter followed by N joiners cost about N²/2 checks (CodeRabbit on
#3911). The answer is the same for every joiner of a run: keep it until
the next non-joiner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
words() ended a word at a zero-width joiner or non-joiner, so a Hindi or
Gujarati word written with one in a conjunct (क्ष, પુસ્તક) was split and
each half was spell-checked and repeat-checked alone. A joiner between
two letters, digits or marks is now inside the word (UAX #29); one at a
word's edge is not. The Gujarati/Hindi lookup tries the word as typed,
then without its joiners, as a dictionary with Hunspell's IGNORE would.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With joiners now inside an Indic word, the Gujarati pack guard (the
Gujarati block only) turned a word with a ZWJ or ZWNJ away from its
pack, so a pack exception for it was skipped. Gujarati and Hindi now
check the script's letters, marks and joiners (indic::Script::is_letter),
as their rules do, and still need the pack to know the word.
CodeRabbit on #3905.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3899 added ProofLang::Hi, and on main it went into the old fixed list
(17 entries, range still 0u8..16, so Other wasn't drawn). Keep
every_lang() and add L::Hi to its match and list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spelling check and the repeated-word and spacing checks move to
script_checks, which takes a language's Script (its letters, digits and
an optional second spelling) and Rules (messages, repeat policy). Gujarati
uses it with the predicates it had, so its behaviour is unchanged; Hindi
uses the Devanagari letters from indic and its nukta spellings.
ProofLang::Hi maps to indic::Script::Devanagari, so Hindi words break
between aksharas.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A ZWJ or ZWNJ after a virama (choosing how a conjunct is drawn) ended
the letter run, so a Gujarati word with one was hyphenated as two short
parts and got no break. In a language with Indic rules a joiner is now
part of the word, and the akshara rules keep it inside its conjunct and
never break next to it. Other languages still end a run at a joiner.
Follow-up to #3901 (CodeRabbit review). Part of storytold/vectorcraft#4947.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module docs linked the private Script::kind, which the workspace docs
check (-D warnings) rejects, and gave ProofLang::Gu a redundant explicit target.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mixed_spans_never_panic drew from a hand-written list that never had
EnAu, Bg, Hr, De or a Pack language, and its fixed index range needed
#3887 after Gujarati was added. It now picks with
proptest::sample::select from every_lang(), which lists every ProofLang
next to an exhaustive match, so a new variant doesn't compile until it
is listed. A `fr` tag stands for the Pack languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ProofLang::Hi for hi, hi-IN and hin: spelling from an installed hi_IN
Hunspell dictionary (not bundled), dictionary-driven suggestions, and
generic checks (repeated words, spacing, ratios with Devanagari digits)
with Hindi messages. The Devanagari pieces (letters, digits, both
spellings of nukta letters, the spelling check and the generic checks)
are in a shared devanagari module for later Devanagari languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gujarati words fell to the English rules and got no break. They now
break only between orthographic syllables (aksharas): never inside a
conjunct, never before a vowel sign or mark, and never before a dead
final consonant. The rules come from the script's Unicode encoding (the
shared Brahmic block layout), so no pattern file is read. A `gu` Language
pack's patterns still come first.
The new `indic` module also carries the Devanagari table, so Hindi and
the other Devanagari languages need only a `Script::of` mapping.
Part of storytold/vectorcraft#4947.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adding Gujarati grew the language list in mixed_spans_never_panic to 16,
but the index range stayed 0..15, so the last entry, ProofLang::Other,
was never drawn. The range is now 0..16.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge from main dropped nosuggest_stems_and_forms_are_never_offered
because the shared assert_nosuggest_is_honoured helper was removed in
25597ecfc. Rebuild the fixture inline with AffixDict::from_hunspell, as
main's tests now do, covering prefixed/suffixed forms, REP replacements
and mixed-case input through the Gujarati suggest_in, plus a
Gujarati-script NOSUGGEST stem. No production code changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges main at 3b8e426a26.
- crates/ui: main's e-sign dialog (crates/ui/src/esign) moves to craft-cloud-ui beside the
share dialog, behind craft-cloud-ui's esign feature; craft-ui forwards `esign` and
re-exports the module.
- crates/proof: main's can_suggest_cased goes to affix/check.rs and its tests to
affix/tests.rs (next split affix.rs); French wiring in lib.rs.
- crates/svg: main's validated resolver and raster validation stay under tree-render, which
now also enables gif and image-webp; the shared image-codec helpers are gated on tree.
- craft-ai-agents: main's rev (craft-ai-integrations main), one entry.
- crates/craft: facade dependencies, features and re-exports for main's new crates.
Address CodeRabbit4575003662 by considering all normalized exact derivations in the displayed-case eligibility guard, without lowercase fallback. Preserve forbidden-word handling, case exclusions, shared budgets and ranking.
A real REP regression fails before the fix and passes for NOSUGGEST/SUBSTANDARD compound paths after it, while FORBIDDEN remains rejected; cover WCAFF2 round trips.460 unit tests, compatibility2, French Pack1, real Dicollecte1, formatting and strict all-target proof Clippy pass on Rust1.100. New hosted checks are still required.
Retain upstream REP budget cap and current language fixes. Resolve the Windows reader-test conflict with the exact upstream tests, dropping the older equivalent portability patch. French behavior and compatibility fixtures retained; no workflow or dictionary additions.
459 unit tests, compatibility, French pack and real Dicollecte pass; strict craft-proof Clippy and formatting pass on Rust1.100.
202 upstream commits since 6cb00467a. Resolutions:
- craft-window, craft-platform: ours. Upstream's frame policy v2, restore
store and GNOME light/wait_first are the versions carried on 28 Oct;
ours moved place() to craft-behavior and kept LayoutWatch and the
appearance/portal.rs split.
- craft-timeline: ours. craft-time (crates/time) lands as upstream wrote
it and is not yet used by craft-timeline.
- Old crates/ui modules stay removed. Upstream's frosted backdrops, shape
gallery, dialog tabs and the iconic flyout top-edge rendering are not
carried. The #1094 model half is in craft-behavior's dock:
Group::flyout_offset and Action::MoveFlyoutTop.
- craft-update: #586 Save and Update, the install probe on the check
thread and quiet per-user MSI self-updates, carried into updater.rs,
stack_dialogs.rs, install/windows.rs and self_update/helper.rs.
- craft-jpeg: progressive Huffman decoding, carried into huffman.rs,
parse.rs and scan.rs.
- craft-print: the driver settings dialog's new tests and the bounded
XML parse's tests, as trials.
- Test-only conflicts: upstream tests from before the base that our side
cut stay cut; tests new upstream are kept.