JetBrains / resharper-unity

Unity support for both ReSharper and Rider
Apache License 2.0
1.21k stars 131 forks source link

Doesn't detect Rider 2023.3.3 installed via JetBrains Toolbox 2.1.3 (Linux) #2431

Closed Schroedingers-Cat closed 4 months ago

Schroedingers-Cat commented 5 months ago

The naming scheme of .desktop files generated by JetBrains Toolbox v2.1.3.18901 has changed recently when installing Rider 2023.3 and other IDEs causing this package to fail detecting Rider installations on Linux. While the files used to be called like jetbrains-rider.desktop, they're now being called jetbrains-rider-c5e460cd-9963-409d-9a9a-0ee2b31cffb8.desktop. This is likely to support installing multiple versions of the same IDE.

Currently, this repo's code on Linux seems to look for a file called jetbrains-rider.desktop in the user's collection directory of desktop files ~/.local/share/applications: https://github.com/JetBrains/resharper-unity/blob/net233/unity/PathLocator/RiderPathLocator.cs#L80

At least, it's how Unity 2021/2022.3 is behaving on my Manjaro Gnome45.3/KDE5.27 systems. This causes Rider installed through JetBrains Toolbox not to be detected by Unity in the Preferences->External Tools window.

The current workaround is to manually rename the file jetbrains-rider-some-hash.desktop to jetbrains-rider.desktop. It would be nice if this package could also support the latest naming scheme from the JetBrains Toolbox app.

van800 commented 5 months ago

Please add, where toolbox is in your system and where is Rider. Thanks!

Schroedingers-Cat commented 5 months ago

Toolbox is at /home/shared/jetbrains-toolbox and Rider is at /home/shared/jetbrains-toolbox/rider. Toolbox shell scripts are at ~/.local/share/JetBrains/Toolbox/scripts.

van800 commented 4 months ago

I think, I have a fix for this problem. But just to be sure, could you please share $HOME/.local/share/JetBrains/Toolbox/state.json and .settings.json? Thank you!

Schroedingers-Cat commented 4 months ago

That sounds great! Here are the requested files: state.json .settings.json

van800 commented 4 months ago

Thanks! Looks like exactly the problem, which I have fixed.

Currently fixed in the Rider package in branch, currently available on the github mirror.

To try it, you may update one line in the manifest.json, substitute "com.unity.ide.rider": "3.0.27", by "com.unity.ide.rider": "https://github.com/van800/com.unity.ide.rider.git?path=/Packages/com.unity.ide.rider#3.0.28",

Schroedingers-Cat commented 4 months ago

I can confirm that the problem is fixed with the package link you provided, thanks a lot!

Any idea when this version will be officially released?

van800 commented 4 months ago

Rough estimation would be 1-2 weeks.

van800 commented 4 months ago

Rider package 3.0.28 with a fix was released.

Schroedingers-Cat commented 4 months ago

Confirming that updating to that package version fixes the issue. Thank you so much!