EmmaSharp icon indicating copy to clipboard operation
EmmaSharp copied to clipboard

Investigate removing Restsharp as a dependency

Open kylegregory opened this issue 9 years ago • 4 comments

It seems development on RestSharp is slowing because of HttpClient, which is in .NET 4.5 and .NET Core. Restsharp improved getting the project up and running quickly, but may be more overhead than is needed.

Issue open for comments.

kylegregory avatar Feb 22 '16 18:02 kylegregory

The latest RestSharp from nuget (v 105.2.3) breaks EmmaSharp (I had been using RestSharp 105.1.0). Here is the exception: Could not load type 'RestSharp.HttpBasicAuthenticator' from assembly 'RestSharp, Version=105.2.3.0, Culture=neutral, PublicKeyToken=null'.

From the stack trace, here is the method throwing the error: EmmaSharp.EmmaApi.Execute[T](RestRequest request, Int32 start, Int32 end)

Looking at github, it appears that the author introduced breaking changes by moving it to the RestSharp.Authenticators namespace (was just in RestSharp, which explains the error).

technomaz avatar Oct 06 '16 15:10 technomaz

@technomaz Seems like an easy fix, but I'll need to update the project dependencies to do so, which is not necessarily a bad idea (we're behind on Json.Net too). I tried, but I don't think I can code around a namespace change. Since this is a API change we should at least try to incorporate.

I'll see if we can get a minor release out today or tomorrow, since the HttpBasicAuthenticator class and method are not exposed publically in the project.

kylegregory avatar Oct 10 '16 19:10 kylegregory

Is there a version with no dependencies on RestSharp or can the dependencies be changed to RestSharpSigned

Avish086 avatar Jan 17 '18 09:01 Avish086

@Avish086 Restsharp seems to be revived and there has been several releases to update the project. The newest versions (>160.0.0) are signed. I haven't had time to test an update of the package. It's not likely that I'll swap the older unsigned version in the current project. Though you're welcome to download the source and swap dependencies if needed.

kylegregory avatar Jan 17 '18 18:01 kylegregory