-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Failure to correctly qualify enums in generated code #199
Comments
Similar to #197. Will get on these ASAP for 1.6.4. |
Oops, hadn't seen that issue. Sorry! |
No worries, this problem is a bit different so it's ok. Really appreciate the detailed issue haha. |
@Brendonovich I'm not sure whether this is a clean fix, but for the example I provided, changing - quote!(#variant_name(#typ)),
+ quote!(#variant_name(super::super::#typ)), might help...? |
@codemaster138 I think that will break primitive types (which is what I made the read filter change for). I'll need to check whether the type is a builtin or custom type. |
On second look, this is actually a duplicate. Am working on it rn. |
Problem Description
When using enums, the generated
prisma.rs
file references the enums only with their name rather than a fully qualified identifier, leading to errors such as:To Reproduce
Steps to reproduce the behavior:
cargo prisma generate
cargo check
Expected Behavior
The code generator should either:
use crate::prisma::<Enum Name>
statements as needed orNot(crate::prisma::MyEnum)
instead ofNot(MyEnum)
Environment
Additional Context
This seems like an issue that should almost definitely have been caught by now, so, if you can't reproduce this, the possibility of being an M1 platform bug should be investigated...
The text was updated successfully, but these errors were encountered: