ReSharper 2020.2 release
To do:
- [ ] Test changes to Find Usages of assets, etc.
- [x] Test quick fixes converted to bulk actions
- [ ] Test Unity specific code cleanup. Look at adding options page
- [ ] Test namespace provider inspections + suggestions
- [x] Test shader support
- [ ] Ensure options pages are in sync/up to date
Initial problems:
- Navigation to asset based Find Usages results does nothing
- Find Usages on a serialised field with a single usage displays nothing (due to navigation not working)
- Find Usages results displays asset usages (serialised fields or method handlers) under "textual occurrences", and doesn't group by file, directory, etc.
- Spell check is missing some words, such as "postprocess". Probably due to differences between Rider's default dictionaries and ReSpeller's dictionaries.
- Options page is missing a couple of text based asset items, e.g. "cache prefab data" and "automatically disable asset indexing for large solutions"
- Can't configure code cleanup for ReSharper (#1771)
With this release (2020.2) there are ~50 errors now displayed where there are actually none for shaders in my solution (it doesn't understand the INTERNAL_DATA macro for example). This needs more work it seems. Is there an option to disable shader analysis or whatever makes those errors show up?
You need to install the Unity plugin for ReSharper, and that's not been released yet. Unity automatically and implicitly #includes extra files into shaders, and the Unity plugin provides that context for ReSharper. There's also handling of resolving #include paths for packages. I'm currently doing some final testing of the plugin, and it should be available either today or tomorrow.
There's another plugin beside this one? I'm using rider 2020.2 with this plugin currently, that according to the rider release notes has this new shader handling enabled. There are some issues added in youtrack about this, it's probably being handled already.
This issue is discussing the release of the plugin for ReSharper, rather than the version that comes bundled with Rider. Without any other context, I understood your issue to also be about ReSharper, and the key problem for ReSharper is that the plugin hasn't been released yet. There are issues with shader files, related to undocumented symbols that are defined behind the scenes when the shaders are compiled, and we have a hotfix coming soon that will address or work around some of these problems. The issues you can see on YouTrack are probably the same (INTERNAL_DATA is one of the known issues).
Ah, i see, i assumed that the plugin release was in sync with the rider release. Then sorry for that misinterpretation. But if it is possible it would still be nice to have a settings toggle to disable shader analysis (for people like me who use visual editors to create them and don't need it).
The Rider release is in sync with Rider. The ReSharper release is more or less in sync, too, but is a more manual process, and ideally doesn't happen when I've got a vacation booked 😄
As I said above, the issues that you're currently seeing in Rider were unforeseen due to their undocumented nature. They are being addressed in a hotfix due very soon. The fixes address the errors you're seeing but will also remove shader files from solution wide error analysis, and improve the existing switch to ignore red code in shader files.
I can second the sentiment that there needs to be an option to disable shader errors. I have the amplify shader edtior plugin in my project with contains a shader that shows an error in Rider although everything is fine in unity. It makes it realy anoying when you whant to jump to the next error and it always opens this random shader file.
This issue is not related to Rider, or to Rider's shader support. Those issues are known and have already been addressed and will be available very soon in the upcoming bugfix.