Skip to content

Look up the anthropology list writing system by its tag - #417

Open
hahn-kev wants to merge 1 commit into
masterfrom
fix/anthro-list-ws-lookup
Open

hahn-kev wants to merge 1 commit into
masterfrom
fix/anthro-list-ws-lookup

Conversation

@hahn-kev

@hahn-kev hahn-kev commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #416.
We have this bug when calling Create new project.


AI summary

When CreateNewLangProj gets no anthropology list file, it names the empty list in the default analysis writing system. It looked that writing system up with GetWsFromStr(analWrtSys.IcuLocale), but GetWsFromStr expects a language tag. That only works when the two match. For pt-BR (ICU locale pt_BR) the lookup returned 0 and project creation threw.

This passes analWrtSys.Id, which CreateAnalysisWritingSystem already uses to register the same writing system.

Found from LexBox, which creates projects without a list file.

Test plan

  • New LcmCacheTests.CreateNewLangProject_DefaultAnalysisWsWithIcuLocaleDifferentFromTag creates a project with pt-BR as the default analysis writing system and checks the list is named in it. It fails without the fix and passes with it (net8.0).
  • The other LcmCacheTests.CreateNewLangProject* tests still pass.

🤖 Generated with Claude Code


This change is Reviewable

CreateNewLangProj named the empty Anthropology Categories list in the
default analysis writing system, found with GetWsFromStr(IcuLocale).
GetWsFromStr expects a language tag, so creation threw for a writing
system like pt-BR, whose ICU locale is pt_BR.

Fixes #416

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

LCM Tests

   16 files  ±    0     16 suites  ±0   1m 22s ⏱️ -38s
2 913 tests +   26  2 893 ✅ +   26   20 💤 ± 0  0 ❌ ±0 
8 625 runs   - 2 871  8 491 ✅  - 2 837  134 💤  - 34  0 ❌ ±0 

Results for commit e94e9bc. ± Comparison against base commit da7140f.

@myieye myieye 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.

Looks safe and solid to me and my robot 🤖

We're now using the same ID that is used by the create on L404=>L748.
That consistency basically speaks for itself.

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.

CreateNewLangProj throws when the default analysis writing system's ICU locale differs from its tag

2 participants