Skip to content

Fix invalid **.cs glob breaking incremental builds#123

Merged
dogboydog merged 1 commit into
YarnSpinnerTool:developfrom
spirifoxy:fix/sg-glob
May 19, 2026
Merged

Fix invalid **.cs glob breaking incremental builds#123
dogboydog merged 1 commit into
YarnSpinnerTool:developfrom
spirifoxy:fix/sg-glob

Conversation

@spirifoxy
Copy link
Copy Markdown
Contributor

*.cs covers all sources since they all live in the project root. Also drops the explicit Analyser.cs entry that was producing CS2002.

**.cs is treated as a literal filename, so the Compile item resolves to a nonexistent path and FastUpToDateCheck reruns CoreCompile every build. csc.exe expands the pattern heuristically, so builds still work, but the analyzer dll's mtime advances each time and cascades into a full rebuild in consumers

Running dotnet build twice, before:
❯ dotnet build
Restore complete (0.5s)
  YarnSpinnerGodotSourceGenerator succeeded with 1 warning(s) (0.4s) → addons/YarnSpinner-Godot/SourceGenerator/bin/Debug/netstandard2.0/YarnSpinnerGodot.SourceCodeGenerator.dll
    CSC : warning CS2002: Source file '/Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/SourceGenerator/Analyser.cs' specified multiple times
  YarnSpinner-Godot succeeded with 3 warning(s) (2.3s) → .godot/mono/temp/bin/Debug/YarnSpinner-Godot.dll
    /Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/Runtime/YarnJSONContext.cs(19,22): warning SYSLIB1220: The 'JsonConverterAttribute' type 'Yarn.Compiler.StringOrListOfStringsConverter' specified on member 'Yarn.Compiler.Project.Definitions' is not a converter type or does not contain an accessible parameterless constructor. (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1220)
    /Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/Runtime/Async/DialoguePresenterBase.cs(84,27): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
    /usr/local/share/dotnet/sdk/9.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(323,5): warning NETSDK1206: Found version-specific or distribution-specific runtime identifier(s): alpine-arm, alpine-arm64, alpine-x64. Affected libraries: SQLitePCLRaw.lib.e_sqlite3. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details.

Build succeeded with 4 warning(s) in 3.4s
❯ dotnet build
Restore complete (0.4s)
  YarnSpinnerGodotSourceGenerator succeeded with 1 warning(s) (0.3s) → addons/YarnSpinner-Godot/SourceGenerator/bin/Debug/netstandard2.0/YarnSpinnerGodot.SourceCodeGenerator.dll
    CSC : warning CS2002: Source file '/Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/SourceGenerator/Analyser.cs' specified multiple times
  YarnSpinner-Godot succeeded with 2 warning(s) (1.5s) → .godot/mono/temp/bin/Debug/YarnSpinner-Godot.dll
    /Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/Runtime/YarnJSONContext.cs(19,22): warning SYSLIB1220: The 'JsonConverterAttribute' type 'Yarn.Compiler.StringOrListOfStringsConverter' specified on member 'Yarn.Compiler.Project.Definitions' is not a converter type or does not contain an accessible parameterless constructor. (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1220)
    /Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/Runtime/Async/DialoguePresenterBase.cs(84,27): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Build succeeded with 3 warning(s) in 2.4s
After:
❯ dotnet build
Restore complete (0.4s)
  YarnSpinnerGodotSourceGenerator succeeded (0.3s) → addons/YarnSpinner-Godot/SourceGenerator/bin/Debug/netstandard2.0/YarnSpinnerGodot.SourceCodeGenerator.dll
  YarnSpinner-Godot succeeded with 2 warning(s) (2.8s) → .godot/mono/temp/bin/Debug/YarnSpinner-Godot.dll
    /Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/Runtime/YarnJSONContext.cs(19,22): warning SYSLIB1220: The 'JsonConverterAttribute' type 'Yarn.Compiler.StringOrListOfStringsConverter' specified on member 'Yarn.Compiler.Project.Definitions' is not a converter type or does not contain an accessible parameterless constructor. (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1220)
    /Work/YarnSpinner-Godot/addons/YarnSpinner-Godot/Runtime/Async/DialoguePresenterBase.cs(84,27): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Build succeeded with 2 warning(s) in 3.8s
❯ dotnet build
Restore complete (0.4s)
  YarnSpinnerGodotSourceGenerator succeeded (0.1s) → addons/YarnSpinner-Godot/SourceGenerator/bin/Debug/netstandard2.0/YarnSpinnerGodot.SourceCodeGenerator.dll
  YarnSpinner-Godot succeeded (0.1s) → .godot/mono/temp/bin/Debug/YarnSpinner-Godot.dll

Build succeeded in 0.8s

@dogboydog
Copy link
Copy Markdown
Collaborator

Wow thanks for the background and writeup here. I did not realize the issue. This will be in the next release with credit to @spirifoxy :)

@dogboydog dogboydog merged commit 838df19 into YarnSpinnerTool:develop May 19, 2026
4 checks passed
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.

2 participants