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

rename source generator anchor to SetHandler #1411

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

jonsequitur
Copy link
Contributor

image
image

@jonsequitur jonsequitur requested a review from Keboo September 16, 2021 22:38
@ScottArbeit
Copy link

If I'm using System.CommandLine from F#, and it starts using Source Generators, which requires Roslyn... I think that's a problem? I don't invoke Roslyn as part of my compilation.

If this change precludes using System.CommandLine from F#, or somehow forks the syntax so there's one way to use it with C#, and another way to use it with F#, I do not approve this PR. 😜👎🏼

@ScottArbeit
Copy link

Straight from Don Syme, in the F# Language issue Support Source Generators:

For the foreseeable future that story will be "add a C# project and generate the source there".

So... I'd argue to postpone this change until and unless there's a way to make it work smoothly in F#.

@Keboo
Copy link
Member

Keboo commented Sep 16, 2021

@ScottArbeit to be clear this is merely one means of creating a command handler in this library. All of the previous APIs are still in place and will continue to function. This is simply being added as an experiment in leveraging source generators to make creating handlers in C# easier.

@jonsequitur
Copy link
Contributor Author

@ScottArbeit I had a conversation with @TIHan about this exact thing today and it's definitely something we'd like to solve. Currently the anchor method is an inviting dead end for non-C# users so clearly not ready for a non-beta release.

@ScottArbeit
Copy link

@Keboo @jonsequitur thank you for the confirmation.

And, yeah, sigh. I don't want to get in the way of taking advantage of Source Generators, it's an awesome new feature in C# and worth exploring here. And I also shift uncomfortably in my seat bifurcating things between C# and F#, but I understand leaning towards C# usage.

Would an F#-focused documentation/usage page be useful? I'm already using it from F#, so I have code to draw examples from... that could be a home for calling out this difference.

@jonsequitur jonsequitur force-pushed the source-generator-API-update branch from ada3493 to 1b174e1 Compare September 17, 2021 00:58
@jonsequitur
Copy link
Contributor Author

We'd love to see some F# examples, and yeah, we'll have F# documentation.

@jonsequitur jonsequitur merged commit 313d87d into dotnet:main Sep 17, 2021
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.

3 participants