Closed sffc closed 10 months ago
My order of preference for feature names:
compile_data
: I think this is most accurate, it compiles the data into the binary. I doesn't imply where the data comes from, which is correct as the feature also allows to compile client-provided data into the binary. In documentation I'd like to call the provider-less constructor the "compile-time-data constructor", and the unstable, buffer, and any constructors the "runtime-data constructors", which would align nicely with this name.compiled_data
: Sounds a bit more like we already compiled that data in, but the user can actually do this themselves.data
: Most concise. I don't think this is ambiguous on the component crates; on infrastructure crates like icu_provider
it could be, but on a component it can only really mean one thing: enable the data.baked_data
: We've been using this term already (although not consistently, the datagen mode is called --format=mod
, the testdata provider unstable
). I think "baked" is a good description for the data format, but less fitting for the constructors and the concept of compiling in data.auto_data
: I don't think the data being automatically included is the best way to describe this. Clients can still manually set data at compile time, and it's not doing anything fancy like static analysis automatically.builtin_data
: not accurate, as it's possible to use user-generated baked data via an env variable, so no data built into the crate will be used.globaldata
: overloaded with the visibility descriptor in programming, and the data isn't necessarily global, as the user can supply their own (and CLDR doesn't have 100% coverage anyway).We didn't record a conclusion on whether to make this a default feature in https://github.com/unicode-org/icu4x/issues/2945#issuecomment-1583147339, but iirc there wasn't any opposition to this proposal.
--no-default-features
which is not great (it causes stability issues, etc). The other downside is compile times.try_new
amongst the mess of constructors.embedded_data
is what Bazel calls itcommon_data
. Or maybe shared_data
.embedded
is that we're compiling something, not embedding something that already existscompiled_data
LGTM: @robertbastian @zbraniecki @skius @eggrobin @Manishearth (@sffc)
Outstanding tasks:
try_new
constructors compiled_data
feature needs to be enabled
What should the feature be called that enables globaldata?
What name should we use for the constructors?
We had discussed in https://github.com/unicode-org/icu4x/issues/2945#issuecomment-1583147339 that the constructor names should clearly indicate the provenance of the data, but @robertbastian raised some concerns in https://github.com/unicode-org/icu4x/issues/2945#issuecomment-1591011051 that we should discuss further.
Discuss with:
Optional: