Conversation
|
I hit one design question while making up For I paused changes here to align with the intended data model. |
|
@robertbastian Does databake support making a const accessor for the root diacritic table even if we also have a locale override for it for Vietnamese? |
|
Yes, like so |
|
Thanks. I will wire this up using |
robertbastian
left a comment
There was a problem hiding this comment.
please put this behind an unstable feature, I don't think we have decided on the name of the method, and whether it should live on Collator or CollatorBorrowed.
| /// This constructor is: | ||
| /// - const | ||
| /// - infallible | ||
| /// - locale independent |
There was a problem hiding this comment.
this is all obvious from the signature, I don't think we need to repeat this
you do need to add the "enabled with feature" snippet to the docs though
There was a problem hiding this comment.
I have gated it behind unstable and added feature snippet in the docs.
|
Thanks. one clarification on the remaining ci failures. even with should this be resolved by either enabling happy to adjust the implementation once the intended approach is confirmed. |
|
Gentle follow up on this: CI is still failing due to To unblock the PR, should I, enable Happy to implement whichever direction you prefer. |
yes, I already said that last week and you already said that you were going to do it |
|
Got it. thanks for confirming. |
|
After investigation, Happy to adjust to suggested changes. |
|
it doesn't generate a singleton but it generates a const for each locale. have a look at the generated code |
|
I checked the generated data, should new_root() stay const and defer diacritics loading, or is it ok to make it non const and load diacritics via the provider. thanks |
|
I think to achieve the goal of the issue, |
|
Thanks, that makes sense. I agree that I will wait for guidance on the preferred mechanism before making further changes. |
because you haven't regenerated the data since you changed the config. are you aware that CI is failing? |
|
I have regenerated the required baked data for The remaining CI failures are in clippy / docs / msrv / full datagen. clippy is currently complaining about missing_docs coming from the generated before allowing missing_docs for these generated baked constants, I wanted to check that is this the expected fix here, or is there a preferred pattern for documenting non singleton baked data? |
|
I don't have the capacity to answer questions for every tiny step. just do something, we can then see if it's ok |
I understand. i will come up with a fix and do this right away. |
|
CI checks are passing now after regenerating the out of sync generated data. docs, datagen, and msrv are green. really sorry for the earlier back and forth, and thanks for your patience, really appreciate your time. |
|
The remaining failing check is full-datagen, which reports out of sync baked data for the new Running |
|
|
|
Added the baked data for collator. While fixing clippy/doc/msrv failures, I noticed the generated This change requires regenerating the full baked data. I am disk constrained locally and can’t run cargo make bakeddata, so if someone with the full datagen setup could regenerate and push the updated baked data, that should resolve the remaining CI failure. Happy to adjust if this isn’t the preferred approach. |
Fixes #6633
This PR adds a const, infallible
CollatorBorrowed::new_root()constructor backed by baked root collation data.The implementation mirrors the invariants enforced in
try_new()but avoids locale resolution and fallible paths.Note on diacritics:
Root diacritics are included explicitly to match the invariants expected by the comparison pipeline and the existing baked data runtime path. also, there is no separate root specific baked diacritics singleton, so the default baked diacritics payload is used.