Skip to content

Fix source generator, don't generate when abstract/interface is not union#2103

Merged
neuecc merged 4 commits intomasterfrom
fix-issue2101
Dec 25, 2024
Merged

Fix source generator, don't generate when abstract/interface is not union#2103
neuecc merged 4 commits intomasterfrom
fix-issue2101

Conversation

@neuecc
Copy link
Member

@neuecc neuecc commented Dec 23, 2024

fix #2101

The generation of incorrect source code is interfering with other operations.
Originally, the v2 dynamic generation wasn't generating formatters,
and v3 is also reporting validation issues.

By the way, IsGeneratingSource seems like a bad approach.
Moreover, the Analyzer isn't responding in the development environment - is it actually working...?

Also, while this should be in a separate PR, when SuppressSourceGeneration is enabled, it seems better to terminate the type search.

@neuecc
Copy link
Member Author

neuecc commented Dec 23, 2024

Since the Analyzer only enters the analysis path when in the IsGeneratingSource state, it cannot recognize this error.
Therefore, it will not be reported as an error.
There are likely similar issues in other places as well.
This should be fixed.

@neuecc neuecc merged commit 5222bc2 into master Dec 25, 2024
3 checks passed
@neuecc neuecc deleted the fix-issue2101 branch December 25, 2024 01:08
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.1.0 has broken TypelessObjectResolver

1 participant