machine / machine.specifications

Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.
MIT License
885 stars 178 forks source link

Updated Resharper Extension still not compatible with 2022.2? #473

Closed rob-mason closed 2 years ago

rob-mason commented 2 years ago

Thanks for the prompt work on updating the extension for the newly released 2022.2, however I've just installed the updated extension and it's still showing as Incompatible. Strange one as previously it wasn't available until you posted the new version a few hours ago.

Screenshot_1

robertcoltheart commented 2 years ago

Sorry to hear that. I'll take a look and see what I can do.

rob-mason commented 2 years ago

Sorry to hear that. I'll take a look and see what I can do.

If there's anything I can do to assist you, feel free to let me know.

robertcoltheart commented 2 years ago

I've taken a look at this, and I've honestly got no idea what the issue could be. I naturally assumed that the Wave version isn't matching the Resharper version, but that isn't the case. Everything seems to be in order that I can tell.

@matkoch Any ideas here? It's super frustrating when I do routine R# updates and stuff like this happens.

matkoch commented 2 years ago

What is the Wave version specified?

robertcoltheart commented 2 years ago

@matkoch It's 222.0.0

robertcoltheart commented 2 years ago

@rob-mason I found a temporary workaround. If you disable the plugin verifier, it seems to work:

image

robertcoltheart commented 2 years ago

I've looked at the R# installation logs and I think it's because the extension verifier in R# is being too aggressive. MSpec uses late-binding to load and execute the runner, and R# extension verifier doesn't like this apparently. Workaround is to disable the verifier, as above. If late-bound references are indeed the cause of this issue, then this is a much bigger fix.

If the workaround above stops working, I'm tempted to abandon R# integration altogether. JetBrains really doesn't make it easy for plugin developers, and the amount of time I've spent on R# integration vs the rest of the framework is way out of proportion.

rob-mason commented 2 years ago

@rob-mason I found a temporary workaround. If you disable the plugin verifier, it seems to work:

image

Thanks for looking into this (not so simple issue!) and for coming up with a quick workaround. I've just tested switching off verification and it's now working again.

Cheers @robertcoltheart for your assistance, and hard work on supporting 3 version of Resharper and Rider each and every year, it's appreciated.

matkoch commented 2 years ago

Hi @robertcoltheart,

I can very much relate to how challenging it is to keep plugins up-to-date. I've been in the very same situation as you before joining the JetBrains team. Funnily, not a lot has changed in those regards since then 🤭 I have about 10 plugins and often have to ping people. For external plugin authors, we have a private Slack channel that I would be happy to invite you to. Every non-trivial question can go there, and we are usually very prompt in helping to solve it and also do pull-requests where it makes sense.

I appreciate it very much that you're taking the time to keep this updated. My first plugin was also about test framework integration. This is probably one of the most difficult integration points in the whole SDK. Please, always let me know if there's something I can help with besides the usual "increase dependency version" (which paradoxically should be solved by the verifier 😅).

I will also keep you posted while our developers are investigating the issue. Without going into too much detail for now, it's somehow related to the mscorlib reference.

robertcoltheart commented 2 years ago

Thanks @matkoch. As I stated in the other post, the issue is that the test adapter needs to target both netframework and netstandard. This is how the xUnit adapter for R# works. The Resharper.SDK package only targets netframework, so I can't use that. I've been using the Resharper.UnitTesting.Abstractions package, which is unlisted on Nuget but has the types I need for the test adapter. I can't bundle this dll with the plugin since it's provided by Resharper. Hence why I think the extension verifier is complaining, because there's a missing dll reference.

mikeblakeuk commented 2 years ago

Any ideas?

robertcoltheart commented 2 years ago

It's with JetBrains now. There is an update coming with 2022.2.2 with may solve this issue.

robertcoltheart commented 2 years ago

This issue should be fixed with the latest release. Please let me know if it's not the case and I'll reopen this issue.