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

Get core working on stable and beta #14

Closed
sgrif opened this Issue Nov 28, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@sgrif
Member

sgrif commented Nov 28, 2015

This does not include the codegen or integration test crates. This issue is tracking the fact that core only builds on nightly. This is due to the fact that the way I implemented the interval DSL requires From<i32>. I've implemented the interval dsl for i64 and f64, which only implement From<i32> on nightly. We just need to copy paste the defaulted methods. Should be straight forward.

The litmus test for this issue is the yaqb directory passing cargo test on stable. codegen and yaqb_tests do not need to pass on stable.

@sgrif sgrif added this to the 0.1 milestone Nov 28, 2015

@mcasper

This comment has been minimized.

Collaborator

mcasper commented Nov 28, 2015

These look to be the PRs that added support for i64 conversion and f64 conversion respectively:
https://github.com/rust-lang/rust/pull/28921/files
https://github.com/rust-lang/rust/pull/29129/files

@mcasper

This comment has been minimized.

Collaborator

mcasper commented Nov 28, 2015

@sgrif How do we get around the orphan rule here? Implementing From<i32> for i64 or f64 produces

src/expression/extensions/interval_dsl.rs:112:1: 116:2 error: the impl does not reference any types defined in this crate; only traits defined in the current crate can be implemented for arbitrary types [E0117]
src/expression/extensions/interval_dsl.rs:112 impl From<i32> for i64 {
src/expression/extensions/interval_dsl.rs:113     fn from(small: i32) -> i64 {
src/expression/extensions/interval_dsl.rs:114         small as i64
src/expression/extensions/interval_dsl.rs:115     }
src/expression/extensions/interval_dsl.rs:116 }

Sorry if this is a super noob question, I've still got my Rust training wheels on

@sgrif

This comment has been minimized.

Member

sgrif commented Nov 28, 2015

We shouldn't implement From<i32> for them, we should stop relying on it. I think the easiest thing to do is add fn times(self, x: i32) -> Self; to the trait, and use that instead of the * operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment