icu4x
icu4x copied to clipboard
Docs cleanup: use `icu::` consistently
I feel like we should introduce a common style for all our documentation. The icu
crate, which will probably be any client's entry point to ICU4X uses icu::
in its examples, as do some other crates. However, we also have some crates don't go through the icu
crate, so at some point our documentation changes from icu::
to icu_
, which is inconsistent.
I suspect the default for users will be to include the whole icu
crate, and the split into separate crates is more for our sake (and maybe for rare scenarios where users really care about compile times).
Should we standardize all our documentation and examples to icu::
?
Previously discussed in https://github.com/unicode-org/icu4x/issues/424 and fixed in https://github.com/unicode-org/icu4x/pull/616
Ah, before my time. I don't think this is consistently used, so let's keep this open to track cleanup?
Yep. Changing labels because I think there's not much to discuss. In packages that are re-exported by icu
, we should use icu::
docs.
What about datagen? Which crate(s) should it use to name data structs?
Internally in our code, we should always use icu_
. The icu::
is only for docs in the relevant crates.
*databake, not datagen. What prefix should we use in the generated files? Clients will have to import different crates depending on that.
hmm. Seems like maybe it could be a configuration option for whether to generate icu::
or icu_
bindings. We need to be able to generate the icu_
bindings since we know we have clients who care about the modularization, so if we add support for icu::
in databake, it should be additive.
Yes we need an option for both, but I believe icu::
should be the default
Using icu::
as the default sounds fine to me. It should make things easier for clients.