-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add option to generate specialized partition implementation #15
Conversation
1f978fc
to
fb2c539
Compare
This looks like a useful addition! Extension classI'm a bit unhappy with the separate extension class because it's a new, non-configurable name which lives top level, thus it's totally disconnected from the namespacing of potentially nested unions. The first is easy to fix (doesn't have to be done now as it is easy to add later in a non-breaking manner). The second is a bit trickier. Given the following example: public class A
{
[DiscriminatedUnion(...)]
public abstract record B
{
// ...
}
}
[DiscriminatedUnion(...)]
public abstract record B
{
// ...
} If you enable However, both extension classes are named
|
...eratorTest.GeneratesExpectedSourceCode_sourceFileName=UnionWithPartitionUsage.01.verified.cs
Outdated
Show resolved
Hide resolved
Funcky.DiscriminatedUnion.SourceGeneration/Funcky.DiscriminatedUnion.SourceGeneration.csproj
Outdated
Show resolved
Hide resolved
Funcky.DiscriminatedUnion.SourceGeneration/DiscriminatedUnionGenerator.cs
Outdated
Show resolved
Hide resolved
...rceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=DeeplyNestedUnion.00.verified.cs
Outdated
Show resolved
Hide resolved
...rceGeneratorTest.GeneratesExpectedSourceCode_sourceFileName=DeeplyNestedUnion.01.verified.cs
Show resolved
Hide resolved
d691686
to
3e97880
Compare
Funcky.DiscriminatedUnion.SourceGeneration/Funcky.DiscriminatedUnion.SourceGeneration.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🎉
Do you have permissions to publish the NuGet package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, you forgot to update the docs in the readme :)
9fcf7ca
to
93c1c07
Compare
No description provided.