Skip to content

Fix LT-22605: Add ability to limit Hermit Crab parses - #1071

Merged
jtmaxwell3 merged 2 commits into
mainfrom
LT-22605
Aug 18, 2026
Merged

Fix LT-22605: Add ability to limit Hermit Crab parses#1071
jtmaxwell3 merged 2 commits into
mainfrom
LT-22605

Conversation

@jtmaxwell3

@jtmaxwell3 jtmaxwell3 commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

This fixes https://jira.sil.org/browse/LT-22605. It adds a MaxAlternatives parameter to the Parser Parameters dialog and uses it to set MaxAlternatives in a new version of Hermit Crab.


This change is Reviewable

@AndyBlack AndyBlack left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   9m 22s ⏱️ - 1m 2s
5 774 tests ±0  5 693 ✅ ±0  81 💤 ±0  0 ❌ ±0 
5 783 runs  ±0  5 702 ✅ ±0  81 💤 ±0  0 ❌ ±0 

Results for commit 4fcaa4b. ± Comparison against base commit 99858db.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.07%. Comparing base (99858db) to head (1d48902).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
Src/LexText/ParserCore/HCParser.cs 0.00% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1071      +/-   ##
==========================================
+ Coverage   38.04%   38.07%   +0.02%     
==========================================
  Files        1499     1499              
  Lines      350127   350154      +27     
  Branches    40239    40241       +2     
==========================================
+ Hits       133215   133323     +108     
+ Misses     187625   187550      -75     
+ Partials    29287    29281       -6     
Files with missing lines Coverage Δ
Src/LexText/ParserCore/HCParser.cs 0.20% <0.00%> (-0.01%) ⬇️

... and 126 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thejambi

Copy link
Copy Markdown
Contributor

Src/LexText/ParserCore/HCParser.cs line 175 at r1 (raw file):

				if (maxRootsElem != null)
					maxStemCount = int.Parse(maxRootsElem.Value);
				if (maxRootsElem != null)

Is this if intended to check maxRootsElem again like the check just before it? Should it be checking maxAlternativesElem instead?

@jtmaxwell3

Copy link
Copy Markdown
Collaborator Author

@thejambi: Good catch! Thanks!

@thejambi

Copy link
Copy Markdown
Contributor

Src/LexText/ParserUI/ParserParametersDlg.cs line 46 at r1 (raw file):

		private const string MaxInterfixes = "MaxInterfixes";
		private const string MaxRoots = "MaxRoots";
		private const string MaxAlternatives = "MaxAlternatives";

Should we add a EnforceValidValue call for MaxAlternatives in the ValidateValues method? It looks like 0 would be the minimum, but I am not sure what we would want to cap the maximum value for this at.

@thejambi thejambi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thejambi reviewed 4 files and all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on jtmaxwell3).

@jtmaxwell3
jtmaxwell3 enabled auto-merge (squash) August 18, 2026 14:44

@thejambi thejambi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good!

@thejambi reviewed 5 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on jtmaxwell3).

@thejambi thejambi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thejambi resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on jtmaxwell3).

@jtmaxwell3
jtmaxwell3 merged commit 0ab90ff into main Aug 18, 2026
6 of 7 checks passed
@jtmaxwell3
jtmaxwell3 deleted the LT-22605 branch August 18, 2026 15:17
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.

4 participants