Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH2333: Rewrite Cake CLI (RFC-0001) #2334

Merged
merged 1 commit into from Jul 26, 2020
Merged

GH2333: Rewrite Cake CLI (RFC-0001) #2334

merged 1 commit into from Jul 26, 2020

Conversation

patriksvensson
Copy link
Member

@patriksvensson patriksvensson commented Oct 18, 2018

RFC: 0001

Notes

I'm putting the code temporarily in it's own project (Cake.Client) to avoid merge conflicts. Before merging, this project should replace the Cake project.

Progress

Aliases

  • IEnumerable<T> Arguments<T>(string name)

Features

  • Compilation
  • Debugging
  • Bootstrapping
  • Dry run
  • Tree
  • Descriptions
  • Version
  • Info

Other

  • Module loading
  • Multiple arguments with the same name

src/Cake/Cake.csproj Show resolved Hide resolved
src/Cake/Features/CakeFeature.cs Outdated Show resolved Hide resolved
src/Cake/Infrastructure/ContainerBootstrapper.cs Outdated Show resolved Hide resolved
src/Cake/Infrastructure/Diagnostics/CakeDebugger.cs Outdated Show resolved Hide resolved
src/Cake.Core/CakeArguments.cs Show resolved Hide resolved
src/Cake.Core/Graph/CakeGraph.cs Outdated Show resolved Hide resolved
src/Cake.Core/ICakeArguments.cs Outdated Show resolved Hide resolved
src/Cake.Core/Properties/AssemblyInfo.cs Outdated Show resolved Hide resolved
src/Cake.Core/Properties/AssemblyInfo.cs Show resolved Hide resolved
@patriksvensson
Copy link
Member Author

@cake-build/cake-team Anyone want to take a look at this?

build.cake Outdated Show resolved Hide resolved
build.cake Outdated Show resolved Hide resolved
src/Cake.Core/Scripting/ScriptRunner.cs Show resolved Hide resolved
@patriksvensson
Copy link
Member Author

@cake-build/cake-team Fixed stuff, squashed commits and rebased against develop. Could you guys take a look?

src/Cake.Common/ArgumentAliases.cs Outdated Show resolved Hide resolved
src/Cake.Common/ArgumentAliases.cs Outdated Show resolved Hide resolved
@devlead
Copy link
Member

devlead commented Jun 29, 2020

@cake-build/cake-team I've rebased this one against latest develop and fixed a few stylecop issues and merge conflicts with package references.
It should be ready for review now.

@devlead devlead requested a review from a team June 30, 2020 06:33
@ecampidoglio
Copy link
Member

The original RFC proposed the introduction of verbs to trigger certain behaviors. For example:

cake bootstrap

instead of

cake --bootstrap

Has this idea been dropped? It doesn't seem to be part of this PR.

@gep13
Copy link
Member

gep13 commented Jun 30, 2020

@ecampidoglio my understanding was that with this rewrite, there would now be an implicit bootstrapping performed, without the need to trigger anything. I haven't had a chance to take this for a spin yet though.

@ecampidoglio
Copy link
Member

@gep13 Nice. That would mean we can remove the bootstrap option from the cake-action at some point.

Regarding the verbs, the RFC described the introduction of a build command, similar to dotnet build:

It would make it easier to use Cake if we introduced proper commands and subcommands like most people are used to from applications such as git and dotnet. Of course we would need to be backwards compatible with how Cake works today (without commands and sub commands) but this functionality could be phased out before a 1.0 release of Cake. The build command should however be the default command.

However, I couldn't find any traces of this in the PR. Has the idea been scrapped or postponed?

@gep13
Copy link
Member

gep13 commented Jun 30, 2020

@ecampidoglio hmm, not sure on that. That would be a question for @patriksvensson

@patriksvensson
Copy link
Member Author

patriksvensson commented Jun 30, 2020

@ecampidoglio You're absolutely right. I haven't added it since we haven't had a proper discussion about what commands we should expose from the root.

I'll write up a proposal later today!

@devlead
Copy link
Member

devlead commented Jul 1, 2020

@cake-build/cake-team I've rebased this one against latest develop.
Please review.

@patriksvensson patriksvensson marked this pull request as draft July 6, 2020 10:25
@patriksvensson patriksvensson marked this pull request as ready for review July 18, 2020 12:35
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

Just a few small comments/suggestions.

src/Cake/Program.cs Outdated Show resolved Hide resolved
src/Cake/Features/Introspection/VersionFeature.cs Outdated Show resolved Hide resolved
src/Cake/Features/Introspection/VersionResolver.cs Outdated Show resolved Hide resolved
src/Cake/Infrastructure/Composition/AutofacTypeResolver.cs Outdated Show resolved Hide resolved
src/Cake.Tests/Fakes/FakeDebugger.cs Show resolved Hide resolved
src/Cake.Core/Diagnostics/ICakeDebugger.cs Show resolved Hide resolved
src/Cake.Core/Diagnostics/CakeDebugger.cs Show resolved Hide resolved
src/Cake.Core/CakeArguments.cs Show resolved Hide resolved
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13 gep13 merged commit 142cd24 into cake-build:develop Jul 26, 2020
@gep13
Copy link
Member

gep13 commented Jul 26, 2020

@patriksvensson your changes have been merged, thanks for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC-0001: Rewrite Cake CLI
6 participants