-
Notifications
You must be signed in to change notification settings - Fork 1.8k
diesel tables have unresolved methods #14259
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
Comments
Hi! I'm also impacted by a similar bug. All diesel table usage is broken, currently I see the error:
Thanks 🙏 |
You can put |
Thanks for the temporary fix, do you know if rust-analyzer plans to provide a long term fix any time soon? Can we provide some help? |
Same issue happens for Relm4 library, and in addition to |
I understand that it may come across as demanding, but if it's okay with you, I would prefer to use this as the default. I just want to avoid any unexpected redlines. |
@Veykril maybe we should make these diagnostics experimental for now? |
Judging from the feedback I think it would be better to do so yes, I didn't expect them to trigger incorrectly that often (and they don't trigger on r-a itself at all, feels like rust-analyzer is a bad testing bed for itself ...) |
That does not seem very reasonable (#6975) until all methods are properly resolved. (#9881 and possibly this with diesel if it's not the same issue? It seems that rust-lang/chalk#780 may fix this) What are the upsides? If the purpose is to get quicker feedback on a typo than rustc would give, personally I've been using: "editor.semanticTokenColorCustomizations": {
"[Default Dark+]": {
"enabled": true,
"rules": {
"unresolvedReference": {
"foreground": "#fd5c5c"
}, for more than a year, and that worked well for me. It's less intrusive but may help out as you're typing, and also highlights places where resolution doesn't work properly and a type annotation may help.
Failure to resolve seems to largely happen when dealing with complex trait systems. I'm guessing Diesel would be a great testing bed for the general topic of #6975 |
I'm impacted by this too (I expect every Diesel user is), and I'm having trouble understanding the fix. Obviously I want rust-analyzer to tell me if there's an actual unresolved method; it just seems like it's a false positive here. If I disable the warning, am I going to lose important feedback elsewhere? |
The warning did not exist until the last release. You will still get compiler errors when you save a file, assuming you didn't disable that. |
You can use an earlier version of Rust Analyzer (v0.4.1405) as a temporary fix. |
Okay great, thank you! |
I switched my rust-analyzer version to |
This is fixed on diesel master, the cause was the diesel proc-macro using 2015 edition name resolution rules which r-a just not supports atm. |
On the latest diesel master I still have quite a lot of type inference failing: I suspect #9881 may be the cause. |
Originally posted by @lenstr in #14243 (comment)
The text was updated successfully, but these errors were encountered: