Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET: Downgrade Microsoft.CodeAnalysis.CSharp to 4.8.0 for compat with SDK 8.0.1xy #100506

Merged

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Dec 17, 2024

And for CI, set up .NET SDK 8.0.100 explicitly to test our min supported version.

Should fail now due to #100502, and we can use it to validate the upcoming fix.

@akien-mga akien-mga added this to the 4.4 milestone Dec 17, 2024
@akien-mga akien-mga force-pushed the dotnet-8.0-fix-GodotSharp-build branch from 1d8ed01 to 0c00dd6 Compare December 17, 2024 11:25
@akien-mga akien-mga changed the title CI: Configure .NET SDK 8.x explicitly CI: Configure .NET SDK 8.0.100 to test min supported version Dec 17, 2024
@akien-mga akien-mga force-pushed the dotnet-8.0-fix-GodotSharp-build branch 3 times, most recently from e1f3a4b to a02ae56 Compare December 17, 2024 13:04
@akien-mga akien-mga force-pushed the dotnet-8.0-fix-GodotSharp-build branch 7 times, most recently from 1d02b04 to 21ca022 Compare December 17, 2024 14:25
@akien-mga
Copy link
Member Author

akien-mga commented Dec 17, 2024

Finally got the CI config to work. I couldn't make global.json work properly, so instead I'm just removing the preinstalled .NET SDKs before installing 8.0.100.

The CI run for 21ca022 properly fails, confirming #100502: https://github.com/godotengine/godot/actions/runs/12375025460/job/34538922837?pr=100506

CSC : warning CS9057: The analyzer assembly '/home/runner/work/godot/godot/modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/bin/Debug/netstandard2.0/Godot.SourceGenerators.Internal.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'. [/home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]
Error: /home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs(7,13): error CS0234: The type or namespace name 'SourceGenerators' does not exist in the namespace 'Godot' (are you missing an assembly reference?) [/home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]
Error: /home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs(18,6): error CS0246: The type or namespace name 'GenerateUnmanagedCallbacksAttribute' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]
Error: /home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs(18,6): error CS0246: The type or namespace name 'GenerateUnmanagedCallbacks' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]
Error: /home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs(185,36): error CS8795: Partial method 'NativeFuncs.godotsharp_variant_new_copy(out godot_variant, scoped in godot_variant)' must have an implementation part because it has accessibility modifiers. [/home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]
Error: /home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs(319,36): error CS8795: Partial method 'NativeFuncs.godotsharp_string_name_new_copy(out godot_string_name, scoped in godot_string_name)' must have an implementation part because it has accessibility modifiers. [/home/runner/work/godot/godot/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj]

...

@akien-mga
Copy link
Member Author

And https://github.com/godotengine/godot/actions/runs/12375157412/job/34539363154 confirms that 5232760 solves the issue.

I'll squash the two commits now so this is ready to merge.

…h SDK 8.0.1xy

And for CI, set up .NET SDK 8.0.100 explicitly to test our min supported version.
@akien-mga akien-mga force-pushed the dotnet-8.0-fix-GodotSharp-build branch from 5232760 to 4047e4b Compare December 17, 2024 14:57
@akien-mga akien-mga changed the title CI: Configure .NET SDK 8.0.100 to test min supported version .NET: Downgrade Microsoft.CodeAnalysis.CSharp to 4.8.0 for compat with SDK 8.0.1xy Dec 17, 2024
@akien-mga akien-mga marked this pull request as ready for review December 17, 2024 14:58
@akien-mga akien-mga requested review from a team as code owners December 17, 2024 14:58
Copy link
Member

@paulloz paulloz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sorry for missing this in the original PR.

@akien-mga akien-mga merged commit f1cf8eb into godotengine:master Dec 17, 2024
20 checks passed
@akien-mga akien-mga deleted the dotnet-8.0-fix-GodotSharp-build branch December 17, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET: Building GodotSharp is broken in current master branch
4 participants