Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LT-21205: Features should obey the order set in Feature Types #319

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jtmaxwell3
Copy link
Contributor

@jtmaxwell3 jtmaxwell3 commented Feb 28, 2025

This fixes https://jira.sil.org/browse/LT-21205 by changing LongName to sort features based on the order in the type with any remaining features sorted alphabetically afterwards. I also made LongNameSorted use the same code as LongName.


This change is Reviewable

Copy link

LCM Tests

    8 files   -     8      8 suites   - 8   1m 45s ⏱️ - 1m 8s
2 830 tests ±    0  2 787 ✅  -    23  43 💤 +23  0 ❌ ±0 
5 634 runs   - 5 634  5 548 ✅  - 5 541  86 💤  - 93  0 ❌ ±0 

Results for commit 6605851. ± Comparison against base commit d0d49ca.

This pull request skips 23 tests.
SIL.LCModel.Utils.FileUtilsTest ‑ ActualFilePath_DirectoryNameComposedFilenameExistsWithDifferentCase_Linux
SIL.LCModel.Utils.FileUtilsTest ‑ ActualFilePath_DirectoryNameDecomposedFilenameExistsWithDifferentCase_Linux
SIL.LCModel.Utils.FileUtilsTest ‑ ActualFilePath_DirectoryNameExactMatchFilenameExistsWithDifferentCase_Linux
SIL.LCModel.Utils.FileUtilsTest ‑ ChangeLinuxPathIfWindows_inLinux_unchanged
SIL.LCModel.Utils.FileUtilsTest ‑ ChangeWindowsPathIfLinuxPreservingPrefix_doesNotStartWithPrefixAndHasLowercaseDrive_works
SIL.LCModel.Utils.FileUtilsTest ‑ ChangeWindowsPathIfLinuxPreservingPrefix_lowercaseDrive_works
SIL.LCModel.Utils.FileUtilsTest ‑ ChangeWindowsPathIfLinux_DoubleDriveLetters_changed
SIL.LCModel.Utils.FileUtilsTest ‑ ChangeWindowsPathIfLinux_OneBackslash_changed
SIL.LCModel.Utils.FileUtilsTest ‑ ChangeWindowsPathIfLinux_arbitraryDrive_error
SIL.LCModel.Utils.FileUtilsTest ‑ ChangeWindowsPathIfLinux_driveOnlyLowercase_changed
…

var iCount = FeatureSpecsOC.Count;
if (iCount > 0)
if (spec.FeatureRA == null)
return "";
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure when exactly this would get hit, but it will mean this spec will be sorted to the front, and if there's more than one spec with a null RA then they will not be consistently ordered. I'd either have a fallback ordering or return something like "2"+spec.Guid to ensure that they're always ordered consistently.

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.

2 participants