Upgrade dependencies and switch from alga to simba#3
Conversation
hmeyer
left a comment
There was a problem hiding this comment.
Thanks for this change.
Please also bump the minor version of this package to 0.12.
| alga = "0.9" | ||
| num-traits = "0.2" | ||
| approx = "0.4" | ||
| approx = "0.5.0" |
There was a problem hiding this comment.
Why is it preferable to specify the full version instead of just the major+minor?
There was a problem hiding this comment.
I'm using the default conventions of the cargo-edit tool which was what I used to automate this change. I suppose it might help ensure that users of this crate get at least the version of a dependency that was used to run the test suite. Imagine if 0.5.2 is buggy, 0.5.3 is fine, and the tests of this crate were tested against 0.5.3. Setting the patch version ensures that users don't accidentally get the 0.5.2 version (ie. they get at least the version that this crate was tested against).
There was a problem hiding this comment.
Wouldn't ~0.5.3 be preferable in this case?
I think crates should not overly specific in their version requirements.
This is b/c if this crate required approx 0.5.3 and another crate foo required approx 0.5.4 then a binary using both bbox and foo would end up linking both approx 0.5.3 and 0.5.4.
There was a problem hiding this comment.
I suppose that in cargo, the default constraint is ^ (so writing x.y.z is the same as ^x.y.z). ^ behaves like ~ but also allows updates up to but not including the next major version. In essence, the version I specified here is equivalent to 0.5.0 <= x < 1.0.0.
I didn't put much thought into it to be honest, I just defaulted to whatever the rust tools do by default, which is using the best practices as set by the rust book/crates.io (which recommends defaulting to using bare x.y.z versions) and cargo-edit (which also calls out wanting to align with these best practices). Since this is your crate, you of course get to make the final call, and I would recommend sticking to the conventions as used by the cargo tools, but let me know if you prefer not to, and I can try to match the constraint convention you used before.
All bets are off here anyway since these crates aren't using semver major version 1, so technically 0.5.3 and 0.5.4 could have completely different APIs.
The
algacrate is deprecated and has been replaced bysimba. This PR also allows the introduction of a much newernalgebraversion which is pretty significant