Skip to content

Add an example for using a build profile #82

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

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

unvermuthet
Copy link
Contributor

@unvermuthet unvermuthet commented Mar 5, 2025

I suggest adding this file to hint at the fact that doing this is possible. Disabling unused classes can save a lot of time when compiling godot-cpp.

The included build profile has some example classes enabled. To make use of the feature, a user would discover the file, read the comment in the SConstruct, adjust the profile and uncomment the instruction.

@paddy-exe paddy-exe added the enhancement New feature or request label Mar 5, 2025
@unvermuthet unvermuthet marked this pull request as ready for review March 5, 2025 16:48
@enetheru
Copy link

I like this type of thing, I recommend using a build profile a lot in the discord, so having it front and center for people to experiment with is a "show don't tell" move.

@unvermuthet unvermuthet changed the title Add a build profile with no disabled classes and pass it by default Add an example for using a build profile Apr 6, 2025
@unvermuthet
Copy link
Contributor Author

unvermuthet commented Apr 6, 2025

I changed it from being passed by default with no disabled classes to having just a few classes enabled and marking it as an example to be adjusted and included. This was discussed and agreed upon in the GDExtension meeting on 1st April. @dsnopek was against adding a comment to the build_profile.json as a key-value pair, but I think it's important for people who discover the JSON file first. They'd likely be confused and might expect changes they make to have an effect when the file is not actually passed by default.

@dsnopek
Copy link
Contributor

dsnopek commented Apr 7, 2025

@dsnopek was against adding a comment to the build_profile.json as a key-value pair, but I think it's important for people who discover the JSON file first.

It's not my personal preference but I think it's fine :-)

Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

We should definitely move this info to the docs, but we don't have it there yet. So I'm ok with it as-is.
I'm not sure I'd add the comment there like this, I think having the SConstruct comment is good enough as long as the build profile is disabled by default. But it works for me.

@paddy-exe paddy-exe merged commit 38e6d29 into godotengine:main Apr 7, 2025
23 checks passed
@paddy-exe
Copy link
Collaborator

Merged. Thank you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants