Skip to content

Move command handler generator anchor into its own assembly - #1491

Merged
jonsequitur merged 3 commits into
dotnet:mainfrom
Keboo:separateGenerator
Nov 30, 2021
Merged

jonsequitur merged 3 commits into
dotnet:mainfrom
Keboo:separateGenerator

Conversation

@Keboo

@Keboo Keboo commented Nov 30, 2021

Copy link
Copy Markdown
Member

This separates out the generator's anchor into its own assembly so that we don't clutter up the main project with generator specific code.

@jonsequitur
jonsequitur merged commit 804c6e3 into dotnet:main Nov 30, 2021
@jkotas

jkotas commented Nov 30, 2021

Copy link
Copy Markdown
Member

Does this mean that you will get an extra tiny assembly in the output if one uses source generators? I think that it is unfortunate.

I think we should aim for the System.CommandLine + source generator to be the lean and mean path that we recommend for best performance. Adding a small extra assembly to enable source generators is working against that.

cc @adamsitnik

@Keboo
Keboo deleted the separateGenerator branch November 30, 2021 23:46
@Keboo

Keboo commented Nov 30, 2021

Copy link
Copy Markdown
Member Author

@jkotas that is correct, at least at present. The idea is we want to make sure this is in fact the right source generator before baking it into the main library. There are some other approaches that also leverage source generators in a similar fasion to make building out your Parser and handlers easier. Eventually we may land with something in the core library after these approaches have had a little time to be tested out.

Comment thread .vsts-ci.yml
enablePublishBuildAssets: true
enableTelemetry: true
enableSourceBuild: true
enableSourceBuild: false

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.

Why was source-build disabled? This has caused ripple effects - dotnet/installer#12757 (comment)

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.

4 participants