Closed Manishearth closed 1 week ago
ugh. @sffc the md test for tweaking data providers uses new_default. I don't want to use the internal testing replacement, and using Baked data to get the default would be messy.
What do you recommend we do here?
I think it's possible that the new DecimalSymbols is no longer ideal for use in a tutorial, perhaps we should pick something else? List format?
I think it's possible that the new DecimalSymbols is no longer ideal for use in a tutorial, perhaps we should pick something else? List format?
Um... weekday names?
(Discussed with Shane in person: I just loaded data from Baked, it's not too noisy and most users of this will need to do something like that anyway so it's not out of place in the tutorial, which was my initial worry)
---- datagen::test_markers_for_bin stdout ----
thread 'datagen::test_markers_for_bin' panicked at components/icu/src/datagen.rs:96:5:
assertion `left == right` failed
left: [datetime/names/dayperiods@1, datetime/names/gregory/months@1, datetime/names/gregory/years@1, datetime/names/weekdays@1, datetime/patterns/glue@1, datetime/patterns/gregory/skeleton@1, datetime/patterns/time_skeleton@1, datetime/week_data@2]
right: [datetime/names/dayperiods@1, datetime/names/gregory/months@1, datetime/names/gregory/years@1, datetime/names/weekdays@1, datetime/patterns/glue@1, datetime/patterns/gregory/skeleton@1, datetime/patterns/time_skeleton@1, datetime/week_data@2, decimal/symbols@2]
Fixes https://github.com/unicode-org/icu4x/issues/4437
This doesn't work yet: there's no easy way to get Bake impls for custom VarULE types since
from_byte_slice_unchecked
can't be called in const contexts (since you can't do trait stuff in non-const contexts: in theory this function is very const-capable)I chose to use
make_varule
but VarTupleNULE would work as well (and plus we can give it the relevant Bake impl if we want). I wrote this PR to encapsulate things so that swapping the internals is easierI think I'll make this work by implementing ZeroCow: https://github.com/unicode-org/icu4x/issues/5561