diff --git a/CHANGELOG.md b/CHANGELOG.md
index eea8ad12..e7fc8a07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file.
CommandLineParser project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2.9.3-unixwiz]
+
+###
+- Updated frameworks, went from "netstandard2.0;net40;net45;net461" to "net8.0".
+- Deleted LangVersion = 8.0 (way too old)
+
+## [2.9.2-unixwiz]
+
+###
+- First Unixwiz private build
+- Ensured that OptionAttribute and ValueAttribute classes are not sealed.
+- Started mucking w/ the package version stuff
+
## [2.9.0-preview2]
### Added
diff --git a/README.md b/README.md
index 79a16fa7..1096772d 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,19 @@
[](https://www.nuget.org/packages/CommandLineParser/)
[](https://gitter.im/gsscoder/commandline?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+# Unixwiz.net update
+
+This is a private, independently-maintained fork of the excellent CommandLineParser package
+for modern .NET applications, and has dropped support for anything but recent .NET versions.
+We have an application that required a change - un-sealing the "OptionValue" and "ValueAttribute"
+classes - and needed to share this with a small circle of customers.
+
+Sorry, FSharp and .netstandard support has been removed. The docs below will be edited at some
+point to ensure that this README.md is not lying.
+
+Do not enable `GeneratePackageOnBuild` - it interferes with expected behavior of `dotnet pack -c Release`
+after a clean build and caused missing-output packaging failures.
+
# Command Line Parser Library for CLR and NetStandard
**Note:** the API surface has changed since v1.9.x and earlier. If you are looking for documentation on v1.9.x, please see [stable-1.9.71.2](https://github.com/gsscoder/commandline/tree/stable-1.9.71.2)
diff --git a/src/CommandLine/CommandLine.csproj b/src/CommandLine/CommandLine.csproj
index 04496eb8..2ed95f69 100644
--- a/src/CommandLine/CommandLine.csproj
+++ b/src/CommandLine/CommandLine.csproj
@@ -3,30 +3,30 @@
CommandLine
Library
- netstandard2.0;net40;net45;net461
+ net8.0
$(DefineConstants);CSX_EITHER_INTERNAL;CSX_REM_EITHER_BEYOND_2;CSX_ENUM_INTERNAL;ERRH_INTERNAL;CSX_MAYBE_INTERNAL;CSX_REM_EITHER_FUNC;CSX_REM_CRYPTORAND;ERRH_ADD_MAYBE_METHODS
$(DefineConstants);SKIP_FSHARP
true
..\..\CommandLine.snk
true
- CommandLineParser
- CommandLineParser.FSharp
- gsscoder;nemec;ericnewton76;moh-hassan
- Command Line Parser Library
+ Unixwiz.CommandLineParser
+ Unixwiz.CommandLineParser.FSharp
+ gsscoder;nemec;ericnewton76;moh-hassan;SJFriedl
+ Command Line Parser Library - Unixwiz.net fork
$(VersionSuffix)
- 0.0.0
+ 2.9.3-unixwiz
Terse syntax C# command line parser for .NET. For FSharp support see CommandLineParser.FSharp. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.
Terse syntax C# command line parser for .NET with F# support. The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks.
Copyright (c) 2005 - 2020 Giacomo Stelluti Scala & Contributors
License.md
CommandLine20.png
- https://github.com/commandlineparser/commandline
+ https://github.com/SJFriedl/commandline
command line;commandline;argument;option;parser;parsing;library;syntax;shell
- https://github.com/commandlineparser/commandline/blob/master/CHANGELOG.md
- true
- 8.0
+ https://github.com/SJFriedl/commandline/blob/master/CHANGELOG.md
+ False
true
snupkg
+ Unixwiz.CommandLineParser
diff --git a/src/CommandLine/Core/TokenPartitioner.cs b/src/CommandLine/Core/TokenPartitioner.cs
index 4dc25f7f..98032abb 100644
--- a/src/CommandLine/Core/TokenPartitioner.cs
+++ b/src/CommandLine/Core/TokenPartitioner.cs
@@ -15,7 +15,7 @@ Tuple>>, IEnumerable tokens,
Func> typeLookup)
{
- IEqualityComparer tokenComparer = ReferenceEqualityComparer.Default;
+ IEqualityComparer tokenComparer = CommandLine.Infrastructure.ReferenceEqualityComparer.Default;
var tokenList = tokens.Memoize();
var partitioned = PartitionTokensByType(tokenList, typeLookup);
diff --git a/src/CommandLine/OptionAttribute.cs b/src/CommandLine/OptionAttribute.cs
index 6ae51dac..2727b5a8 100644
--- a/src/CommandLine/OptionAttribute.cs
+++ b/src/CommandLine/OptionAttribute.cs
@@ -10,7 +10,7 @@ namespace CommandLine
/// Models an option specification.
///
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
- public sealed class OptionAttribute : BaseAttribute
+ public class OptionAttribute : BaseAttribute
{
private readonly string longName;
private readonly string shortName;
diff --git a/src/CommandLine/ValueAttribute.cs b/src/CommandLine/ValueAttribute.cs
index ba2c0ef9..1c1a2ea4 100644
--- a/src/CommandLine/ValueAttribute.cs
+++ b/src/CommandLine/ValueAttribute.cs
@@ -5,10 +5,10 @@
namespace CommandLine
{
///
- /// Models an value specification, or better how to handle values not bound to options.
+ /// Models a value specification, or better how to handle values not bound to options.
///
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
- public sealed class ValueAttribute : BaseAttribute
+ public /*sealed*/ class ValueAttribute : BaseAttribute
{
private readonly int index;
private string metaName;
@@ -42,4 +42,4 @@ public string MetaName
}
}
}
-}
\ No newline at end of file
+}
diff --git a/tests/CommandLine.Tests/CommandLine.Tests.csproj b/tests/CommandLine.Tests/CommandLine.Tests.csproj
index d4dbcab0..24ca77b5 100644
--- a/tests/CommandLine.Tests/CommandLine.Tests.csproj
+++ b/tests/CommandLine.Tests/CommandLine.Tests.csproj
@@ -2,7 +2,7 @@
Library
- net461;netcoreapp3.1
+ net8.0
$(DefineConstants);SKIP_FSHARP
..\..\CommandLine.snk
true
diff --git a/tests/CommandLine.Tests/Unit/Core/GetoptTokenizerTests.cs b/tests/CommandLine.Tests/Unit/Core/GetoptTokenizerTests.cs
index 337a9a3f..1349d624 100644
--- a/tests/CommandLine.Tests/Unit/Core/GetoptTokenizerTests.cs
+++ b/tests/CommandLine.Tests/Unit/Core/GetoptTokenizerTests.cs
@@ -22,7 +22,7 @@ public void Explode_scalar_with_separator_in_odd_args_input_returns_sequence()
var specs = new[] { new OptionSpecification(string.Empty, "string-seq",
false, string.Empty, Maybe.Nothing(), Maybe.Nothing(), ',', null, string.Empty, string.Empty, new List(), typeof(IEnumerable), TargetType.Sequence, string.Empty)};
- // Exercize system
+ // Exercise system
var result =
GetoptTokenizer.ExplodeOptionList(
Result.Succeed(
@@ -45,7 +45,7 @@ public void Explode_scalar_with_separator_in_even_args_input_returns_sequence()
var specs = new[] { new OptionSpecification(string.Empty, "string-seq",
false, string.Empty, Maybe.Nothing(), Maybe.Nothing(), ',', null, string.Empty, string.Empty, new List(), typeof(IEnumerable), TargetType.Sequence, string.Empty)};
- // Exercize system
+ // Exercise system
var result =
GetoptTokenizer.ExplodeOptionList(
Result.Succeed(
@@ -63,7 +63,7 @@ public void Explode_scalar_with_separator_in_even_args_input_returns_sequence()
[Fact]
public void Should_properly_parse_option_with_equals_in_value()
{
- /**
+ /*
* This is how the arg. would look in `static void Main(string[] args)`
* if passed from the command-line and the option-value wrapped in quotes.
* Ex.) ./app --connectionString="Server=localhost;Data Source..."
@@ -90,7 +90,7 @@ public void Should_return_error_if_option_format_with_equals_is_not_correct()
var errors = result.SuccessMessages();
Assert.NotNull(errors);
- Assert.Equal(1, errors.Count());
+ Assert.Single(errors);
Assert.Equal(ErrorType.BadFormatTokenError, errors.First().Tag);
var tokens = result.SucceededWith();