-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Labels
bugclosed-staleThis issue is closed because it went stale and there was no action planned. It can be reopened.This issue is closed because it went stale and there was no action planned. It can be reopened.help wantedWe would be willing to take a well-written PR to help fix this.We would be willing to take a well-written PR to help fix this.stale
Description
Describe the bug
- Somewhere between 2.4.4 and 2.5.0 something changed that breaks inheritance with the options.
- Getting
System.InvalidOperationException : Ambiguous option name. Both Shinydocs.CognitiveToolkit.Tests.UI.CommandLine.Commands.BaseCommand.Test and Shinydocs.CognitiveToolkit.Tests.UI.CommandLine.Commands.DerivedCommand.Test produce a CommandOption with the name 't'.
- Suspected change .. Add support for private base type options #288
To Reproduce
Steps to reproduce the behavior:
- Set up Classes
public abstract class BaseCommand
{
[Option(Description = "Example (Required)")]
[Required]
public string? Test { get; set; }
}
[Command(Name = "CognitiveToolkit Test")]
public class DerivedCommand : BaseCommand
{
[Option(Description = "I actually want this description (Required)")]
[Required]
public new string? Test { get; set; }
}
- Run cli.Conventions.UseDefaultConventions();
Expected behavior
I get the description of the derived class (like it was in 2.4.4
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugclosed-staleThis issue is closed because it went stale and there was no action planned. It can be reopened.This issue is closed because it went stale and there was no action planned. It can be reopened.help wantedWe would be willing to take a well-written PR to help fix this.We would be willing to take a well-written PR to help fix this.stale