Skip to content

Commit 3088fd2

Browse files
committed
Create issue for build failure due to 'SymbolDisplay' not existing
1 parent 0ec123a commit 3088fd2

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
Title: Build failure: SymbolDisplay does not exist in DecoratorGenerator.cs
3+
Body: ## Description
4+
The CI build is failing with a compilation error in `DecoratorGenerator.cs` at line 663.
5+
6+
## Error Details
7+
```
8+
error CS0103: The name 'SymbolDisplay' does not exist in the current context
9+
[/home/runner/work/PatternKit/PatternKit/src/PatternKit.Generators/PatternKit.Generators.csproj]
10+
```
11+
12+
**Location**: `src/PatternKit.Generators/DecoratorGenerator.cs(663,16)`
13+
14+
**Failed Job**: https://github.com/JerrettDavis/PatternKit/actions/runs/21299756617/job/61314298472
15+
16+
**Commit**: 0ec123a9a7f8d661acb920bbe8b89e49e1c9d399
17+
18+
## Root Cause
19+
The `SymbolDisplay` class is being used on line 663, but it appears the project may be missing the appropriate reference to the Roslyn package that provides this class, or there's an issue with the package reference configuration.
20+
21+
## Code Reference
22+
```csharp
23+
// Line 663 in DecoratorGenerator.cs
24+
return SymbolDisplay.FormatPrimitive(param.ExplicitDefaultValue, quoteStrings: true, useHexadecimalNumbers: false);
25+
```
26+
27+
While `using Microsoft.CodeAnalysis;` is present at the top of the file, the `SymbolDisplay` class may not be available in the current compilation context.
28+
29+
## Suggested Solution
30+
Verify that the `PatternKit.Generators.csproj` file includes the appropriate package reference:
31+
32+
```xml
33+
<ItemGroup>
34+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" PrivateAssets="all" />
35+
</ItemGroup>
36+
```
37+
38+
Ensure the version is compatible with the target framework and other dependencies in the project.
39+
40+
## Additional Context
41+
- This is preventing the build from completing successfully
42+
- The error appeared during the pack step of the CI workflow
43+
- Three warnings also present but not blocking (CS0436, RS1032)

0 commit comments

Comments
 (0)