MessagePack-CSharp / MessagePack-CSharp/MessagePack-CSharp
Analyzer try report diagnostics MsgPack003 on codes that are not from current assembly, and then crash with code AD0001
- Dominant language
- C#
- Stars
- 6.8k
- Forks
- 775
- Avg merge
- 3h 26m
- Merged PRs (30d)
- 6
Description
#### Bug description
If you have an object with [MessagePackObject], and it contains a member without it, the analyzer will report a MsgPack003. Then if that member's type is from another assembly in source code form, it will crash.
#### Repro steps
Open the mrp project I attached, turn on global analysis, and you will see the warning.
Is confirmed with vs and vsc on windows. Not sure about rider and on other os.
#### Expected behavior
No AD0001 warning.
#### Actual behavior
AD0001, which is actually a analyzer crash.
- Version used: MessagePack 3.1.3 from nuget
- Runtime: Net9.0
#### Additional context

[Mrp_MessagePackAnalyzerBug.zip](https://github.com/user-attachments/files/20557228/Mrp_MessagePackAnalyzerBug.zip)
Contributor guide
Research direction
Start with the attached Mrp_MessagePackAnalyzerBug.zip and reproduce the analyzer behavior with MessagePack 3.1.3 on .NET 9.0, using Visual Studio or VS Code with global analysis enabled. Trace the diagnostic path for a member whose type comes from another source assembly; done means the repro no longer produces the AD0001 analyzer crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100