Skip to content

Make sure we don't duplicate Orleans-generated code#154

Merged
kzu merged 1 commit intomainfrom
dev/OrleansGeneratorFix
Nov 9, 2025
Merged

Make sure we don't duplicate Orleans-generated code#154
kzu merged 1 commit intomainfrom
dev/OrleansGeneratorFix

Conversation

@kzu
Copy link
Member

@kzu kzu commented Nov 9, 2025

Since we include the Orleans.CodeGenerator.dll as part of our analyzers, the original source generator there was also being exposed through our assembly, causing Roslyn to invoke essentially the same generator twice. This resulted in duplicate code that made our project unusable.

To avoid this duplication, we ILMerge the Orleans assembly but at the same time remove the generator from it (using Cecil and a simple dotnet file app).

@kzu kzu added the bug Something isn't working label Nov 9, 2025
@kzu kzu enabled auto-merge (rebase) November 9, 2025 00:07
@kzu kzu force-pushed the dev/OrleansGeneratorFix branch 4 times, most recently from 4c4fbd0 to 67b456d Compare November 9, 2025 00:47
Since we include the Orleans.CodeGenerator.dll as part of our analyzers, the original source generator there was also being exposed through our assembly, causing Roslyn to invoke essentially the same generator twice. This resulted in duplicate code that made our project unusable.

To avoid this duplication, we ILMerge the Orleans assembly but at the same time remove the generator from it (using Cecil and a simple dotnet file app).
@kzu kzu force-pushed the dev/OrleansGeneratorFix branch from 67b456d to 9babec2 Compare November 9, 2025 00:53
@kzu
Copy link
Member Author

kzu commented Nov 9, 2025

14 passed 14 passed
14 passed 14 passed
14 passed 14 passed

🧪 Details on Ubuntu 24.04.3 LTS
🧪 Details on macOS Unix 15.7.1
🧪 Details on Microsoft Windows 10.0.26100

from dotnet-retest v1.0.0 on .NET 9.0.10 with 💜 by @devlooped

@kzu kzu merged commit d1cf32a into main Nov 9, 2025
11 checks passed
@kzu kzu deleted the dev/OrleansGeneratorFix branch November 9, 2025 00:58
@devlooped devlooped locked and limited conversation to collaborators Dec 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant