Repository navigation
HCLoader: skip a duplicate boundary marker and warn instead of failing the load - #1273
Draft
johnml1135 wants to merge 4 commits into
Draft
johnml1135 wants to merge 4 commits into
johnml1135 wants to merge 4 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Comment hygiene (advisory)4 comment-style violation(s) in the lines this branch adds since
Fix them per |
johnml1135
force-pushed
the
fw-skip-dup-boundary
branch
from
December 1, 2026 20:06
07cb31d to
d72aa7d
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1273 +/- ##
=======================================
Coverage 40.92% 40.92%
=======================================
Files 1603 1603
Lines 360816 360839 +23
Branches 42246 42252 +6
=======================================
+ Hits 147678 147688 +10
- Misses 183645 183653 +8
- Partials 29493 29498 +5
🚀 New features to boost your workflow:
|
A boundary marker whose representation duplicates a phoneme or another marker is skipped with no definition entry, so references to it fail like an unknown boundary. The system morpheme boundary is loaded first so it always wins over a custom marker coded the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The null and morpheme boundaries go into the character table first, so a custom marker coded the same (+ or the null representations) is the one skipped and warned about. m_morphBdry comes from the system marker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A phoneme coded + or with a null representation now takes the duplicate grapheme path instead of displacing the system boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phoneme n carries features, so exact equality with a bare segment failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
johnml1135
force-pushed
the
fw-skip-dup-boundary
branch
from
December 2, 2026 03:31
38633c1 to
3256f14
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.
Start here:
Src/LexText/ParserCore/HCLoader.cs,LoadCharacterDefinitionTable(the boundary loop).A project with two boundary markers both coded
+fails to load in FLEx: HCLoader adds both to Machine'sCharacterDefinitionTableand the second add throws (sillsdev/PanGloss#640). HCLoader now pre-checksm_table.Containsfor boundary markers, the way it already does for phonemes. A colliding marker is skipped, never added tom_charDefs, and reported through a newIHCLoadErrorLogger.DuplicateBoundaryMarker. Phonemes already warned viaDuplicateGrapheme; that path is unchanged.A reference to a skipped marker finds no
m_charDefsentry, soTryLoadSimpleContextreturns false and the caller reports the context as invalid, the same as for an unknown boundary today. No null dereference. This matches PanGloss, which rejects the colliding boundary and errors "unknown boundary marker" on each use (sillsdev/machine#665 review). It works on today's Machine and stays correct once #665 makes a skippedAddreturn null.Where to look
HCLoader.cs: skip is whole-marker (any rep colliding skips all of its reps), same as phonemes.HCParser.cs(XMLduplicate-boundary-markerload error),GenerateHCConfig/ConsoleLogger.csand the test logger.DuplicateBoundaryMarkersandBoundaryMarkerSharingPhonemeGraphemeinHCLoaderTests.cs.Not here: the synthetic
m_null,.and+boundaries added after the loop are unchanged; no new parser-trace UI for the load error.Verification: not built or run locally (the project targets net48 and FieldWorks does not build on Linux); relies on PR CI.
Next: review, then let CI run the HCLoader tests.
🤖 Generated with Claude Code
This change is