Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMint flavour integration #205
Conversation
| @@ -10,12 +10,14 @@ categories = ["science"] | |||
| license = "MIT / Apache-2.0" | |||
|
|
|||
| [features] | |||
| minted = ["mint"] | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kvark
Jun 2, 2017
Author
Member
It's not possible. Feature name has to be different from the dependency name.
This comment has been minimized.
This comment has been minimized.
nox
Jun 2, 2017
Member
I know, that's because optional dependencies are already features on their own.
This comment has been minimized.
This comment has been minimized.
kvark
Jun 2, 2017
Author
Member
Edit: actually, if I just remove it from features, I can use mint. TIL
|
Updated for mint-0.4 now |
|
|
|
I am not opposed to this. Do you have confidence that mint won't have breaking changes for a while? That's the one thing I am trying to avoid. |
|
@nical I don't want to put that confidence on the table just yet, even though version 0.4 has been around for more than 4 month now. But then, |
|
Right, euclid isn't set in stone but updating it is a huge pain due to the number of crates that need bumping in servo's ecosystem, and (I think) the mess that it is to update gecko to pick it up now (my understanding is that we need to update gecko's version of stylo and webrender to have the updated euclid dependency in the same push). |
|
Understood.
I'm totally fine with holding this up in the air until someone actually comes and asks to use euclid with one of the mint-supporting libraries (obj-rs, three-rs, amethyst?, etc). |
|
Currently blocked by kvark/mint#29 |
icefoxen
commented
Aug 2, 2018
|
@kvark Is this still blocked? If not I'll happily clean up any changes/conflicts that remain. |
|
@icefoxen no, since we merged kvark/mint#30 |
icefoxen
commented
Aug 2, 2018
|
Made a PR to the kvark's mint branch: kvark#1 Not sure if there's a better way to do it. |
|
@icefoxen the proper would be rebase my changes on latest, fix them, and file a separate PR here. |
|
@nical sorry about the back and forth on this thing. PR is up to date with master now. Please have a look. |
|
Looks good overall, just a simple change about the public dependency and the duplicated lines to fix. |
| @@ -60,10 +60,14 @@ | |||
| #[macro_use] | |||
| extern crate serde; | |||
|
|
|||
| #[cfg(feature = "mint")] | |||
| extern crate mint; | |||
This comment has been minimized.
This comment has been minimized.
nical
Aug 17, 2018
Collaborator
Please make it pub extern crate mint;. exposing the mint dependency allows a crate that already depends on euclid to just use euclid's mint and not worry about maintaining the versions in sync in Cargo.toml.
Also, it looks like this extern crate mint; is duplicated a few lines below.
| @@ -10,8 +10,12 @@ | |||
| use super::UnknownUnit; | |||
| use approxeq::ApproxEq; | |||
| use length::Length; | |||
| #[cfg(feature = "mint")] | |||
| use mint; | |||
This comment has been minimized.
This comment has been minimized.
nical
Aug 17, 2018
Collaborator
Another duplication (I assume git merge hazard?). Most likely the reason travis is upset.
| use super::{UnknownUnit, Angle}; | ||
| #[cfg(feature = "mint")] | ||
| use mint; |
This comment has been minimized.
This comment has been minimized.
|
@nical thanks for the review! The duplicated entries are surprising, I fixed them now. |
|
Yeah, git merge/rebase sometimes messes things up in ways similar to this. @bors-servo r+ |
|
|
Mint flavour integration Standard interop FTW: https://github.com/kvark/mint I'm not pushing `mint` for early adoption here, completely fine to have this PR waiting for a bigger picture to see how it gets accepted into other libraries. cc @nical @nox <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/205) <!-- Reviewable:end -->
|
|
|
Holy rainbows, this has finally happened! |
kvark commentedJun 2, 2017
•
edited by larsbergstrom
Standard interop FTW: https://github.com/kvark/mint
I'm not pushing
mintfor early adoption here, completely fine to have this PR waiting for a bigger picture to see how it gets accepted into other libraries.cc @nical @nox
This change is