From c28f08736510a34a42ce17b787087ebf15e68e40 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 10 Jun 2026 07:38:41 +0000
Subject: [PATCH 1/2] Remove ParseConfig and release notes
---
Argu.slnx | 1 -
Directory.Build.props | 2 -
RELEASE_NOTES.md | 222 ---------------------------
build.fsx | 19 +--
src/Argu/ArgumentParser.fs | 42 -----
tests/Argu.Tests/Argu.Tests.fsproj | 1 -
tests/Argu.Tests/ParseConfigTests.fs | 85 ----------
7 files changed, 7 insertions(+), 365 deletions(-)
delete mode 100644 RELEASE_NOTES.md
delete mode 100644 tests/Argu.Tests/ParseConfigTests.fs
diff --git a/Argu.slnx b/Argu.slnx
index 998efbc9..e6ea4e51 100644
--- a/Argu.slnx
+++ b/Argu.slnx
@@ -21,7 +21,6 @@
-
diff --git a/Directory.Build.props b/Directory.Build.props
index 29e68b65..3756f152 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -19,10 +19,8 @@
https://github.com/fsprojects/Argu/tree/$(RepositoryBranch)
MIT
-
https://github.com/fsprojects/Argu/blob/master/LICENSE.md
- https://github.com/fsprojects/Argu/blob/master/RELEASE_NOTES.md
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
deleted file mode 100644
index 9e561015..00000000
--- a/RELEASE_NOTES.md
+++ /dev/null
@@ -1,222 +0,0 @@
-### 6.2.6
-* Fix NRE in derivation of programName introduced in 6.2.2 [#292](https://github.com/fsprojects/Argu/pull/292) [@dimension-zero](https://github.com/dimension-zero)
-* Fix Clarify exception in expr2Uci [#293](https://github.com/fsprojects/Argu/pull/293) [@dimension-zero](https://github.com/dimension-zero)
-* Fix Report all missing args in error message, not just first level [#297](https://github.com/fsprojects/Argu/pull/297) [@dimension-zero](https://github.com/dimension-zero)
-* Fix Limit min wordwrap column to 20 [#302](https://github.com/fsprojects/Argu/pull/302) [@dimension-zero](https://github.com/dimension-zero)
-* Fix [misrendering of usage when parameter description blank](https://github.com/fsprojects/Argu/issues/173) [#323](https://github.com/fsprojects/Argu/pull/323) [@DominikL1999](https://github.com/DominikL1999)
-* Add `Separator("=", orSpace = true)` and `Separator "="` attribute syntax to replace `Obsolete`d `EqualsAssignment`, `ColonAssignment`, `CustomAssignment`, `EqualsAssignmentOrSpaced`, `ColonAssignmentOrSpaced` and `CustomAssignmentOrSpaced` [#315](https://github.com/fsprojects/Argu/pull/315) [@dimension-zero](https://github.com/dimension-zero)
-* Add `Argu.Samples.Introspect` sample [#298](https://github.com/fsprojects/Argu/pull/298) [@dimension-zero](https://github.com/dimension-zero)
-* Add `ArgumentParser.Parse(ParseConfig)` [#307](https://github.com/fsprojects/Argu/pull/307) [@dimension-zero](https://github.com/dimension-zero)
-* Add `ArgumentParser.PrintUsage(..., ?UsageStrings)` for localization support [#303](https://github.com/fsprojects/Argu/pull/303) [@dimension-zero](https://github.com/dimension-zero)
-* Add AOT annotations [#314](https://github.com/fsprojects/Argu/pull/314) [@dimension-zero](https://github.com/dimension-zero)
-* Add `SourceGenerator.ArguGenerate` marker [#318](https://github.com/fsprojects/Argu/pull/318) [@dimension-zero](https://github.com/dimension-zero)
-* Add `ConfigurationReader.FromEnvironmentVariables(prefix : String)` [#308](https://github.com/fsprojects/Argu/pull/308) [@dimension-zero](https://github.com/dimension-zero)
-* Add `ConfigurationReader.FromMicrosoftConfiguration(Microsoft.Extensions.Configuration.IConfiguration)` [#308](https://github.com/fsprojects/Argu/pull/308) [@dimension-zero](https://github.com/dimension-zero)
-* Obsolete `EqualsAssignmentAttribute`, `ColonAssignmentAttribute`, `CustomAssignmentAttribute`, `EqualsAssignmentOrSpacedAttribute`, `ColonAssignmentOrSpacedAttribute` and `CustomAssignmentOrSpacedAttribute` [#315](https://github.com/fsprojects/Argu/pull/315) [@dimension-zero](https://github.com/dimension-zero)
-* Obsolete `PostProcessResult`, `PostProcessResults`, `TryPostProcessResult` [#296](https://github.com/fsprojects/Argu/pull/296) [@dimension-zero](https://github.com/dimension-zero)
-
-### 6.2.5
-* Drop Package `FSharp.Core` dependency to `6.0.0` [#264](https://github.com/fsprojects/Argu/pull/264)
-* target Unquote 7.0.1 now that it has [reduced `FSharp.Core` dependencies](https://github.com/SwensenSoftware/unquote/pull/172) [#264](https://github.com/fsprojects/Argu/pull/264)
-
-### 6.2.4
-* Add `AttributeUsage` targets for methods which will be required in .NET 8.0.300 [#243](https://github.com/fsprojects/Argu/pull/243) [@dlidstrom](https://github.com/dlidstrom)
-
-### 6.2.3
-* Improve error message on missing cases on a subcommands (display all missing cases) [#236](https://github.com/fsprojects/Argu/pull/236) [@fpellet](https://github.com/fpellet)
-* Fix the regression of the [#127](https://github.com/fsprojects/Argu/pull/127) merged in 6.1.2 and fix usage display when there are missing case in subcommands. [#236](https://github.com/fsprojects/Argu/pull/236) [@fpellet](https://github.com/fpellet)
-
-### 6.2.2
-* Fix default `programName` when invoking via a wrapper such as `dotnet.exe` [#233](https://github.com/fsprojects/Argu/pull/233)
-
-### 6.2.1
-* Fix `ParseResults.ProgramName` - make it public (cut and paste error in [#229](https://github.com/fsprojects/Argu/pull/229)) [#231](https://github.com/fsprojects/Argu/pull/231)
-
-### 6.2.0
-* Add `ParseResults.ProgramName` [#229](https://github.com/fsprojects/Argu/pull/229)
-* Add `ParseResults.GetResult(expr, 'Field -> 'R): 'R` as alias for `PostProcessResult`, `ParseResults.GetResults(expr, 'Field -> 'R): 'R list` as alias for `PostProcessResults`, `ParseResults.TryGetResult(expr, 'Field -> 'R): 'R option` as alias for `TryPostProcessResult` [#230](https://github.com/fsprojects/Argu/pull/230)
-* Add `ParseResults.GetResult(expr, defThunk: unit -> 'Field, parse: 'Field -> 'R): 'R` and `ParseResults.GetResults(expr, def: 'Field, parse: 'Field -> 'R): 'R` that trap parse exceptions, mapping them to parse exit messages [#230](https://github.com/fsprojects/Argu/pull/230)
-
-### 6.1.5
-* Fix the regression of the [#127](https://github.com/fsprojects/Argu/pull/127) merged in 6.1.2 and fix Mandatory arguments in nested subcommands. [#220](https://github.com/fsprojects/Argu/issues/220) [@fpellet](https://github.com/fpellet)
-
-### 6.1.4
-* Fix: remove incorrect `ReproducibleBuilds` reference [introduced in `6.1.3`](https://github.com/fsprojects/Argu/pull/174) [#202](https://github.com/fsprojects/Argu/pull/202)
-
-### 6.1.3 (Unlisted)
-* Add ParseResults.GetResult(expr, unit -> 'T) helper for Catch [#187](https://github.com/fsprojects/Argu/pull/187)
-* Use [`Dotnet.ReproducibleBuilds`](https://github.com/dotnet/reproducible-builds) [#174](https://github.com/fsprojects/Argu/pull/174)
-
-### 6.1.2
-* Fix Mandatory arguments in nested subcommands. [#116](https://github.com/fsprojects/Argu/issues/116) [@chestercodes](https://github.com/chestercodes)
-* Fix Consistent handling of numeric decimal separators using invariant culture. [#159](https://github.com/fsprojects/Argu/issues/159) [@stmax82](https://github.com/stmax82)
-
-### 6.1.1
-* Fix CustomAssignmentOrSpacedAttribute interop with optional fields.
-
-### 6.1.0
-* Add a CustomAssignmentOrSpacedAttribute for custom assignments that can also be space separated.
-
-### 6.0.0
-* Target netstandard2.0 only.
-
-### 5.5.0
-* Publish separate symbols package.
-
-### 5.4.0
-* Chain inner exceptions in ArguExceptions.
-
-### 5.3.0
-* case-insensitivity for command-line enums.
-* Add SubCommand attribute for nullary subcommands.
-
-### 5.2.0
-* Fix SourceLink issues.
-
-### 5.1.0
-* Performance optimizations.
-* Fixed incorrect commandline option generation in non-English locales.
-
-### 5.0.1
-* Fix framework constraint issue.
-
-### 5.0.0
-* Allow use of query API with implicit quotations
-* Require FSharp.Core 4.0 for net40.
-* Require FSharp.Core 4.3 for netstandard2.0.
-
-### 4.2.1
-* Fix packaging issue.
-
-### 4.2.0
-* Migrate to SourceLink 2.0
-
-### 4.1.0
-* Add AppSettings configuration reader support for NetStandard.
-
-### 4.0.0
-* Support NetStandard 2.0
-* Add Environment Variable configuration reader.
-
-### 3.6.1
-* Fix default character width issue in console apps.
-
-### 3.6.0
-* Fix wordwrapping issue in usage strings.
-
-### 3.5.0
-* Add SourceLink Support.
-
-### 3.4.0
-* Assignment separator parsing bugfix.
-
-### 3.3.0
-* Support CoreCLR.
-
-### 3.2.0
-* Add `hideSyntax` option in PrintUsage() method.
-
-### 3.1.0
-* Add support for MainCommand attribute.
-
-### 3.0.1
-* Bugfix usage string rendering issue where description might span multiple lines.
-
-### 3.0.0
-* Add subcommand support.
-* Add support for list and option parameters.
-* Add support for grouped switches.
-* Extend EqualsAssignment attribute for parameters of arity 2.
-* Implement UniqueAttribute and ExactlyOnceAttribute.
-* Implement HelpFlagsAttribute, HelpDescriptionAttribute and DisableHelpAttribute.
-* Implement GatherUnrecognizedAttribute.
-* Add ParseResult.UnrecognizedCliParams property.
-* Add support for F# unions used as enumeration parameters.
-
-### 2.1.0
-* AltCommandLineAttribute supporting variadic parameters.
-
-### 2.0.0
-* Move to fsprojects, rename root namespace.
-
-### 1.1.3
-* Fixes to error message formatting.
-
-### 1.1.2
-* Bugfix #40.
-
-### 1.1.1
-* Support slashes in command line parameter names.
-
-### 1.1.0
-* Implement parseResult.Iter methods.
-
-### 1.0.0
-* Rename project to Argu.
-* Move back to F# 3.0 runtime by default.
-
-### 0.9.0
-* Move to F# 3.1 runtime.
-
-### 0.8.7
-* Fix CLI parser bug.
-
-### 0.8.6
-* Allow inclusion of '--help' parameters before arguments marked with FirstAttribute.
-
-### 0.8.5
-* Add support for parameterized CLI prefixes in auto-generated parameter names. Minor fixes.
-
-### 0.8.4
-* Add support for CLI syntax printing.
-
-### 0.8.3
-* Add checks for conflicting parameter identifiers.
-
-### 0.8.2
-* Fix package issue.
-
-### 0.8.1
-* Fix reflection bug.
-
-### 0.8.0
-* Add support for ignored parameters.
-* Add support for '--param=argument' CLI syntax.
-* Update ParseSource API.
-* Fix BASE64 encoding issue.
-
-### 0.7.1
-* Replace ArgParser public constructor with factory method.
-
-### 0.7.0
-* Add support for Base64 binary parsing.
-
-### 0.6.6
-* Fix packaging issue.
-
-### 0.6.5
-* Add support for F# 3.1 DU labels.
-
-### 0.6.4
-* Add support for .NET 3.5
-
-### 0.6.3
-* Fix bug where parsing crashes if no app.config file present.
-
-### 0.6.2
-* Remove BindingFlags parameter from Argu.
-
-### 0.6.1
-* Add support for multiple alternative command line names.
-
-#### 0.6.0
-* Update root namespace to Nessos.Argu
-* Add support for application configuration in class libraries
-* Change application configuration parsing API.
-
-#### 0.5.9
-* Fix packaging issue.
-
-#### 0.5.8
-* Include optional BindingFlags parameter.
-* Include support for all primitive types.
diff --git a/build.fsx b/build.fsx
index 54935bb5..ec751246 100644
--- a/build.fsx
+++ b/build.fsx
@@ -4,7 +4,6 @@
#r "nuget: System.Reactive ,5.0.0"
#r "nuget: Fake.Core.UserInput ,5.23.1"
-#r "nuget: Fake.Core.ReleaseNotes ,5.23.1"
#r "nuget: Fake.Core.Target ,5.23.1"
#r "nuget: Fake.IO.FileSystem ,5.23.1"
#r "nuget: Fake.DotNet.Cli ,5.23.1"
@@ -39,6 +38,7 @@ Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
let gitOwner = "fsprojects"
let gitName = "Argu"
let gitHome = "https://github.com/" + gitOwner
+let version = "6.2.6"
let configuration = Environment.environVarOrDefault "Configuration" "Release"
@@ -48,9 +48,6 @@ let artifacts = __SOURCE_DIRECTORY__ @@ "artifacts"
// The rest of the code is standard F# build script
// --------------------------------------------------------------------------------------
-// Read additional information from the release notes document
-let release = ReleaseNotes.load "RELEASE_NOTES.md"
-
// --------------------------------------------------------------------------------------
// Clean build results & restore NuGet packages
@@ -69,7 +66,7 @@ Target.create "Build" (fun _ ->
MSBuildParams =
{ c.MSBuildParams with
- Properties = [("Version", release.NugetVersion)]
+ Properties = [("Version", version)]
DisableInternalBinLog = true }
}) __SOURCE_DIRECTORY__
@@ -97,7 +94,6 @@ Target.create "RunTests" (fun _ ->
// Build a NuGet package
Target.create "NuGet.Pack" (fun _ ->
- let releaseNotes = String.toLines release.Notes |> System.Net.WebUtility.HtmlEncode
DotNet.pack (fun pack ->
{ pack with
OutputPath = Some artifacts
@@ -105,8 +101,7 @@ Target.create "NuGet.Pack" (fun _ ->
MSBuildParams =
{ pack.MSBuildParams with
Properties =
- [("Version", release.NugetVersion)
- ("PackageReleaseNotes", releaseNotes)]
+ [("Version", version)]
DisableInternalBinLog = true }
}) __SOURCE_DIRECTORY__
)
@@ -142,11 +137,11 @@ Target.create "ReleaseGitHub" (fun _ ->
|> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0]
//StageAll ""
- Git.Commit.exec "" (sprintf "Bump version to %s" release.NugetVersion)
+ Git.Commit.exec "" (sprintf "Bump version to %s" version)
Git.Branches.pushBranch "" remote (Git.Information.getBranchName "")
- Git.Branches.tag "" release.NugetVersion
- Git.Branches.pushTag "" remote release.NugetVersion
+ Git.Branches.tag "" version
+ Git.Branches.pushTag "" remote version
let client =
match Environment.GetEnvironmentVariable "GITHUB_TOKEN" with
@@ -165,7 +160,7 @@ Target.create "ReleaseGitHub" (fun _ ->
// release on github
client
- |> GitHub.draftNewRelease gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
+ |> GitHub.draftNewRelease gitOwner gitName version false Seq.empty
|> GitHub.publishDraft
|> Async.RunSynchronously
)
diff --git a/src/Argu/ArgumentParser.fs b/src/Argu/ArgumentParser.fs
index 9da0f5e5..d328b872 100644
--- a/src/Argu/ArgumentParser.fs
+++ b/src/Argu/ArgumentParser.fs
@@ -5,35 +5,6 @@ open System.Diagnostics.CodeAnalysis
open Argu.UnionArgInfo
-/// Configuration record for .
-/// Each field carries the same meaning as the matching optional parameter on
-/// the existing Parse overload. Use
-/// as a starting point and override only the fields you care about.
-[]
-type ParseConfig =
- {
- /// The command line input. None takes the inputs from System.Environment.
- Inputs : string [] option
- /// Configuration reader used to source AppSettings-style arguments.
- /// None uses the AppSettings configuration of the current process.
- ConfigurationReader : IConfigurationReader option
- /// Ignore errors caused by the Mandatory attribute.
- IgnoreMissing : bool
- /// Ignore CLI arguments that do not match the schema.
- IgnoreUnrecognized : bool
- /// Treat '--help' parameters as parse errors.
- RaiseOnUsage : bool
- }
- /// Default parse configuration, matching the historical Parse(...) defaults:
- /// inputs and configurationReader inherited from the environment, do not ignore
- /// missing or unrecognized arguments, and raise on '--help'.
- static member Default : ParseConfig =
- { Inputs = None
- ConfigurationReader = None
- IgnoreMissing = false
- IgnoreUnrecognized = false
- RaiseOnUsage = true }
-
module internal TrimMessages =
[]
let aot =
@@ -201,19 +172,6 @@ and []
with ParserExn (errorCode, msg) -> errorHandler.Exit (msg, errorCode)
- /// Parse both command line args and supplied configuration reader, using
- /// a record. Useful when callers want to construct
- /// the parameter set programmatically (e.g. layering host defaults over user
- /// overrides) without juggling many optional method arguments.
- /// The parse configuration. See ParseConfig.Default.
- member self.Parse (config : ParseConfig) : ParseResults<'Template> =
- self.Parse(
- ?inputs = config.Inputs,
- ?configurationReader = config.ConfigurationReader,
- ignoreMissing = config.IgnoreMissing,
- ignoreUnrecognized = config.IgnoreUnrecognized,
- raiseOnUsage = config.RaiseOnUsage)
-
/// Parse both command line args and supplied configuration reader.
/// Results are merged with command line args overriding configuration parameters.
/// The command line input. Taken from System.Environment if not specified.
diff --git a/tests/Argu.Tests/Argu.Tests.fsproj b/tests/Argu.Tests/Argu.Tests.fsproj
index d0c25223..a7369f96 100644
--- a/tests/Argu.Tests/Argu.Tests.fsproj
+++ b/tests/Argu.Tests/Argu.Tests.fsproj
@@ -9,7 +9,6 @@
-
diff --git a/tests/Argu.Tests/ParseConfigTests.fs b/tests/Argu.Tests/ParseConfigTests.fs
deleted file mode 100644
index 68edf22e..00000000
--- a/tests/Argu.Tests/ParseConfigTests.fs
+++ /dev/null
@@ -1,85 +0,0 @@
-module Argu.Tests.ParseConfigTests
-
-open System.Collections.Generic
-open Swensen.Unquote
-open Xunit
-
-open Argu
-
-type Args =
- | [] Port of int
- | Verbose
- | Tag of string
- interface IArgParserTemplate with
- member this.Usage =
- match this with
- | Port _ -> "port"
- | Verbose -> "verbose"
- | Tag _ -> "tag"
-
-let private parser () = ArgumentParser.Create()
-[]
-let ``ParseConfig.Default holds historical defaults`` () =
- let d = ParseConfig.Default
- test <@ d.Inputs = None @>
- test <@ d.ConfigurationReader = None @>
- test <@ d.IgnoreMissing = false @>
- test <@ d.IgnoreUnrecognized = false @>
- test <@ d.RaiseOnUsage = true @>
-
-[]
-let ``Parse(config with explicit inputs) parses those inputs`` () =
- let p = parser ()
- let argv = [| "--port"; "8080"; "--verbose" |]
- let cfg = { ParseConfig.Default with Inputs = Some argv ; RaiseOnUsage = false }
- let results = p.Parse(cfg)
- test <@ results.GetResult(Port) = 8080 @>
- test <@ results.Contains(Verbose) @>
-
-[]
-let ``Parse(config) matches Parse(?inputs, ...) for the same parameters`` () =
- let p = parser ()
- let argv = [| "--port"; "1234"; "--tag"; "v1" |]
- let viaConfig =
- let cfg = { ParseConfig.Default with Inputs = Some argv ; RaiseOnUsage = false }
- p.Parse(cfg)
- let viaOptional = p.Parse(inputs = argv, raiseOnUsage = false)
- test <@ viaConfig.GetResult(Port) = viaOptional.GetResult(Port) @>
- test <@ viaConfig.GetResult(Tag) = viaOptional.GetResult(Tag) @>
-
-[]
-let ``Parse(config with IgnoreMissing=true) skips mandatory check`` () =
- let p = parser ()
- let cfg = { ParseConfig.Default with Inputs = Some [||] ; IgnoreMissing = true }
- let results = p.Parse(cfg)
- test <@ results.TryGetResult(Port) = None @>
-
-[]
-let ``Parse(config with IgnoreUnrecognized=true) collects unknown args`` () =
- let p = parser ()
- let cfg =
- { ParseConfig.Default with
- Inputs = Some [| "--port"; "1"; "--bogus" |]
- IgnoreUnrecognized = true
- RaiseOnUsage = false }
- let results = p.Parse(cfg)
- test <@ results.UnrecognizedCliParams |> List.contains "--bogus" @>
-
-/// Argu's missing-mandatory check fires from the CLI even when AppSettings provides a value (pre-existing behavior),
-/// so the AppSettings round-trip test uses a non-mandatory schema.
-type AppSettingsArgs =
- | TagKey of string
- interface IArgParserTemplate with member this.Usage = "tag"
-
-[]
-let ``Parse(config with ConfigurationReader) sources AppSettings`` () =
- let p = ArgumentParser.Create()
- let dict = Dictionary()
- dict["tagkey"] <- "v1"
- let reader = ConfigurationReader.FromDictionary dict
- let cfg =
- { ParseConfig.Default with
- Inputs = Some [||]
- ConfigurationReader = Some reader }
- let results = p.Parse(cfg)
- test <@ results.GetResult(TagKey) = "v1" @>
From 79c7909978a9b484367652bb9a8ca36e1108be16 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 10 Jun 2026 07:42:05 +0000
Subject: [PATCH 2/2] Restore release notes
---
Argu.slnx | 1 +
Directory.Build.props | 2 +
RELEASE_NOTES.md | 221 ++++++++++++++++++++++++++++++++++++++++++
build.fsx | 19 ++--
4 files changed, 236 insertions(+), 7 deletions(-)
create mode 100644 RELEASE_NOTES.md
diff --git a/Argu.slnx b/Argu.slnx
index e6ea4e51..998efbc9 100644
--- a/Argu.slnx
+++ b/Argu.slnx
@@ -21,6 +21,7 @@
+
diff --git a/Directory.Build.props b/Directory.Build.props
index 3756f152..29e68b65 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -19,8 +19,10 @@
https://github.com/fsprojects/Argu/tree/$(RepositoryBranch)
MIT
+
https://github.com/fsprojects/Argu/blob/master/LICENSE.md
+ https://github.com/fsprojects/Argu/blob/master/RELEASE_NOTES.md
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
new file mode 100644
index 00000000..8a4ecfc3
--- /dev/null
+++ b/RELEASE_NOTES.md
@@ -0,0 +1,221 @@
+### 6.2.6
+* Fix NRE in derivation of programName introduced in 6.2.2 [#292](https://github.com/fsprojects/Argu/pull/292) [@dimension-zero](https://github.com/dimension-zero)
+* Fix Clarify exception in expr2Uci [#293](https://github.com/fsprojects/Argu/pull/293) [@dimension-zero](https://github.com/dimension-zero)
+* Fix Report all missing args in error message, not just first level [#297](https://github.com/fsprojects/Argu/pull/297) [@dimension-zero](https://github.com/dimension-zero)
+* Fix Limit min wordwrap column to 20 [#302](https://github.com/fsprojects/Argu/pull/302) [@dimension-zero](https://github.com/dimension-zero)
+* Fix [misrendering of usage when parameter description blank](https://github.com/fsprojects/Argu/issues/173) [#323](https://github.com/fsprojects/Argu/pull/323) [@DominikL1999](https://github.com/DominikL1999)
+* Add `Separator("=", orSpace = true)` and `Separator "="` attribute syntax to replace `Obsolete`d `EqualsAssignment`, `ColonAssignment`, `CustomAssignment`, `EqualsAssignmentOrSpaced`, `ColonAssignmentOrSpaced` and `CustomAssignmentOrSpaced` [#315](https://github.com/fsprojects/Argu/pull/315) [@dimension-zero](https://github.com/dimension-zero)
+* Add `Argu.Samples.Introspect` sample [#298](https://github.com/fsprojects/Argu/pull/298) [@dimension-zero](https://github.com/dimension-zero)
+* Add `ArgumentParser.PrintUsage(..., ?UsageStrings)` for localization support [#303](https://github.com/fsprojects/Argu/pull/303) [@dimension-zero](https://github.com/dimension-zero)
+* Add AOT annotations [#314](https://github.com/fsprojects/Argu/pull/314) [@dimension-zero](https://github.com/dimension-zero)
+* Add `SourceGenerator.ArguGenerate` marker [#318](https://github.com/fsprojects/Argu/pull/318) [@dimension-zero](https://github.com/dimension-zero)
+* Add `ConfigurationReader.FromEnvironmentVariables(prefix : String)` [#308](https://github.com/fsprojects/Argu/pull/308) [@dimension-zero](https://github.com/dimension-zero)
+* Add `ConfigurationReader.FromMicrosoftConfiguration(Microsoft.Extensions.Configuration.IConfiguration)` [#308](https://github.com/fsprojects/Argu/pull/308) [@dimension-zero](https://github.com/dimension-zero)
+* Obsolete `EqualsAssignmentAttribute`, `ColonAssignmentAttribute`, `CustomAssignmentAttribute`, `EqualsAssignmentOrSpacedAttribute`, `ColonAssignmentOrSpacedAttribute` and `CustomAssignmentOrSpacedAttribute` [#315](https://github.com/fsprojects/Argu/pull/315) [@dimension-zero](https://github.com/dimension-zero)
+* Obsolete `PostProcessResult`, `PostProcessResults`, `TryPostProcessResult` [#296](https://github.com/fsprojects/Argu/pull/296) [@dimension-zero](https://github.com/dimension-zero)
+
+### 6.2.5
+* Drop Package `FSharp.Core` dependency to `6.0.0` [#264](https://github.com/fsprojects/Argu/pull/264)
+* target Unquote 7.0.1 now that it has [reduced `FSharp.Core` dependencies](https://github.com/SwensenSoftware/unquote/pull/172) [#264](https://github.com/fsprojects/Argu/pull/264)
+
+### 6.2.4
+* Add `AttributeUsage` targets for methods which will be required in .NET 8.0.300 [#243](https://github.com/fsprojects/Argu/pull/243) [@dlidstrom](https://github.com/dlidstrom)
+
+### 6.2.3
+* Improve error message on missing cases on a subcommands (display all missing cases) [#236](https://github.com/fsprojects/Argu/pull/236) [@fpellet](https://github.com/fpellet)
+* Fix the regression of the [#127](https://github.com/fsprojects/Argu/pull/127) merged in 6.1.2 and fix usage display when there are missing case in subcommands. [#236](https://github.com/fsprojects/Argu/pull/236) [@fpellet](https://github.com/fpellet)
+
+### 6.2.2
+* Fix default `programName` when invoking via a wrapper such as `dotnet.exe` [#233](https://github.com/fsprojects/Argu/pull/233)
+
+### 6.2.1
+* Fix `ParseResults.ProgramName` - make it public (cut and paste error in [#229](https://github.com/fsprojects/Argu/pull/229)) [#231](https://github.com/fsprojects/Argu/pull/231)
+
+### 6.2.0
+* Add `ParseResults.ProgramName` [#229](https://github.com/fsprojects/Argu/pull/229)
+* Add `ParseResults.GetResult(expr, 'Field -> 'R): 'R` as alias for `PostProcessResult`, `ParseResults.GetResults(expr, 'Field -> 'R): 'R list` as alias for `PostProcessResults`, `ParseResults.TryGetResult(expr, 'Field -> 'R): 'R option` as alias for `TryPostProcessResult` [#230](https://github.com/fsprojects/Argu/pull/230)
+* Add `ParseResults.GetResult(expr, defThunk: unit -> 'Field, parse: 'Field -> 'R): 'R` and `ParseResults.GetResults(expr, def: 'Field, parse: 'Field -> 'R): 'R` that trap parse exceptions, mapping them to parse exit messages [#230](https://github.com/fsprojects/Argu/pull/230)
+
+### 6.1.5
+* Fix the regression of the [#127](https://github.com/fsprojects/Argu/pull/127) merged in 6.1.2 and fix Mandatory arguments in nested subcommands. [#220](https://github.com/fsprojects/Argu/issues/220) [@fpellet](https://github.com/fpellet)
+
+### 6.1.4
+* Fix: remove incorrect `ReproducibleBuilds` reference [introduced in `6.1.3`](https://github.com/fsprojects/Argu/pull/174) [#202](https://github.com/fsprojects/Argu/pull/202)
+
+### 6.1.3 (Unlisted)
+* Add ParseResults.GetResult(expr, unit -> 'T) helper for Catch [#187](https://github.com/fsprojects/Argu/pull/187)
+* Use [`Dotnet.ReproducibleBuilds`](https://github.com/dotnet/reproducible-builds) [#174](https://github.com/fsprojects/Argu/pull/174)
+
+### 6.1.2
+* Fix Mandatory arguments in nested subcommands. [#116](https://github.com/fsprojects/Argu/issues/116) [@chestercodes](https://github.com/chestercodes)
+* Fix Consistent handling of numeric decimal separators using invariant culture. [#159](https://github.com/fsprojects/Argu/issues/159) [@stmax82](https://github.com/stmax82)
+
+### 6.1.1
+* Fix CustomAssignmentOrSpacedAttribute interop with optional fields.
+
+### 6.1.0
+* Add a CustomAssignmentOrSpacedAttribute for custom assignments that can also be space separated.
+
+### 6.0.0
+* Target netstandard2.0 only.
+
+### 5.5.0
+* Publish separate symbols package.
+
+### 5.4.0
+* Chain inner exceptions in ArguExceptions.
+
+### 5.3.0
+* case-insensitivity for command-line enums.
+* Add SubCommand attribute for nullary subcommands.
+
+### 5.2.0
+* Fix SourceLink issues.
+
+### 5.1.0
+* Performance optimizations.
+* Fixed incorrect commandline option generation in non-English locales.
+
+### 5.0.1
+* Fix framework constraint issue.
+
+### 5.0.0
+* Allow use of query API with implicit quotations
+* Require FSharp.Core 4.0 for net40.
+* Require FSharp.Core 4.3 for netstandard2.0.
+
+### 4.2.1
+* Fix packaging issue.
+
+### 4.2.0
+* Migrate to SourceLink 2.0
+
+### 4.1.0
+* Add AppSettings configuration reader support for NetStandard.
+
+### 4.0.0
+* Support NetStandard 2.0
+* Add Environment Variable configuration reader.
+
+### 3.6.1
+* Fix default character width issue in console apps.
+
+### 3.6.0
+* Fix wordwrapping issue in usage strings.
+
+### 3.5.0
+* Add SourceLink Support.
+
+### 3.4.0
+* Assignment separator parsing bugfix.
+
+### 3.3.0
+* Support CoreCLR.
+
+### 3.2.0
+* Add `hideSyntax` option in PrintUsage() method.
+
+### 3.1.0
+* Add support for MainCommand attribute.
+
+### 3.0.1
+* Bugfix usage string rendering issue where description might span multiple lines.
+
+### 3.0.0
+* Add subcommand support.
+* Add support for list and option parameters.
+* Add support for grouped switches.
+* Extend EqualsAssignment attribute for parameters of arity 2.
+* Implement UniqueAttribute and ExactlyOnceAttribute.
+* Implement HelpFlagsAttribute, HelpDescriptionAttribute and DisableHelpAttribute.
+* Implement GatherUnrecognizedAttribute.
+* Add ParseResult.UnrecognizedCliParams property.
+* Add support for F# unions used as enumeration parameters.
+
+### 2.1.0
+* AltCommandLineAttribute supporting variadic parameters.
+
+### 2.0.0
+* Move to fsprojects, rename root namespace.
+
+### 1.1.3
+* Fixes to error message formatting.
+
+### 1.1.2
+* Bugfix #40.
+
+### 1.1.1
+* Support slashes in command line parameter names.
+
+### 1.1.0
+* Implement parseResult.Iter methods.
+
+### 1.0.0
+* Rename project to Argu.
+* Move back to F# 3.0 runtime by default.
+
+### 0.9.0
+* Move to F# 3.1 runtime.
+
+### 0.8.7
+* Fix CLI parser bug.
+
+### 0.8.6
+* Allow inclusion of '--help' parameters before arguments marked with FirstAttribute.
+
+### 0.8.5
+* Add support for parameterized CLI prefixes in auto-generated parameter names. Minor fixes.
+
+### 0.8.4
+* Add support for CLI syntax printing.
+
+### 0.8.3
+* Add checks for conflicting parameter identifiers.
+
+### 0.8.2
+* Fix package issue.
+
+### 0.8.1
+* Fix reflection bug.
+
+### 0.8.0
+* Add support for ignored parameters.
+* Add support for '--param=argument' CLI syntax.
+* Update ParseSource API.
+* Fix BASE64 encoding issue.
+
+### 0.7.1
+* Replace ArgParser public constructor with factory method.
+
+### 0.7.0
+* Add support for Base64 binary parsing.
+
+### 0.6.6
+* Fix packaging issue.
+
+### 0.6.5
+* Add support for F# 3.1 DU labels.
+
+### 0.6.4
+* Add support for .NET 3.5
+
+### 0.6.3
+* Fix bug where parsing crashes if no app.config file present.
+
+### 0.6.2
+* Remove BindingFlags parameter from Argu.
+
+### 0.6.1
+* Add support for multiple alternative command line names.
+
+#### 0.6.0
+* Update root namespace to Nessos.Argu
+* Add support for application configuration in class libraries
+* Change application configuration parsing API.
+
+#### 0.5.9
+* Fix packaging issue.
+
+#### 0.5.8
+* Include optional BindingFlags parameter.
+* Include support for all primitive types.
diff --git a/build.fsx b/build.fsx
index ec751246..54935bb5 100644
--- a/build.fsx
+++ b/build.fsx
@@ -4,6 +4,7 @@
#r "nuget: System.Reactive ,5.0.0"
#r "nuget: Fake.Core.UserInput ,5.23.1"
+#r "nuget: Fake.Core.ReleaseNotes ,5.23.1"
#r "nuget: Fake.Core.Target ,5.23.1"
#r "nuget: Fake.IO.FileSystem ,5.23.1"
#r "nuget: Fake.DotNet.Cli ,5.23.1"
@@ -38,7 +39,6 @@ Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
let gitOwner = "fsprojects"
let gitName = "Argu"
let gitHome = "https://github.com/" + gitOwner
-let version = "6.2.6"
let configuration = Environment.environVarOrDefault "Configuration" "Release"
@@ -48,6 +48,9 @@ let artifacts = __SOURCE_DIRECTORY__ @@ "artifacts"
// The rest of the code is standard F# build script
// --------------------------------------------------------------------------------------
+// Read additional information from the release notes document
+let release = ReleaseNotes.load "RELEASE_NOTES.md"
+
// --------------------------------------------------------------------------------------
// Clean build results & restore NuGet packages
@@ -66,7 +69,7 @@ Target.create "Build" (fun _ ->
MSBuildParams =
{ c.MSBuildParams with
- Properties = [("Version", version)]
+ Properties = [("Version", release.NugetVersion)]
DisableInternalBinLog = true }
}) __SOURCE_DIRECTORY__
@@ -94,6 +97,7 @@ Target.create "RunTests" (fun _ ->
// Build a NuGet package
Target.create "NuGet.Pack" (fun _ ->
+ let releaseNotes = String.toLines release.Notes |> System.Net.WebUtility.HtmlEncode
DotNet.pack (fun pack ->
{ pack with
OutputPath = Some artifacts
@@ -101,7 +105,8 @@ Target.create "NuGet.Pack" (fun _ ->
MSBuildParams =
{ pack.MSBuildParams with
Properties =
- [("Version", version)]
+ [("Version", release.NugetVersion)
+ ("PackageReleaseNotes", releaseNotes)]
DisableInternalBinLog = true }
}) __SOURCE_DIRECTORY__
)
@@ -137,11 +142,11 @@ Target.create "ReleaseGitHub" (fun _ ->
|> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0]
//StageAll ""
- Git.Commit.exec "" (sprintf "Bump version to %s" version)
+ Git.Commit.exec "" (sprintf "Bump version to %s" release.NugetVersion)
Git.Branches.pushBranch "" remote (Git.Information.getBranchName "")
- Git.Branches.tag "" version
- Git.Branches.pushTag "" remote version
+ Git.Branches.tag "" release.NugetVersion
+ Git.Branches.pushTag "" remote release.NugetVersion
let client =
match Environment.GetEnvironmentVariable "GITHUB_TOKEN" with
@@ -160,7 +165,7 @@ Target.create "ReleaseGitHub" (fun _ ->
// release on github
client
- |> GitHub.draftNewRelease gitOwner gitName version false Seq.empty
+ |> GitHub.draftNewRelease gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
|> GitHub.publishDraft
|> Async.RunSynchronously
)