From 692ace4adefbe47cf98f587518df7a8e2deb3a56 Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Sat, 28 May 2022 15:22:59 +0100 Subject: [PATCH] SDK 6, ReproducibleBuilds SDK 6.0.200 SourceLink -> DotNet.ReproducibleBuilds Warning Level 5 --- .github/workflows/build.yml | 12 +++---- Argu.sln | 32 +++++++++---------- Directory.Build.props | 10 +----- global.json | 2 +- paket.dependencies | 4 +-- paket.lock | 24 +++++++++++--- .../Argu.Samples.LS/Argu.Samples.LS.fsproj | 4 +-- src/Argu/Argu.fsproj | 6 ++-- src/Argu/Parsers/Cli.fs | 3 +- src/Argu/Parsers/Common.fs | 4 ++- src/Argu/Parsers/KeyValue.fs | 3 +- src/Argu/UnionArgInfo.fs | 4 +-- src/Argu/paket.references | 2 +- tests/Argu.Tests/Argu.Tests.fsproj | 3 +- 14 files changed, 58 insertions(+), 55 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7116d5bd..2885de82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.100 - name: Build run: .\build.cmd -t Bundle @@ -24,6 +20,10 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.200 - name: Build run: ./docker-build.sh -t Bundle @@ -35,6 +35,6 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.100 + dotnet-version: 6.0.200 - name: Build - run: ./build.sh -t Bundle \ No newline at end of file + run: ./build.sh -t Bundle diff --git a/Argu.sln b/Argu.sln index 9416f460..e95f9fbf 100644 --- a/Argu.sln +++ b/Argu.sln @@ -2,40 +2,37 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27428.2002 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Argu", "src\Argu\Argu.fsproj", "{D3E958F9-5FFF-462E-BDC7-A03272A9F5D9}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Argu", "src\Argu\Argu.fsproj", "{D3E958F9-5FFF-462E-BDC7-A03272A9F5D9}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Argu.Samples.LS", "samples\Argu.Samples.LS\Argu.Samples.LS.fsproj", "{E0563A30-4451-4DF2-9D21-26C76EB85C22}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Argu.Samples.LS", "samples\Argu.Samples.LS\Argu.Samples.LS.fsproj", "{E0563A30-4451-4DF2-9D21-26C76EB85C22}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Argu.Tests", "tests\Argu.Tests\Argu.Tests.fsproj", "{8E234746-5098-4400-98F1-62C77AB91711}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Argu.Tests", "tests\Argu.Tests\Argu.Tests.fsproj", "{8E234746-5098-4400-98F1-62C77AB91711}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{6CAC8891-E2B6-4CC8-AACF-0AAA4F2A49D0}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{6CAC8891-E2B6-4CC8-AACF-0AAA4F2A49D0}" ProjectSection(SolutionItems) = preProject .config\dotnet-tools.json = .config\dotnet-tools.json EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{83FE66F8-6E59-4178-8962-11117B51F39C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{83FE66F8-6E59-4178-8962-11117B51F39C}" ProjectSection(SolutionItems) = preProject .github\ISSUE_TEMPLATE.md = .github\ISSUE_TEMPLATE.md EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{EE42293D-9398-4EF4-B151-9DE992EBB85A}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{EE42293D-9398-4EF4-B151-9DE992EBB85A}" ProjectSection(SolutionItems) = preProject .github\workflows\build.yml = .github\workflows\build.yml EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{306D68AD-1E01-4367-9498-EF4CEDE0AF38}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{306D68AD-1E01-4367-9498-EF4CEDE0AF38}" ProjectSection(SolutionItems) = preProject .paket\Paket.Restore.targets = .paket\Paket.Restore.targets EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2687163A-E0EA-4EC6-A388-430314AA8C85}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2687163A-E0EA-4EC6-A388-430314AA8C85}" ProjectSection(SolutionItems) = preProject .dockerignore = .dockerignore .gitignore = .gitignore .tfignore = .tfignore - .travis.yml = .travis.yml - appveyor.yml = appveyor.yml - Argu.sln = Argu.sln build.cmd = build.cmd build.fsx = build.fsx build.sh = build.sh @@ -48,9 +45,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution paket.lock = paket.lock README.md = README.md RELEASE_NOTES.md = RELEASE_NOTES.md + .github\workflows\build.yml = .github\workflows\build.yml EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C9E28045-41C6-422E-9928-4220EF3FF19B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C9E28045-41C6-422E-9928-4220EF3FF19B}" ProjectSection(SolutionItems) = preProject docs\_template.html = docs\_template.html docs\index.fsx = docs\index.fsx @@ -58,22 +56,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C9E28045-4 docs\tutorial.fsx = docs\tutorial.fsx EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{10ED3503-22F2-42EF-8B35-C979A5B700D0}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{10ED3503-22F2-42EF-8B35-C979A5B700D0}" ProjectSection(SolutionItems) = preProject docs\img\logo.pdn = docs\img\logo.pdn docs\img\logo.png = docs\img\logo.png EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "resource", "resource", "{B1E24C6F-9B2C-4102-B99A-9065B5745E6F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "resource", "resource", "{B1E24C6F-9B2C-4102-B99A-9065B5745E6F}" ProjectSection(SolutionItems) = preProject resource\logo.png = resource\logo.png EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{A15390A5-BC39-433F-BA25-8775B4C2E329}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{A15390A5-BC39-433F-BA25-8775B4C2E329}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{93AB3CBB-7714-49DD-9C6F-40E153A66E8F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{93AB3CBB-7714-49DD-9C6F-40E153A66E8F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E40F0B06-703E-4541-826F-3B8AED67AF7B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E40F0B06-703E-4541-826F-3B8AED67AF7B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Directory.Build.props b/Directory.Build.props index f4208985..f3226b9a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@  - false + 5 true @@ -10,15 +10,7 @@ Eirik Tsarpalis 2019 F#, argument, parser - https://github.com/fsprojects/Argu/ https://fsprojects.github.io/Argu/ MIT - git - - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - - diff --git a/global.json b/global.json index 7911ba58..c7225846 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "5.0.100", + "version": "6.0.200", "rollForward": "minor" } } diff --git a/paket.dependencies b/paket.dependencies index 87041444..a95443e4 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -4,7 +4,7 @@ storage: none nuget FSharp.Core >= 4.3.2 lowest_matching:true nuget System.Configuration.ConfigurationManager >= 4.0 lowest_matching:true -nuget Microsoft.SourceLink.GitHub prerelease copy_local:true +nuget DotNet.ReproducibleBuilds group Tests source https://api.nuget.org/v3/index.json @@ -30,4 +30,4 @@ group Build nuget Fake.IO.FileSystem ~> 5.20.0 nuget Fake.DotNet.Cli ~> 5.20.0 nuget Fake.Tools.Git ~> 5.20.0 - nuget Fake.Api.Github ~> 5.20.0 \ No newline at end of file + nuget Fake.Api.Github ~> 5.20.0 diff --git a/paket.lock b/paket.lock index b35ffe1b..3c0c33eb 100644 --- a/paket.lock +++ b/paket.lock @@ -2,12 +2,26 @@ STORAGE: NONE RESTRICTION: == netstandard2.0 NUGET remote: https://api.nuget.org/v3/index.json + DotNet.ReproducibleBuilds (1.1.1) + Microsoft.SourceLink.AzureRepos.Git (>= 1.1.1) + Microsoft.SourceLink.Bitbucket.Git (>= 1.1.1) + Microsoft.SourceLink.GitHub (>= 1.1.1) + Microsoft.SourceLink.GitLab (>= 1.1.1) FSharp.Core (4.3.2) - Microsoft.Build.Tasks.Git (1.1.0-beta-20204-02) - copy_local: true - Microsoft.SourceLink.Common (1.1.0-beta-20204-02) - copy_local: true - Microsoft.SourceLink.GitHub (1.1.0-beta-20204-02) - copy_local: true - Microsoft.Build.Tasks.Git (>= 1.1.0-beta-20204-02) - Microsoft.SourceLink.Common (>= 1.1.0-beta-20204-02) + Microsoft.Build.Tasks.Git (1.1.1) + Microsoft.SourceLink.AzureRepos.Git (1.1.1) + Microsoft.Build.Tasks.Git (>= 1.1.1) + Microsoft.SourceLink.Common (>= 1.1.1) + Microsoft.SourceLink.Bitbucket.Git (1.1.1) + Microsoft.Build.Tasks.Git (>= 1.1.1) + Microsoft.SourceLink.Common (>= 1.1.1) + Microsoft.SourceLink.Common (1.1.1) + Microsoft.SourceLink.GitHub (1.1.1) + Microsoft.Build.Tasks.Git (>= 1.1.1) + Microsoft.SourceLink.Common (>= 1.1.1) + Microsoft.SourceLink.GitLab (1.1.1) + Microsoft.Build.Tasks.Git (>= 1.1.1) + Microsoft.SourceLink.Common (>= 1.1.1) System.Buffers (4.5.1) System.Configuration.ConfigurationManager (4.4) System.Security.Cryptography.ProtectedData (>= 4.4) diff --git a/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj b/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj index 49f69fb3..e9173e3f 100644 --- a/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj +++ b/samples/Argu.Samples.LS/Argu.Samples.LS.fsproj @@ -1,10 +1,8 @@ - - + net5.0 Exe ls - true diff --git a/src/Argu/Argu.fsproj b/src/Argu/Argu.fsproj index cdb72be2..bb17edfd 100644 --- a/src/Argu/Argu.fsproj +++ b/src/Argu/Argu.fsproj @@ -1,10 +1,8 @@ - - + netstandard2.0 true true - true logo.png @@ -24,4 +22,4 @@ - \ No newline at end of file + diff --git a/src/Argu/Parsers/Cli.fs b/src/Argu/Parsers/Cli.fs index b3125be6..f7a40a8e 100644 --- a/src/Argu/Parsers/Cli.fs +++ b/src/Argu/Parsers/Cli.fs @@ -1,6 +1,7 @@ [] module internal Argu.CliParser +[] type CliParseToken = | EndOfStream | CliParam of token:string * switch:string * caseInfo:UnionCaseArgInfo * assignment:Assignment @@ -147,7 +148,7 @@ and CliParseResultAggregatorStack (context : UnionArgInfo) = stack.Add agg agg - +[] type CliParseState = { ProgramName : string diff --git a/src/Argu/Parsers/Common.fs b/src/Argu/Parsers/Common.fs index 541282e5..82c75062 100644 --- a/src/Argu/Parsers/Common.fs +++ b/src/Argu/Parsers/Common.fs @@ -3,7 +3,9 @@ module internal Argu.CommonParsers type KeyValueParseResult = Choice +[] exception ParseError of message:string * code:ErrorCode * argInfo:UnionArgInfo +[] exception HelpText of subcommand:UnionArgInfo let inline error argInfo code fmt = @@ -93,4 +95,4 @@ let postProcessResults (argInfo : UnionArgInfo) (ignoreMissingMandatory : bool) UnrecognizedCliParams = match commandLineResults with Some clr -> clr.UnrecognizedCliParams | None -> [] UnrecognizedCliParseResults = match commandLineResults with Some clr -> clr.UnrecognizedCliParseResults | None -> [] IsUsageRequested = commandLineResults |> Option.exists (fun r -> r.IsUsageRequested) - } \ No newline at end of file + } diff --git a/src/Argu/Parsers/KeyValue.fs b/src/Argu/Parsers/KeyValue.fs index 6fd79afa..aad3fee1 100644 --- a/src/Argu/Parsers/KeyValue.fs +++ b/src/Argu/Parsers/KeyValue.fs @@ -17,6 +17,7 @@ type KeyValueParseResults (argInfo : UnionArgInfo) = member __.Results : KeyValueParseResult [] = results +[] type KeyValueParseState = { ArgInfo : UnionArgInfo @@ -106,4 +107,4 @@ let private parseKeyValuePartial (state : KeyValueParseState) (caseInfo : UnionC let parseKeyValueConfig (configReader : IConfigurationReader) (argInfo : UnionArgInfo) = let state = { ArgInfo = argInfo ; Reader = configReader ; Results = new KeyValueParseResults(argInfo) } for caseInfo in argInfo.Cases.Value do parseKeyValuePartial state caseInfo - state.Results.Results \ No newline at end of file + state.Results.Results diff --git a/src/Argu/UnionArgInfo.fs b/src/Argu/UnionArgInfo.fs index 0b30bb74..83bc9ab7 100644 --- a/src/Argu/UnionArgInfo.fs +++ b/src/Argu/UnionArgInfo.fs @@ -122,7 +122,7 @@ with member inline __.IsCommandLineArg = match __.CommandLineNames.Value with [] -> __.IsMainCommand | _ -> true member inline __.IsCustomAssignment = Option.isSome __.CustomAssignmentSeparator.Value -and ParameterInfo = +and [] ParameterInfo = | Primitives of FieldParserInfo [] | OptionalParam of Existential * FieldParserInfo | ListParam of Existential * FieldParserInfo @@ -231,4 +231,4 @@ type UnionCaseArgInfo with IsHidden = ucai.IsHidden IsGatherUnrecognized = ucai.IsGatherUnrecognized GatherAllSources = ucai.GatherAllSources - } \ No newline at end of file + } diff --git a/src/Argu/paket.references b/src/Argu/paket.references index 96c04807..829f4075 100644 --- a/src/Argu/paket.references +++ b/src/Argu/paket.references @@ -1,3 +1,3 @@ FSharp.Core System.Configuration.ConfigurationManager -Microsoft.SourceLink.GitHub \ No newline at end of file +DotNet.ReproducibleBuilds diff --git a/tests/Argu.Tests/Argu.Tests.fsproj b/tests/Argu.Tests/Argu.Tests.fsproj index 585321ba..3adf7ecc 100644 --- a/tests/Argu.Tests/Argu.Tests.fsproj +++ b/tests/Argu.Tests/Argu.Tests.fsproj @@ -1,5 +1,4 @@ - - + net5.0