You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
approx and rand define traits which must be implemented inside glam for them to be used in test and bench executables. Unfortunately this means they must be enabled by default so that a simple cargo test or cargo bench will work without needing to specify additional features. I'd rather not enable them by default.
For the purposes of glam's tests and benches it is probably easier to implement a simple non-crypto rand and some approx eq functions.
glam could use it's own approx_eq functions anyway as we don't re-export the approx crate, I'd prefer not to need users to have to import traits for this and the approx traits aren't documented much.
The rand crate is quite complex and we're not concerned with crypto strength random numbers for the purposes of our unit tests.
The current implementations of approx and rand can be kept unless it becomes a burden to maintain them.
approx
rand
The text was updated successfully, but these errors were encountered:
bitshifter
changed the title
Remove approx and rand from default featuers
Remove approx and rand from default features
Jul 21, 2019
I responded to your comment on my commit to Psychopath already, but reading this issue I realized I misunderstood a bit.
I think you don't actually need to have these enabled by default for using them in testing. You can just have them be a dev dependency, and have the impls hidden behind a #[cfg(test)] attribute. Maybe there are corner-cases I'm not aware of, but I think that works.
If that doesn't work, then rolling your own and making them testing-only definitely would, and I'd be in favor of that. I don't actually need approximate comparisons implemented in glam--I'm happy to roll my own as needed, and it seems orthogonal to glam's purpose.
Would also like to see both of them disabled by default, and ideally replacing approx::assert_ulps_eq in the tests with something internal in the crate to avoid always pulling in approx.
approx and rand define traits which must be implemented inside glam for them to be used in test and bench executables. Unfortunately this means they must be enabled by default so that a simple
cargo test
orcargo bench
will work without needing to specify additional features. I'd rather not enable them by default.For the purposes of glam's tests and benches it is probably easier to implement a simple non-crypto rand and some approx eq functions.
glam
could use it's ownapprox_eq
functions anyway as we don't re-export theapprox
crate, I'd prefer not to need users to have to import traits for this and theapprox
traits aren't documented much.The
rand
crate is quite complex and we're not concerned with crypto strength random numbers for the purposes of our unit tests.The current implementations of
approx
andrand
can be kept unless it becomes a burden to maintain them.The text was updated successfully, but these errors were encountered: