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

Build fails with missing Godot types #12

Open
emmauss opened this issue May 28, 2024 · 3 comments
Open

Build fails with missing Godot types #12

emmauss opened this issue May 28, 2024 · 3 comments

Comments

@emmauss
Copy link

emmauss commented May 28, 2024

Godot version

4.2

Godot .NET packages version

e876acc

System information

Windows 11AMD Ryzen 5 4800H

.NET information

8.0.200

Issue description

On a clean build, the following commands fails with missing Godot Types;
./build.sh --productBuild --pushNupkgsLocal ./nugets

It initially fails with Accessibility Modifiers error;

D:\ryujinx\godot-dotnet\src\Godot.BindingsGenerator\BindingsGenerator\BindingsData.CollectionContext.cs(9,15): error IDE0040: Accessibility modifiers required (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040) [D:\ryujinx\godot-dotnet\src\Godot.BindingsGenerator\Godot.BindingsGenerator.csproj]
D:\ryujinx\godot-dotnet\src\Godot.BindingsGenerator\BindingsGenerator\BindingsData.RegisterKnownTypes.cs(7,15): error IDE0040: Accessibility modifiers required (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040) [D:\ryujinx\godot-dotnet\src\Godot.BindingsGenerator\Godot.BindingsGenerator.csproj]
    0 Warning(s)
    2 Error(s)

On fixing that, it fails with a whole lot of missing godot types. Log is found here, https://pastebin.com/fVhcXeYd .

The build scripts hasn't been modified in any way, and the dotnet version used is the one downloaded by the script.

Steps to reproduce

  1. Do a clean clone of the repo
  2. Run ./build.sh --productBuild --pushNupkgsLocal ./nugets in a bash terminal. (Same thing occurs with powershell or cmd scripts)

Minimal reproduction project

N/A

@raulsntos
Copy link
Owner

Godot version
4.2

This is likely not going to work since we use some GDExtension API introduced in 4.3 (like the Callable API).

It initially fails with Accessibility Modifiers error;

That's just a warning, we are treating warnings as errors by default so it fails compilation. We'll eventually fix these warnings but for now use --warnAsError false.

On fixing that, it fails with a whole lot of missing godot types.

It looks like you didn't run the Godot.BindingsGenerator. You can use /p:GenerateGodotBindings=true so it's run as part of building the Godot.Bindings project. Eventually this will happen automatically, but we need to make the task incremental first.

./build.sh --productBuild --pushNupkgsLocal ./nugets --warnAsError false /p:GenerateGodotBindings=true

@emmauss
Copy link
Author

emmauss commented May 28, 2024

Godot version
4.2

This is likely not going to work since we use some GDExtension API introduced in 4.3 (like the Callable API).

It initially fails with Accessibility Modifiers error;

That's just a warning, we are treating warnings as errors by default so it fails compilation. We'll eventually fix these warnings but for now use --warnAsError false.

On fixing that, it fails with a whole lot of missing godot types.

It looks like you didn't run the Godot.BindingsGenerator. You can use /p:GenerateGodotBindings=true so it's run as part of building the Godot.Bindings project. Eventually this will happen automatically, but we need to make the task incremental first.

./build.sh --productBuild --pushNupkgsLocal ./nugets --warnAsError false /p:GenerateGodotBindings=true

I don't know which version this project currently targets, but this is an attempt at a clean build from cloning, no custom godot api exports. I'll try with the generation flag

@emmauss
Copy link
Author

emmauss commented May 28, 2024

The following command works;
./build.sh --productBuild --pushNupkgsLocal ./nugets --warnAsError false //p:GenerateGodotBindings=true

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

No branches or pull requests

2 participants