Repository navigation
LT-22930: HCLoader reports every item it skips - #1274
Draft
johnml1135 wants to merge 3 commits into
Draft
johnml1135 wants to merge 3 commits into
johnml1135 wants to merge 3 commits into
Conversation
Comment hygiene (advisory)8 comment-style violation(s) in the lines this branch adds since
Fix them per |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## fw-skip-dup-boundary #1274 +/- ##
========================================================
+ Coverage 40.93% 40.95% +0.02%
========================================================
Files 1603 1603
Lines 360839 360981 +142
Branches 42252 42270 +18
========================================================
+ Hits 147694 147846 +152
+ Misses 183648 183645 -3
+ Partials 29497 29490 -7
🚀 New features to boost your workflow:
|
johnml1135
force-pushed
the
lt-22930-hcloader-skip-warnings
branch
from
December 2, 2026 03:15
b73fd38 to
fa13c4a
Compare
johnml1135
force-pushed
the
fw-skip-dup-boundary
branch
from
December 2, 2026 03:31
38633c1 to
3256f14
Compare
The loader skipped several items without telling the user: natural classes with a skipped phoneme, rule contexts that refer to a skipped class, phoneme or boundary marker, rules with nothing to apply, forms with no usable environment or morph type, stem names without regions, affix slots and templates whose affixes were skipped, and co-occurrence rules that refer to a skipped allomorph or morpheme. Each of these now goes through one new IHCLoadErrorLogger method, SkippedItem(item, skipped, reason). Which items load is unchanged. The XML logger writes a skipped-item LoadError, and both FormatCommon transforms show its reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Applying a metathesis rule looks up both switch groups by name, so a rule kept without one of them throws when it matches. The loader now skips such a rule and reports it, as Machine's XML loader does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A slot or template is now reported only when a warning already named why its affixes were skipped, and a slot shared by several templates is reported once. A metathesis rule dropped for a lost switch gives one report that names the skipped item, not two. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
johnml1135
force-pushed
the
lt-22930-hcloader-skip-warnings
branch
from
December 2, 2026 03:31
fa13c4a to
93042b3
Compare
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.
Stacked on #1273, which lands first; this PR's base is its branch.
Start here:
HCLoader.cs, then the newIHCLoadErrorLogger.SkippedItem.What it does. The Hermit Crab loader never fails on bad data. It skips the item and warns. Several skips were silent, so the parser gave different results with no explanation (LT-22930). Every skip now reports through one new method,
SkippedItem(item, skipped, reason).skippedis the thing the item refers to that was skipped, or null. Which items load is unchanged, with one exception: a metathesis rule that lost a switch context is now dropped and reported. Kept, it throws when applied, because the rule looks up both switch groups by name.New warnings, by what is dropped:
Where to look.
InvalidShapeand similar warnings, so it gets no second one.LoadPatternNodetakes the owning rule, so only rewrite and metathesis contexts report. Affix process contexts already throwInvalidAffixProcessException.IsValidRuleFormgains anoutreason;HasValidRuleFormstill uses the plain overload, so nothing is reported twice.FormatCommon.xslandHCSynthByGlossFormatCommon.xslshow the reason; without a case they would print the raw element text.Not here.
LoadPatternNodes,LoadReduplicationPatterns).IsValidEnvironmentrejects those environments first, so they are covered byInvalidEnvironment.LoadBoundaryMarker.Other loggers.
ConsoleLogger(GenerateHCConfig) and the test logger implement the method. PanGloss'sDiagnosticLoggerimplementsIHCLoadErrorLoggertoo and will needSkippedItemwhen it takes this change.Verification. Not built locally: net48 needs Windows. New tests in
HCLoaderTestspin each kind of report; CI is the first run.Next: approve, or tell me which reports are too noisy to keep.
🤖 Generated with Claude Code
This change is