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

import_crate_style doesn't reflect file updates with RustRover #10

Open
armadacore opened this issue Dec 21, 2024 · 5 comments
Open

import_crate_style doesn't reflect file updates with RustRover #10

armadacore opened this issue Dec 21, 2024 · 5 comments

Comments

@armadacore
Copy link

It seems that the macro does not recognise when an existing file has been changed, i.e. I add more CSS classes or rename one.
Current workaround, I rename the file each time. Like foobar_v1.module.css, foobar_v2.module.css and so on.

grafik grafik

Even if I call the macro import_crate_style with the new name of the css file and then rename the file in the second step, it is no longer recognised that the file already exists.

@armadacore
Copy link
Author

armadacore commented Dec 21, 2024

My mistake, it's already documented here https://github.com/basro/stylance-rs?tab=readme-ov-file#stable-import_crate_style

RustRover user has do Invalidate Caches.

grafik

@basro basro changed the title import_crate_style update error import_crate_style doesn't reflect file updates with RustRover Dec 21, 2024
@basro
Copy link
Owner

basro commented Dec 21, 2024

RustRover doesn't use rust-analyzer, It uses it's own implementation. (I have never tried using it before)
The problem I described there is about RA and is a bit less severe since the only thing that doesn't get updated is the completion results. Errors and warnings update fine with RA.
It would be interseting to know what happens when using the nightly import_style macro with RustRover.

@armadacore
Copy link
Author

RustRover doesn't use rust-analyzer, It uses it's own implementation. (I have never tried using it before) The problem I described there is about RA and is a bit less severe since the only thing that doesn't get updated is the completion results. Errors and warnings update fine with RA. It would be interseting to know what happens when using the nightly import_style macro with RustRover.

Here we are again.
I have tested it in the ‘nightly’ version.
Unfortunately, the result is not so good.

grafik

@basro
Copy link
Owner

basro commented Dec 23, 2024

I've installed RustRover to see if I could find any workaround.

Enabling on the fly for external linter using Clippy and disabling the "Unresolved paths" Rust Inspection kinda works,

Unfortunately this causes rust rover to constantly run clippy as I type. I find this very annoying since it's a fairly demanding operation. In vscode clippy runs when I save a file which is a much more reasonable cadence. Found this issue about it.

Overall I'm fairly disappointed by the RustRover inspections, the false positive errors were not limited to just stylance, some leptos traits were also falsely accused of not existing in the project I tested this in.

@armadacore
Copy link
Author

Ok, you go much deeper than me. 😃
The behavior between vscode and rrover, are the reason why I have switched. I know about the cadence, but is fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants