Skip to content

Commit

Permalink
Upgrade RESTler to .NET 8.0 (#934)
Browse files Browse the repository at this point in the history
For clarity, make the use of lock files explicit in the projects.
  • Loading branch information
marina-p authored Jan 28, 2025
1 parent f17285e commit be7e029
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_build_test_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
BUILD_PLATFORM: 'Any CPU'
RESTLER_VERSION: '9.2.4'
PYTHON_VERSION: '3.8'
DOTNET_VERSION: '6.0.x'
DOTNET_VERSION: '8.0.x'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ You can then use this docker image as basis to add the application under test to
#### Local

Prerequisites: Install [Python 3.8.2](https://www.python.org/downloads/) and
[.NET 6.0](https://dotnet.microsoft.com/download/dotnet-core?utm_source=getdotnetcorecli&utm_medium=referral), for your appropriate OS.
[.NET 8.0](https://dotnet.microsoft.com/download/dotnet-core?utm_source=getdotnetcorecli&utm_medium=referral), for your appropriate OS.

Create a directory where you'd like to place the RESTler binaries:

Expand Down
2 changes: 1 addition & 1 deletion build-restler.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def publish_dotnet_apps(dirs, configuration, dotnet_package_source):

sys.exit(-1)
try:
subprocess.run(f"dotnet publish \"{proj_file_path}\" --no-restore -o \"{proj_output_dir}\" -c {configuration} -f net6.0", shell=True, stderr=subprocess.PIPE, check=True)
subprocess.run(f"dotnet publish \"{proj_file_path}\" --no-restore -o \"{proj_output_dir}\" -c {configuration} -f net8.0", shell=True, stderr=subprocess.PIPE, check=True)
except subprocess.CalledProcessError as e:
print("Build failed!")
print(f"Exit code: {e.returncode}")
Expand Down
7 changes: 6 additions & 1 deletion src/ResultsAnalyzer/ResultsAnalyzer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<AssemblyName>Restler.ResultsAnalyzer</AssemblyName>
<NoWarn>NU1603</NoWarn>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestoreLockedMode>true</RestoreLockedMode>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>

</PropertyGroup>

<ItemGroup>
Expand All @@ -26,6 +29,8 @@
<Compile Include="Timing.fs" />
<Compile Include="Convert.fs" />
<Compile Include="Program.fs" />
<Content Include="packages.lock.json" />

</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\compiler\Restler.Compiler\Restler.Compiler.fsproj" />
Expand Down
20 changes: 10 additions & 10 deletions src/ResultsAnalyzer/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net8.0": {
"DiffPlex": {
"type": "Direct",
"requested": "[1.4.4, )",
Expand Down Expand Up @@ -1125,15 +1125,15 @@
"restler.compiler": {
"type": "Project",
"dependencies": {
"FSharp.Core": "4.7.2",
"Microsoft.ApplicationInsights": "2.14.0",
"Microsoft.FSharpLu": "0.11.7",
"Microsoft.FSharpLu.Json": "0.11.7",
"NJsonSchema": "10.7.2",
"NSwag.Core": "13.16.1",
"NSwag.Core.Yaml": "13.16.1",
"Newtonsoft.Json": "13.0.1",
"Pluralize.NET.Core": "1.0.0"
"FSharp.Core": "[4.7.2, )",
"Microsoft.ApplicationInsights": "[2.14.0, )",
"Microsoft.FSharpLu": "[0.11.7, )",
"Microsoft.FSharpLu.Json": "[0.11.7, )",
"NJsonSchema": "[10.7.2, )",
"NSwag.Core": "[13.16.1, )",
"NSwag.Core.Yaml": "[13.16.1, )",
"Newtonsoft.Json": "[13.0.1, )",
"Pluralize.NET.Core": "[1.0.0, )"
}
}
}
Expand Down
14 changes: 9 additions & 5 deletions src/compiler/Restler.Compiler.Test/Restler.Compiler.Test.fsproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>NU1603;FS0988</NoWarn>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestoreLockedMode>true</RestoreLockedMode>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>

</PropertyGroup>
<ItemGroup>
<Compile Include="TestUtilities.fs" />
Expand All @@ -17,8 +20,9 @@
<Compile Include="SchemaTests.fs" />
<Compile Include="JsonGrammarTests.fs" />
<Compile Include="RealWorldTests.fs" />
<Content Include="packages.lock.json" />
<Content Include="swagger\example_config_file.json">
<Content Include="packages.lock.json" />

<Content Include="swagger\example_config_file.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="swagger\exactCopy\array_example.json">
Expand Down Expand Up @@ -442,8 +446,8 @@
<PackageReference Include="NJsonSchema" Version="10.7.2" />
<PackageReference Include="NSwag.Core" Version="13.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.net.test.sdk" Version="16.9.1"/>
<PackageReference Include="xunit.runner.console" Version="2.4.1" >
<PackageReference Include="Microsoft.net.test.sdk" Version="16.9.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
20 changes: 10 additions & 10 deletions src/compiler/Restler.Compiler.Test/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net8.0": {
"FSharp.Core": {
"type": "Direct",
"requested": "[4.7.2, )",
Expand Down Expand Up @@ -1233,15 +1233,15 @@
"restler.compiler": {
"type": "Project",
"dependencies": {
"FSharp.Core": "4.7.2",
"Microsoft.ApplicationInsights": "2.14.0",
"Microsoft.FSharpLu": "0.11.7",
"Microsoft.FSharpLu.Json": "0.11.7",
"NJsonSchema": "10.7.2",
"NSwag.Core": "13.16.1",
"NSwag.Core.Yaml": "13.16.1",
"Newtonsoft.Json": "13.0.1",
"Pluralize.NET.Core": "1.0.0"
"FSharp.Core": "[4.7.2, )",
"Microsoft.ApplicationInsights": "[2.14.0, )",
"Microsoft.FSharpLu": "[0.11.7, )",
"Microsoft.FSharpLu.Json": "[0.11.7, )",
"NJsonSchema": "[10.7.2, )",
"NSwag.Core": "[13.16.1, )",
"NSwag.Core.Yaml": "[13.16.1, )",
"Newtonsoft.Json": "[13.0.1, )",
"Pluralize.NET.Core": "[1.0.0, )"
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/compiler/Restler.Compiler/Restler.Compiler.fsproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>NU1603</NoWarn>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestoreLockedMode>true</RestoreLockedMode>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>

</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OtherFlags></OtherFlags>
Expand Down Expand Up @@ -33,7 +36,8 @@
<Compile Include="Compiler.fs" />
<Compile Include="CodeGenerator.fs" />
<Compile Include="Workflow.fs" />
<Content Include="packages.lock.json" />
<Content Include="packages.lock.json" />

</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.14.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/Restler.Compiler/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net8.0": {
"FSharp.Core": {
"type": "Direct",
"requested": "[4.7.2, )",
Expand Down
8 changes: 6 additions & 2 deletions src/compiler/Restler.CompilerExe/Restler.CompilerExe.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>NU1603</NoWarn>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestoreLockedMode>true</RestoreLockedMode>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>

</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OtherFlags></OtherFlags>
Expand All @@ -16,7 +19,8 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<Content Include="packages.lock.json" />
<Content Include="packages.lock.json" />

</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Restler.Compiler\Restler.Compiler.fsproj" />
Expand Down
20 changes: 10 additions & 10 deletions src/compiler/Restler.CompilerExe/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net8.0": {
"FSharp.Core": {
"type": "Direct",
"requested": "[4.7.2, )",
Expand Down Expand Up @@ -1117,15 +1117,15 @@
"restler.compiler": {
"type": "Project",
"dependencies": {
"FSharp.Core": "4.7.2",
"Microsoft.ApplicationInsights": "2.14.0",
"Microsoft.FSharpLu": "0.11.7",
"Microsoft.FSharpLu.Json": "0.11.7",
"NJsonSchema": "10.7.2",
"NSwag.Core": "13.16.1",
"NSwag.Core.Yaml": "13.16.1",
"Newtonsoft.Json": "13.0.1",
"Pluralize.NET.Core": "1.0.0"
"FSharp.Core": "[4.7.2, )",
"Microsoft.ApplicationInsights": "[2.14.0, )",
"Microsoft.FSharpLu": "[0.11.7, )",
"Microsoft.FSharpLu.Json": "[0.11.7, )",
"NJsonSchema": "[10.7.2, )",
"NSwag.Core": "[13.16.1, )",
"NSwag.Core.Yaml": "[13.16.1, )",
"Newtonsoft.Json": "[13.0.1, )",
"Pluralize.NET.Core": "[1.0.0, )"
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/driver/Restler.Driver.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Restler</AssemblyName>
<NoWarn>NU1603</NoWarn>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestoreLockedMode>true</RestoreLockedMode>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>

</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OtherFlags></OtherFlags>
Expand All @@ -21,7 +24,8 @@
<Compile Include="SpecCoverage.fs" />
<Compile Include="TaskResults.fs" />
<Compile Include="Program.fs" />
<Content Include="packages.lock.json" />
<Content Include="packages.lock.json" />

</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FSharpLu" Version="0.11.7" />
Expand Down
20 changes: 10 additions & 10 deletions src/driver/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net6.0": {
"net8.0": {
"FSharp.Core": {
"type": "Direct",
"requested": "[4.7.2, )",
Expand Down Expand Up @@ -1116,15 +1116,15 @@
"restler.compiler": {
"type": "Project",
"dependencies": {
"FSharp.Core": "4.7.2",
"Microsoft.ApplicationInsights": "2.14.0",
"Microsoft.FSharpLu": "0.11.7",
"Microsoft.FSharpLu.Json": "0.11.7",
"NJsonSchema": "10.7.2",
"NSwag.Core": "13.16.1",
"NSwag.Core.Yaml": "13.16.1",
"Newtonsoft.Json": "13.0.1",
"Pluralize.NET.Core": "1.0.0"
"FSharp.Core": "[4.7.2, )",
"Microsoft.ApplicationInsights": "[2.14.0, )",
"Microsoft.FSharpLu": "[0.11.7, )",
"Microsoft.FSharpLu.Json": "[0.11.7, )",
"NJsonSchema": "[10.7.2, )",
"NSwag.Core": "[13.16.1, )",
"NSwag.Core.Yaml": "[13.16.1, )",
"Newtonsoft.Json": "[13.0.1, )",
"Pluralize.NET.Core": "[1.0.0, )"
}
}
}
Expand Down

0 comments on commit be7e029

Please sign in to comment.