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

Beta breaks my project: module resolution (?) #53263

Closed
maghoff opened this issue Aug 11, 2018 · 4 comments
Closed

Beta breaks my project: module resolution (?) #53263

maghoff opened this issue Aug 11, 2018 · 4 comments
Assignees
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name/path resolution done by `rustc_resolve` specifically regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@maghoff
Copy link

maghoff commented Aug 11, 2018

The CI build of my project Sausagewiki has started failing with the beta compiler channel. See the build log output:

error[E0433]: failed to resolve. Use of undeclared type or module `articles`
   --> src/state.rs:326:22
    |
326 |             #[derive(Insertable)]
    |                      ^^^^^^^^^^ Use of undeclared type or module `articles`

It still builds with the stable compiler, so this unfortunately looks like a regression in rustc.

This project makes substantial use of code generation in build.rs and with procedural derive macros.

@petrochenkov
Copy link
Contributor

This is most likely a consequence of #51952 and the error originates in diesel_derives.

It's strange however that this specific case is reported as an error and not as a lint warning (like many other warnings that can be seen in the log).

The issue is already fixed on diesel master, so perhaps switching to it will help as a workaround.

@petrochenkov petrochenkov added A-resolve Area: Name/path resolution done by `rustc_resolve` specifically A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Aug 11, 2018
@maghoff
Copy link
Author

maghoff commented Aug 11, 2018

Thanks for the feedback :)

I tried to see if I could get the problems to disappear with [patch]-ing the diesel dependencies in my Cargo.toml, but gave up after not managing to make it work. In other words, I was unable to apply the workaround. It doesn't matter much in the end as I have no particular use for it working in with the beta compiler.

However, I am very interested in my project not breaking with the stable compiler in the future :) I hope it will not be necessary for me to change anything for this to be the case.

@petrochenkov
Copy link
Contributor

Fixed in #53516

bors added a commit that referenced this issue Aug 22, 2018
resolve: Continue search in outer scopes after applying derive resolution fallback

Fixes #53263
@maghoff
Copy link
Author

maghoff commented Aug 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name/path resolution done by `rustc_resolve` specifically regression-from-stable-to-beta Performance or correctness regression from stable to beta.
Projects
None yet
Development

No branches or pull requests

2 participants