Skip to content

Moving some code around results in linking error with incremental comp #46475

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

Open
sgrif opened this issue Dec 3, 2017 · 7 comments
Open

Moving some code around results in linking error with incremental comp #46475

sgrif opened this issue Dec 3, 2017 · 7 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@sgrif
Copy link
Contributor

sgrif commented Dec 3, 2017

I've had this happen 3 times now today. It's fixed by cargo clean, so is not a critical issue, but still is a moderately interesting incremental compilation bug. The change was moving the trait query_dsl::OffsetDsl to query_dsl::methods::OffsetDsl. The code in question that is failing was importing OffsetDsl::offset from diesel::prelude instead, the x.offset is now resolving to query_dsl::QueryDsl::offset, which simply calls OffsetDsl::offset, and is exported from prelude.

Anyway, this is the error
screen shot 2017-12-03 at 11 07 06 am and the patch that caused it is https://gist.github.com/sgrif/8bb17b2a143d482e060fc3fd08705067

rustc --version: rustc 1.24.0-nightly (73bca2b 2017-11-28)

@michaelwoerister
Copy link
Member

Heh, you might have provided a neat regression test for #46427 :) It sounds like it might be the same underlying problem.

@michaelwoerister michaelwoerister added the A-incr-comp Area: Incremental compilation label Dec 4, 2017
@michaelwoerister
Copy link
Member

I'm having a hard time reproducing this. Do you have two consecutive commits somewhere that trigger the problem?

@sgrif
Copy link
Contributor Author

sgrif commented Dec 4, 2017

Not off-hand, but I can try to recreate the state things were in when I noticed this on a branch.

@michaelwoerister
Copy link
Member

That would be awesome.

@TimNN TimNN added the C-bug Category: This is a bug. label Dec 5, 2017
@sgrif
Copy link
Contributor Author

sgrif commented Dec 16, 2017

I ran into a semi-related case today (sorry, these repro steps require libpq to be installed):

@michaelwoerister
Copy link
Member

Thanks, that's very helpful!

@steveklabnik
Copy link
Member

Triage:
image

@sgrif have you seen this bug lately?

@Noratrieb Noratrieb added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants