Upgrade RestSharp fork from .NET 2.0/3.5 to .NET Framework 4.8#14
Open
devin-ai-integration[bot] wants to merge 6 commits into
Open
Upgrade RestSharp fork from .NET 2.0/3.5 to .NET Framework 4.8#14devin-ai-integration[bot] wants to merge 6 commits into
devin-ai-integration[bot] wants to merge 6 commits into
Conversation
…ture) Delete Silverlight, WindowsPhone, WindowsPhone.Mango, MonoDroid, and MonoTouch projects targeting dead platforms. Remove RestSharp.Mono.sln and RestSharp.Net2.sln, consolidating into RestSharp.sln with their project + config entries removed. Co-Authored-By: Travis Myers <travis.myers@cognition.ai>
… (feature) Delete RestSharp.Net2 (LinqBridge + Mono System.Xml.Linq reimplementation) which only existed for .NET 2.0; LINQ and System.Xml.Linq are built into .NET 3.5+. Remove its project and config entries from RestSharp.sln. Co-Authored-By: Travis Myers <travis.myers@cognition.ai>
Retarget RestSharp, RestSharp.Tests, and RestSharp.IntegrationTests to v4.8. Drop the 3.5 Client Profile, remove RequiredTargetFramework=3.5 hints, .NET 3.5 BootstrapperPackage items, and the duplicate Microsoft.CSharp.targets import. Co-Authored-By: Travis Myers <travis.myers@cognition.ai>
Resolve dead-platform #if directives now that only the FRAMEWORK target remains: delete SILVERLIGHT/WINDOWS_PHONE/MONODROID/MONOTOUCH/Net2/NET_2_0 blocks and unwrap always-true FRAMEWORK blocks across 37 files. Drop redundant FRAMEWORK from DefineConstants. NET_4_0 directives in MonoHttp are left intact (out of scope). Co-Authored-By: Travis Myers <travis.myers@cognition.ai>
…t 2.4.2 (feature) Co-Authored-By: Travis Myers <travis.myers@cognition.ai>
Co-Authored-By: Travis Myers <travis.myers@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernizes this legacy RestSharp fork from a multi-targeted .NET 2.0/3.5 (+ Silverlight/Windows Phone/Mono/MonoTouch) codebase down to a single .NET Framework 4.8 target, and refreshes its NuGet dependencies. Executed as six ordered phases, with the build verified to compile after each.
The fork only existed to backport LINQ and
System.Xml.Linqto .NET 2.0; on 4.8 these are built in, so all the shims and dead-platform code are removed.Phase-by-phase
RestSharp.Silverlight/,RestSharp.WindowsPhone/,RestSharp.WindowsPhone.Mango/,RestSharp.MonoDroid/,RestSharp.MonoTouch/; deletedRestSharp.Mono.slnandRestSharp.Net2.sln; pruned their entries fromRestSharp.sln.RestSharp.Net2— deleted the whole project (LinqBridge-1.2.cs, the 28-file MonoSystem.Xml.Linq/reimplementation, csproj, AssemblyInfo) and itsRestSharp.slnentry.TargetFrameworkVersion→v4.8forRestSharp,RestSharp.Tests,RestSharp.IntegrationTests; removed Client Profile,RequiredTargetFramework=3.5hints, .NET 3.5 BootstrapperPackage items, and a duplicateMicrosoft.CSharp.targetsimport.#if SILVERLIGHT|WINDOWS_PHONE|MONODROID|MONOTOUCH|Net2|NET_2_0blocks and unwrapped always-true#if FRAMEWORKblocks across the source; dropped the now-redundantFRAMEWORKdefine.4.x→13.0.3(net45) and xunit1.9.0.1566→2.4.2. Test code was already API-compatible (onlyAssert.Equal/NotNull/Null/Empty/NotEmpty/True/False+[Fact]).README.markdownfor 4.8, bumped assembly version102.7.0.0→103.0.0.0, updatedrestsharp.nuspec(version,Newtonsoft.Json 13.0.3dependency, release notes), and deleted the obsoletepackage.cmd(only built dead platforms and referenced a missingtools/dir).Notable details for reviewers
localhost:8080HttpListener. Added[assembly: CollectionBehavior(DisableTestParallelization = true)]toRestSharp.IntegrationTeststo restore the serial behavior xunit 1.x had.packages/(no restore step in the build), so the new package folders are committed and the staleNewtonsoft.Json.4.0.8/4.5.1,xunit.1.x, andxunit.extensionsfolders are removed.packages/repositories.configwas pruned to the three remaining projects.Testing
Built on Linux via
dotnet msbuildagainst Mono's .NET 4.8 reference assemblies (/usr/lib/mono/4.8-api):RestSharp.Tests): 83/83 pass.RestSharp.IntegrationTests): 11 pass, 1 skipped (needs real OAuth consumer key/secret), 1 fails only because the test hardcodes a Windows path separator (Environment.CurrentDirectory + "\\Assets\\Koala.jpg") that doesn't resolve on Linux — both are environmental and would pass on Windows; neither is a regression from this upgrade. Test logic was intentionally left unchanged.Link to Devin session: https://app.devin.ai/sessions/2094321fcfeb47d38f3db44450b60040
Requested by: @travismyers-png
Devin Review