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

[C#] Fix building with deprecated=no #96570

Conversation

Drako
Copy link
Contributor

@Drako Drako commented Sep 4, 2024

This fixes GH-84426.

I added the option --no-deprecated to build_assemblies.py, which needs to be used, if the editor was built with deprecated=no module_mono_enabled=yes.

This conditionally disables code in Compat.cs which references deprecated classes or functions.

@Drako Drako requested a review from a team as a code owner September 4, 2024 15:17
@AThousandShips AThousandShips changed the title [GodotSharp] Implemented support for building with deprecated=no [C#] Fix building with deprecated=no Sep 4, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Sep 4, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Makes sense to me. I'm not too familiar with C# buildsystem stuff though so I'll let @raulsntos double check.

@AThousandShips
Copy link
Member

You used a merge commit to update your branch, please use rebase in the future instead, see here

You will need to squash your commits before this can be merged (though that can wait until the team has reviewed), see here

But make sure not to use merge commits in the future

@Drako Drako force-pushed the fix-godotsharp-build-failing-with-no-deprecated branch from 107aad7 to 2c55a23 Compare September 4, 2024 17:58
@Drako
Copy link
Contributor Author

Drako commented Sep 4, 2024

I don't see any merge commits ;)

@Drako Drako force-pushed the fix-godotsharp-build-failing-with-no-deprecated branch from 2c55a23 to aed2209 Compare September 4, 2024 18:04
Copy link
Member

@raulsntos raulsntos left a comment

Choose a reason for hiding this comment

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

Makes sense to me, but we'd want to disable the entire Compat.cs and also do the same in the GodotSharpEditor assembly.

modules/mono/glue/GodotSharp/GodotSharp/Compat.cs Outdated Show resolved Hide resolved
@Drako Drako force-pushed the fix-godotsharp-build-failing-with-no-deprecated branch from aed2209 to e9762b3 Compare September 5, 2024 08:04
@Drako
Copy link
Contributor Author

Drako commented Sep 5, 2024

Makes sense to me. I also considered excluding Compat.cs first, but wasn't sure, if there was stuff in it which is still needed.
Anyway I conditionally excluded both Compat.cs files now and it seems to be working so far.

Copy link
Member

@raulsntos raulsntos left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@akien-mga akien-mga merged commit 1a8cf6c into godotengine:master Sep 5, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@Drako Drako deleted the fix-godotsharp-build-failing-with-no-deprecated branch September 5, 2024 16:34
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.

C# module compilation fail with deprecated=no compile flag
4 participants