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

Rowan tonel format is not sorting methods by Unicode code point (as specified in the tonel spec) #953

Open
dalehenrich opened this issue Feb 24, 2025 · 2 comments

Comments

@dalehenrich
Copy link
Member

dalehenrich commented Feb 24, 2025

Rowan currently uses Unicode sort order, however Unicode sort order is subject to the Locale and tonel method sort order needs to be independent of Locale see internal GemStone bug 51330).

The tonel spec calls out that the sort order should be Unicode code point order.

This needs to be fixed in Rowan 3.

dalehenrich added a commit to dalehenrich/RowanSample9V2 that referenced this issue Feb 24, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Feb 24, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Feb 24, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Feb 24, 2025
@dalehenrich
Copy link
Member Author

dalehenrich commented Feb 25, 2025

In order to sort by unicode code point the codePointCompareTo: method should be used in GemStone (thanks @martinmcclure!):

({
'A_bc123' .
'foo' .
'_123Abc' .
'_123abc' .
'_ABC123' .
'_abc123' .
} collect:[:each | each asUnicodeString ]) sortWithBlock: [:a :b | (a
codePointCompareTo: b) < 1]

@dalehenrich
Copy link
Member Author

dalehenrich commented Feb 26, 2025

It seems that switching to Unicode code point sort order is a bigger change than originally thought

({
'Foo'.
'a_Bc123'.
'A_bc123' .
'foo' .
'_123Abc' .
'_123abc' .
'_ABC123' .
'_abc123' .
} collect:[:each | each ]) sortWithBlock: [:a :b | (a UnicodeString
codePointCompareTo: b) < 1]  

produces:

{
'A_bc123'.
'Foo'.
'_123Abc'.
'_123abc'.
'_ABC123'.
'_abc123'.
'a_Bc123'.
'foo'.
}

While sorting using Unicode sort order:

{
'Foo'.
'a_Bc123'.
'A_bc123' .
'foo' .
'_123Abc' .
'_123abc' .
'_ABC123' .
'_abc123' .
} collect:[:each | each asUnicodeString  ]) sort 

produces:

{
'_123abc'.
'_123Abc'.
'_abc123'.
'_ABC123'.
'a_Bc123'.
'A_bc123'.
'foo'.
'Foo'
}

Note that case differences significantly impacts sort order.

The implication is that there could be significant method order changes when switching the sorting algorithm, so we can't just change the method sort order used with existing Rowan 3 repositories ...

As a consequence, it will be necessary to allow users to choose to continue to use the old method sort order (unicode) or switch to the new method sort order (codePoint).

The unicode sort order will be used for existing repositories and for new repositories users will be able to choose which sort order will be used.

Newly created repositories will use codePoint sort order by default.

dalehenrich added a commit that referenced this issue Feb 26, 2025
…before realizing that I would be jeopardizing my ability the cleanly merge work from other branches ... so this branch should not be merged
dalehenrich added a commit to dalehenrich/RowanSample9V2 that referenced this issue Feb 28, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V2 that referenced this issue Feb 28, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Feb 28, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Feb 28, 2025
dalehenrich added a commit that referenced this issue Feb 28, 2025
…ll test support for unicode codePoint method sort order
dalehenrich added a commit that referenced this issue Mar 1, 2025
…rt for sorting using unicode codePoint or Unicode sort order; preparing to create RowanSample9V4 repos ... initial tests look good
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 3, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 7, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 7, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 7, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 8, 2025
dalehenrich added a commit to dalehenrich/RowanSample12 that referenced this issue Mar 8, 2025
dalehenrich added a commit that referenced this issue Mar 8, 2025
dalehenrich added a commit that referenced this issue Mar 10, 2025
…ry tests: update expeted tests results for battery test; address regression in RwTestProjectLibraryGeneratorTestV3>>testRowanSample12LibraryGenerator
dalehenrich added a commit to dalehenrich/RowanSample9V2 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V2 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V2 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V2 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V3 that referenced this issue Mar 10, 2025
dalehenrich added a commit to dalehenrich/RowanSample9V4 that referenced this issue Mar 10, 2025
dalehenrich added a commit that referenced this issue Mar 10, 2025
…nal RwRowanSample9V4Test cases added (incorrectly omitted)
dalehenrich added a commit that referenced this issue Mar 11, 2025
…er batch of regressions ... final work is resolving spec_0068 issues
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

No branches or pull requests

1 participant