You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something weird happened today. After a clean build, my diesel-derive-enum generated EpisodeMapping suddenly stopped working and I can't figure out why.
table!{use diesel::sql_types::*;
usecrate::db::enums::episode::*;
/// Representation of the `heroes` table.
///
/// (Automatically generated by Diesel.)
heroes (id){/// The `id` column of the `heroes` table.
///
/// Its SQL type is `Int4`.
///
/// (Automatically generated by Diesel.)
id -> Int4,
/// The `name` column of the `heroes` table.
///
/// Its SQL type is `Varchar`.
///
/// (Automatically generated by Diesel.)
name -> Varchar,
/// The `appears_in` column of the `heroes` table.
///
/// Its SQL type is `Array<EpisodeMapping>`.
///
/// (Automatically generated by Diesel.)
appears_in -> Array<EpisodeMapping>,
/// The `home_planet` column of the `heroes` table.
///
/// Its SQL type is `Varchar`.
///
/// (Automatically generated by Diesel.)
home_planet -> Varchar,
}}
error[E0412]: cannot find type `EpisodeMapping` in this scope
--> src/db/schema.rs:335:29
|
335 | appears_in -> Array<EpisodeMapping>,
| ^^^^^^^^^^^^^^ not found in this scope
|
= note: possible candidate is found in another module, you can import it into scope:crate::db::enums::episode::db_enum_impl_Episode::EpisodeMapping
error: aborting due to previous error
For some reason the compiler is finding crate::db::enums::episode::db_enum_impl_Episode::EpisodeMapping but not crate::db::enums::episode::EpisodeMapping. I'm not sure what happened, I don't think I touched those modules at all, I just did a clean build. Any idea why this is happening?
The text was updated successfully, but these errors were encountered:
/// (Automatically generated by Diesel.)
appears_in -> Array<crate::db::enums::episode::EpisodeMapping>,
I noticed I have a #![feature(proc_macro_hygiene, decl_macro)] in main.rs file, maybe related? But it's been there forever, wWeird that this error seemed to appear suddenly.
Curious. I never really got my head around the proc macro hygine. This crate has apparently exposed breakages in proc macros before (e.g. rust-lang/rust#54783) so am inclined to blame rustc here. But would be interested to know the reasons.
Something weird happened today. After a clean build, my diesel-derive-enum generated EpisodeMapping suddenly stopped working and I can't figure out why.
For some reason the compiler is finding
crate::db::enums::episode::db_enum_impl_Episode::EpisodeMapping
but notcrate::db::enums::episode::EpisodeMapping
. I'm not sure what happened, I don't think I touched those modules at all, I just did a clean build. Any idea why this is happening?The text was updated successfully, but these errors were encountered: