servo / app_units

https://crates.io/crates/app_units
3 stars 17 forks source link

Make serde and num-traits dependencies optional #44

Closed fschutt closed 6 years ago

fschutt commented 6 years ago

num-traits is only used for num_traits::Zero, which isn't used in webrender, probably only in servo. For webrender it can be turned off to reduce dependencies, besides - all it does is to construct an Au(0).

serde is also not needed in webrender, only for debugging, so that can be turned off, too. For backwards compatibility these features are turned on by default, in order to not break any application in the upgrade process. Also added testing for the features in isolation to the .travis.yml

Preparation for https://github.com/servo/webrender/issues/3045

fschutt commented 6 years ago

If this gets merged, is it possible to release a new version so that webrender can depend on it? Thanks in advance.

jdm commented 6 years ago

@bors-servo r+

bors-servo commented 6 years ago

:pushpin: Commit 693bd6f has been approved by jdm

bors-servo commented 6 years ago

:hourglass: Testing commit 693bd6f8ce3e4098fafe09518ccbc0f7afe3b48e with merge 7183948c3dce311a3c677fb8646400ff8b7e6c4d...

bors-servo commented 6 years ago

:sunny: Test successful - status-travis Approved by: jdm Pushing 7183948c3dce311a3c677fb8646400ff8b7e6c4d to master...

nox commented 6 years ago

That should have been a breaking change. Even if a crate has no feature, you can build it with default_features set to false and then it stops building when the dependencies are made optional and your code use them.