-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Very minor changes causing unrelated module to fail to compile in a nonsense fashion #32222
Comments
Bisecting to find the nightly which caused this |
I can confirm that this issue does not occur on |
sgrif
added a commit
to diesel-rs/diesel
that referenced
this issue
Mar 13, 2016
This is the first pass of what will be a much larger feature. The intention is to support cases such as this: ```rust let mut source = users::table.into_boxed(); if let Some(search) = params.search { source = source.filter(name.like(format!("%{}%", search))); } if let Some(order) = column_with_name(params.order) { source = source.order(order.desc()); } let users = source.load(&connection); ``` Right now, this is basically impossible, as `source` needs to have the same type, and each query in diesel has a unique type. This *will* result in a slowdown of the query builder when used (though I think we can still work to eliminate this cost through prepared statement caching). However, this will not affect the performance of anything that isn't using it. As of this commit, we do not achieve the above use case, as `BoxedSelectStatement` doesn't implement any of our query DSLs. The intent is to have it implement all of them, but this felt like a good place to cut a first pass. This will fail to compile due to rust-lang/rust#32222. We can resolve this by pointing at `nightly-2016-03-05` if needed, but hopefully that can be resolved upstream in the next day or two.
cc @jseyfried |
jseyfried
added a commit
to jseyfried/rust
that referenced
this issue
Mar 13, 2016
jseyfried
added a commit
to jseyfried/rust
that referenced
this issue
Mar 13, 2016
sgrif
added a commit
to diesel-rs/diesel
that referenced
this issue
Mar 20, 2016
This is the first pass of what will be a much larger feature. The intention is to support cases such as this: ```rust let mut source = users::table.into_boxed(); if let Some(search) = params.search { source = source.filter(name.like(format!("%{}%", search))); } if let Some(order) = column_with_name(params.order) { source = source.order(order.desc()); } let users = source.load(&connection); ``` Right now, this is basically impossible, as `source` needs to have the same type, and each query in diesel has a unique type. This *will* result in a slowdown of the query builder when used (though I think we can still work to eliminate this cost through prepared statement caching). However, this will not affect the performance of anything that isn't using it. As of this commit, we do not achieve the above use case, as `BoxedSelectStatement` doesn't implement any of our query DSLs. The intent is to have it implement all of them, but this felt like a good place to cut a first pass. This will fail to compile due to rust-lang/rust#32222. We can resolve this by pointing at `nightly-2016-03-05` if needed, but hopefully that can be resolved upstream in the next day or two.
sgrif
added a commit
to diesel-rs/diesel
that referenced
this issue
Mar 27, 2016
This is the first pass of what will be a much larger feature. The intention is to support cases such as this: ```rust let mut source = users::table.into_boxed(); if let Some(search) = params.search { source = source.filter(name.like(format!("%{}%", search))); } if let Some(order) = column_with_name(params.order) { source = source.order(order.desc()); } let users = source.load(&connection); ``` Right now, this is basically impossible, as `source` needs to have the same type, and each query in diesel has a unique type. This *will* result in a slowdown of the query builder when used (though I think we can still work to eliminate this cost through prepared statement caching). However, this will not affect the performance of anything that isn't using it. As of this commit, we do not achieve the above use case, as `BoxedSelectStatement` doesn't implement any of our query DSLs. The intent is to have it implement all of them, but this felt like a good place to cut a first pass. This will fail to compile due to rust-lang/rust#32222. We can resolve this by pointing at `nightly-2016-03-05` if needed, but hopefully that can be resolved upstream in the next day or two.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately, I can't reproduce this at a smaller scale. This issue occurs with https://github.com/sgrif/diesel as of commit 9084bb62d74f50e5686a85d6145cfe655ee2a3ba. Rust version is
rustc 1.9.0-nightly (c9629d61c 2016-03-10)
Currently the tests (run from the
diesel_tests
directory withcargo test --no-default-features --features "unstable postgres"
) pass. However, applying the following patch:causes the following compiler error:
which is claiming that an import conflicts with itself. I have pushed up the branch
compiler-error-demo
with that change applied for easy reproduction. Again, I'm sorry that I cannot provide a report on a smaller scale, but this appears to be some edge case blowing up. I have no clue why adding a module with a few imports and nothing else would be causing this issue.The text was updated successfully, but these errors were encountered: