Skip to content

GH4278: Update Spectre.Console to 0.49.1 - #4279

Merged
devlead merged 5 commits into
cake-build:developfrom
devlead:feature/gh-4278
Sep 26, 2024
Merged

GH4278: Update Spectre.Console to 0.49.1#4279
devlead merged 5 commits into
cake-build:developfrom
devlead:feature/gh-4278

Conversation

@devlead

@devlead devlead commented Nov 24, 2023

Copy link
Copy Markdown
Member

@devlead
devlead enabled auto-merge November 24, 2023 15:14
@devlead
devlead disabled auto-merge November 24, 2023 16:21
@devlead

devlead commented Nov 24, 2023

Copy link
Copy Markdown
Member Author

It would seem Spectre.Console 0.48.0 has a breaking change with settings like

[CommandOption("--version|--ver")]
[Description("Displays version information.")]
public bool ShowVersion { get; set; }

This test fails

[Theory]
[InlineData("--version")]
[InlineData("--ver")]
public async Task The_Version_Option_Should_Call_Version_Feature(params string[] args)

only the last --ver works.

image

not investigated the root cause fully.

@devlead

devlead commented Nov 24, 2023

Copy link
Copy Markdown
Member Author

Found the issue Spectre.Console.Cli no longer allows default commands to have a --version parameter, which Cake relied on to have it's own custom version command.

spectreconsole/spectre.console@131b37f#diff-d38c9fa48d9c39f8eec58957b2333d13943f2cbe1adee26f30325e527a56f600L26-R41

Will see if I can find away around that, can't use the default Spectre version command as it will produce a version string that will break Cake cli contract. Overriding command settings ApplicationVersion and removing cake version feature should probably achieve the same result for end user.

@devlead

devlead commented Nov 24, 2023

Copy link
Copy Markdown
Member Author

As it's by design breaking change in Spectre.Console.Cli, I just added a workaround to opt-out of this behavior for Cake.Tool.

@devlead
devlead enabled auto-merge November 24, 2023 20:19
@devlead
devlead disabled auto-merge November 24, 2023 20:21
Comment thread src/Cake/Program.cs Outdated
@devlead
devlead marked this pull request as draft November 24, 2023 20:35
@devlead devlead changed the title GH4278: Update Spectre.Console to 0.48.0 GH4278: Update Spectre.Console to 0.49.1 Sep 25, 2024
@devlead

devlead commented Sep 25, 2024

Copy link
Copy Markdown
Member Author

The breaking --version change was revered in Spectre.Console 0.49.1

@devlead

devlead commented Sep 25, 2024

Copy link
Copy Markdown
Member Author

Ah would seem remaining arguments has changed in Specre.Console.Cli will investigate, PR still WIP.

@devlead
devlead marked this pull request as ready for review September 26, 2024 14:35
@devlead
devlead enabled auto-merge September 26, 2024 14:35
@devlead

devlead commented Sep 26, 2024

Copy link
Copy Markdown
Member Author

@cake-build/cake-team this should be ready for review now.

@patriksvensson patriksvensson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@devlead
devlead merged commit 9b171c0 into cake-build:develop Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Spectre.Console to 0.49.1

2 participants