Skip to content
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

Mint flavour integration #205

Merged
merged 1 commit into from Aug 20, 2018
Merged

Mint flavour integration #205

merged 1 commit into from Aug 20, 2018

Conversation

@kvark
Copy link
Member

kvark commented Jun 2, 2017

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


This change is Reviewable

Cargo.toml Outdated
@@ -10,12 +10,14 @@ categories = ["science"]
license = "MIT / Apache-2.0"

[features]
minted = ["mint"]

This comment has been minimized.

@nox

nox Jun 2, 2017

Member

Can you just use the mint feature please?

This comment has been minimized.

@kvark

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.

@nox

nox Jun 2, 2017

Member

I know, that's because optional dependencies are already features on their own.

This comment has been minimized.

@kvark

kvark Jun 2, 2017

Author Member

Edit: actually, if I just remove it from features, I can use mint. TIL

@kvark kvark mentioned this pull request Jun 6, 2017
@kvark kvark force-pushed the kvark:mint branch from f2051c1 to f3f27f2 Jun 6, 2017
@kvark kvark changed the title Mint support for points, vectors, sizes, and transformations Mint flavour integration Jun 6, 2017
@kvark
Copy link
Member Author

kvark commented Jun 6, 2017

Updated for mint-0.4 now

@kvark kvark mentioned this pull request Jun 7, 2017
9 of 10 tasks complete
@bors-servo
Copy link
Contributor

bors-servo commented Jun 14, 2017

The latest upstream changes (presumably #196) made this pull request unmergeable. Please resolve the merge conflicts.

@kvark
Copy link
Member Author

kvark commented Oct 9, 2017

@nox @nical
FWIW, both cgmath and nalgebra are now friends with mint

@nical
Copy link
Collaborator

nical commented Oct 10, 2017

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.

@kvark
Copy link
Member Author

kvark commented Oct 10, 2017

@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, euclid is not set in stone either.

@nical
Copy link
Collaborator

nical commented Oct 10, 2017

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).
I meant that more as "if you have plans to introduce breaking changes in the short(-ish) term, maybe it is best to do them first and then add mint to euclid".

@kvark
Copy link
Member Author

kvark commented Oct 10, 2017

Understood.

I meant that more as "if you have plans to introduce breaking changes in the short(-ish) term, maybe it is best to do them first and then add mint to euclid".

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).

@kvark
Copy link
Member Author

kvark commented Apr 3, 2018

Currently blocked by kvark/mint#29

@icefoxen
Copy link

icefoxen commented Aug 2, 2018

@kvark Is this still blocked? If not I'll happily clean up any changes/conflicts that remain.

@kvark
Copy link
Member Author

kvark commented Aug 2, 2018

@icefoxen no, since we merged kvark/mint#30
Thank you in advance if you decide to clean this up!

@icefoxen
Copy link

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.

@kvark
Copy link
Member Author

kvark commented Aug 2, 2018

@icefoxen the proper would be rebase my changes on latest, fix them, and file a separate PR here.

@kvark
Copy link
Member Author

kvark commented Aug 17, 2018

@nical sorry about the back and forth on this thing. PR is up to date with master now. Please have a look.

Copy link
Collaborator

nical left a comment

Looks good overall, just a simple change about the public dependency and the duplicated lines to fix.

src/lib.rs Outdated
@@ -60,10 +60,14 @@
#[macro_use]
extern crate serde;

#[cfg(feature = "mint")]
extern crate mint;

This comment has been minimized.

@nical

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.

@nical

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.

@nical

nical Aug 17, 2018

Collaborator

Duplication, blah blah, etc. ad lib.

@kvark kvark force-pushed the kvark:mint branch from 67d77e0 to 1f4618c Aug 20, 2018
@kvark
Copy link
Member Author

kvark commented Aug 20, 2018

@nical thanks for the review! The duplicated entries are surprising, I fixed them now.

@nical
Copy link
Collaborator

nical commented Aug 20, 2018

Yeah, git merge/rebase sometimes messes things up in ways similar to this.

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Aug 20, 2018

📌 Commit 1f4618c has been approved by nical

@bors-servo
Copy link
Contributor

bors-servo commented Aug 20, 2018

Testing commit 1f4618c with merge 5ab2b59...

bors-servo added a commit that referenced this pull request Aug 20, 2018
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 -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 20, 2018

☀️ Test successful - status-travis
Approved by: nical
Pushing 5ab2b59 to master...

@bors-servo bors-servo merged commit 1f4618c into servo:master Aug 20, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@kvark
Copy link
Member Author

kvark commented Aug 20, 2018

Holy rainbows, this has finally happened!
@icefoxen we did it 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.