-
Notifications
You must be signed in to change notification settings - Fork 176
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
Per-component features for icu_capi #2602
Comments
The benefit of this change is unclear other than reduced build times. It doesn't have an effect on I'm not opposed to it, but icu_capi already has a lot of features, so I want to make sure this change is well-motivated before we do it. |
I also want this: it will have an effect on Google3 vendoring at least; and @iwsfutcmd indicated that being able to import a small deptree would help his case for using ICU4X. I'm not convinced by "component crates have very few dependencies outside of ICU4X anyway" because the component crates are themselves dependencies and we have quite a few of them. Also, we already do this for the metacrate. I do think we should have |
See also: #3165 |
Okay, go ahead with the component-level features on icu_capi, but...
<rant> IIRC, the only real reason we went with separate crates was to make it more explicit when things depended on other things and make it harder to get into the spaghetti situation like ICU4J. (Crates help with that but aren't a panacea. We could have built separate tooling that looked on a class level, for example.) In other words, this thread makes it seem as if a decision we made primarily with our own development workflow as the priority is now getting in the way of adoption. That's very bad. |
Back on topic: how do you feel about the features being limited to icu_capi and NOT icu_capi_cdylib, etc. I'm slightly worried about getting into a situation where there are files named icu_capi_cdylib.so that export different sets of symbols. The cdylib crate doesn't do much and can easily be replicated by clients (they most likely will need to do so anyway). |
I think this is collapsing the space of potential users into too small a use case space. Different people have different needs. Some people want "few external dependencies". ICU4X (capi) being a large bundle does defeat that purpose a little bit because some of the ICU4X components have non-ICU4X dependencies. Not much, but a little. Some people have to deal with vendoring and updates. There the absolute number matters. While I'm certainly in this boat I consider this to be less of an issue overall. Large projects have to deal with this kind of thing and we can try to make it nice but if there's a tradeoff we do not need to prioritize this. For some people ICU4X itself is rather large. If your goal is experimentation with just, say, normalization, it becomes harder to make your case if you're pulling in a large library than when you're pulling in a small one. The slicing of ICU4X is irrelevant here: it's a problem when you have single large crate and a problem when you have multiple small ones. It's especially a problem if you have crate audit/review policies where you're supposed to code review all imports. I think our value judgement was correct, crate number is not that huge a deal. But total size still is, and if we have the ability to be flexible on that angle I think we should.
Fine with that, though perhaps capi_cdylib should do the "disable all features and enable them by default" trick. I don't care strongly, I agree that complex users might want their own entrypoint anyway. |
Group consensus is to move forward with this proposal. LGTM: @sffc @Manishearth @robertbastian |
When I am testing
icu_capi
in Gecko,icu_capi
cannot select components excepting to provider. Example, when I want segmenter FFI only,icu_capi
has to build all components such asdatetime
unfortunately. Since Gecko usescargo vendor
, I don't want to copy/build unused components in Gecko's source tree.So I hope that
icu_capi
has more features to selecticu_*
components only such asfeature = ["datetime", "colletor"]
.The text was updated successfully, but these errors were encountered: