Skip to content

Conversation

@viceroypenguin
Copy link
Contributor

No description provided.

@viceroypenguin viceroypenguin marked this pull request as ready for review November 9, 2022 20:14
@kzu kzu self-requested a review November 9, 2022 21:13
Copy link
Member

@kzu kzu left a comment

Choose a reason for hiding this comment

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

This will still need to account for building against a language that does not support source generators, since the nuget package can be installed by any VS version.

Please consider the information on #101 to make this work for downlevel environments. This commit contains centralized props/targets for that same check, using the newer approach: dd28445

@viceroypenguin
Copy link
Contributor Author

Honestly, this is the only source generator I've seen that even pays attention to that. Looking at a larger list (https://github.com/amis92/csharp-source-generators), I've not found another one that provides this check. There is an inherent assumption that if you're willing to use source generators, you're probably using a recent version of VS, C#, and nuget. F# explicitly denies any support for SG; and most conversation re: VB is about moving to C# where support is better.

@kzu
Copy link
Member

kzu commented Nov 10, 2022

Still, the fact that the package uses "source generators" might not be entirely obvious to someone just scanning nuget.org for useful packages. They might miss it while reading samples from the readme. It's a little bit of extra work, but ensures users don't end up broken and wondering why (yeah, even if it's their fault :))

@kzu
Copy link
Member

kzu commented Nov 15, 2022

He, funny. Reviewing why the PR #134 is failing, I got a source generators error from Polysharp that shields from precisely the situation I was trying to prevent from this PR, he: https://github.com/Sergio0694/PolySharp/blob/main/src/PolySharp.SourceGenerators/PolySharp.targets

That's a concrete example of why shielding from user error is empowering. I knew what I had to do. Just update! (or stop using Polysharp... )

@viceroypenguin viceroypenguin closed this by deleting the head repository Nov 30, 2022
@devlooped devlooped locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants