Search Issue Tracker
Fixed
Fixed in 2022.2.20f1, 2023.1.0b17, 2023.2.0a16
Votes
5
Found in
2022.2.15f1
2023.1.0b12
2023.2.0a10
Issue ID
UUM-32852
Regression
Yes
Scripts are seen by Roslyn analyzer despite limiting the scope of analyzers
How to reproduce:
1. Open the project “RoslynAnalyzer2022ProblemExample.zip“
2. Observe the errors in the Console
Expected result: There are no errors
Actual result: There are errors regarding Unity.SourceGenerators
Reproducible with: 2022.2.0a12, 2022.2.15f1, 2023.1.0b12, 2023.2.0a10
Not Reproducible with: 2020.3.47f1, 2021.3.22f1, 2022.2.0a11
Reproducible on: Windows 10, Linux 6.1.7-arch1-1.1
Workaround: Put scripts in a different package (without the Roslyn analyzer).
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Keywords on Material Variants aren't automatically saved when changed on original Material through Shader Graph
- Light Probes get baked when calling LightProbes.Tetrahedralize
- Shadows flicker and cause visual artifacts when modifying a GameObject's bounds using Swizzle (Y Mask) and Sine Time nodes
- [WebGL] Frame rate drops by 5-20 fps when moving cursor or touch input in the Player
- Light bleeds when using box shaped spotlight with specific Emission Range values
Tallek
May 22, 2023 13:52
I'm not sure this has been completely fixed yet. We have a project in 2021 that made use of some Roslyn analyzers and everything was working fine. After upgrading to 2022.18/19, Unity was hanging during compilation. Checking the editor log, it was full of thousands of warnings from these analyzers (deleting the analyzers would fix it).
After upgrading to 2022.2.20 (labeled as fixed above), the hang went away, as did the warnings in the log, however compilation would take a very long time. One particular assembly was taking 3.5 minutes to finish compiling whereas it was taking a couple seconds before. If I update our StyleCop analyzer ruleset to disable all rules, compilation returns to its normal 2 second time.
This seems to imply that the analyzers are still running for generated code.