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

statrs 0.6.0 and 0.7.0 beta regression #43680

Closed
est31 opened this issue Aug 5, 2017 · 7 comments
Closed

statrs 0.6.0 and 0.7.0 beta regression #43680

est31 opened this issue Aug 5, 2017 · 7 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@est31
Copy link
Member

est31 commented Aug 5, 2017

statrs versions 0.6.0 and 0.7.0 regressed from stable to beta (full log 1, full log 2):

Aug 03 23:18:26.668 INFO blam! error[E0061]: this function takes 1 parameter but 0 parameters were supplied
Aug 03 23:18:26.668 INFO blam!  --> <anon>:7:11
Aug 03 23:18:26.668 INFO blam!   |
Aug 03 23:18:26.668 INFO blam! 7 | assert!(x.max().is_nan());
Aug 03 23:18:26.668 INFO blam!   |           ^^^ expected 1 parameter
Aug 03 23:18:26.668 INFO blam! 
Aug 03 23:18:26.668 INFO blam! error[E0599]: no method named `is_nan` found for type `[_; 0]` in the current scope
Aug 03 23:18:26.668 INFO blam!  --> <anon>:7:17
Aug 03 23:18:26.668 INFO blam!   |
Aug 03 23:18:26.668 INFO blam! 7 | assert!(x.max().is_nan());
Aug 03 23:18:26.668 INFO blam!   |                 ^^^^^^
Aug 03 23:18:26.668 INFO blam! 

cc @boxtown

@arielb1 arielb1 added regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Aug 5, 2017
@arielb1
Copy link
Contributor

arielb1 commented Aug 5, 2017

This conflicts with functions with the same name being implemented by other traits, e.g. by trait Statistics defined in https://github.com/boxtown/statrs/blob/v0.7.0/src/statistics/statistics.rs

To fix this, either rename the conflicting functions, or call them using UFCS notation (Statistics::max(x).is_nan()). This is unfortunate.

@boxtown
Copy link

boxtown commented Aug 5, 2017 via email

@alexcrichton
Copy link
Member

@boxtown note that the change here seems to have caused more breakage than intended, so if you've got difficulty fixing this please let us know!

@boxtown
Copy link

boxtown commented Aug 6, 2017

Regression fix is in place in master (see statrs-dev/statrs@e728aac) and will be released with 0.8.0. It was only a small regression affecting doc tests for empty slices and can be easily resolved by pinning the type of the slice to [f64; 0] e.g. let x: [f64; 0] = [];. No API or code changes were necessary

@alexcrichton
Copy link
Member

Ok thanks for the info @boxtown!

@boxtown
Copy link

boxtown commented Aug 7, 2017

0.8.0 was just released yesterday so this issue can probably be closed

@est31
Copy link
Member Author

est31 commented Aug 7, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants