Skip to content

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

Closed
@maghoff

Description

@maghoff

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.

Activity

petrochenkov

petrochenkov commented on Aug 11, 2018

@petrochenkov
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.

added
A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
on Aug 11, 2018
maghoff

maghoff commented on Aug 11, 2018

@maghoff
Author

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.

self-assigned this
on Aug 13, 2018
petrochenkov

petrochenkov commented on Aug 20, 2018

@petrochenkov
Contributor

Fixed in #53516

added a commit that references this issue on Aug 22, 2018

Auto merge of #53516 - petrochenkov:derregr, r=estebank

maghoff

maghoff commented on Aug 27, 2018

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

Metadata

Metadata

Assignees

Labels

A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyregression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @maghoff@petrochenkov

      Issue actions

        Beta breaks my project: module resolution (?) · Issue #53263 · rust-lang/rust