-
Notifications
You must be signed in to change notification settings - Fork 210
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
Feature flag for custom Godot version #833
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bromeon
added
feature
Adds functionality to the library
c: bindings
Component: GDNative bindings (mod api)
c: tools
Component: tooling, tests, IDEs, Cargo, Rust ecosystem
c: ci
Component: CI and automation
labels
Dec 20, 2021
Bromeon
force-pushed
the
feature/custom-godot
branch
from
December 20, 2021 09:58
b9ffef1
to
00ffddc
Compare
This was referenced Dec 20, 2021
Bromeon
force-pushed
the
feature/custom-godot
branch
from
December 21, 2021 15:02
00ffddc
to
d3a482b
Compare
The main use case was to support custom versions of Godot through a convoluted build process. With the new feature 'custom-godot', the user can directly generate bindings from a Godot version of choice. However, godot-rust is not designed to be used without the GDNative API, so there is not much point in keeping that feature.
Bromeon
force-pushed
the
feature/custom-godot
branch
from
December 21, 2021 22:27
d3a482b
to
9a4eb81
Compare
bors try |
tryBuild succeeded: |
jacobsky
approved these changes
Dec 22, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me! I like that you also took the time to make things a bit more consistent with the flags whatever the "a-b-c" format is for the flags.
More in line with the package names. User-facing existing ones on 'gdnative' are not affected.
Reason: --features on a workspace level is not supported before. Further complicating CI scripts, while we already have Rust 1.57, is questionable. Also removes the custom-built clamp(), which was introduced as f32::clamp() in Rust 1.50.
Bromeon
force-pushed
the
feature/custom-godot
branch
from
December 22, 2021 16:01
9a4eb81
to
2910280
Compare
bors r+ |
Build succeeded! And happy new year! 🎉 |
This was referenced Jan 1, 2022
bors bot
added a commit
that referenced
this pull request
Jan 1, 2022
839: Fix regression in sync-doc CI job r=Bromeon a=Bromeon Fixes a small regression introduced during #833 (commit 1e907a2), regarding expansion of environment variables in the job that auto-publishes documentation. Also slightly improves the crate-level docs. bors r+ Co-authored-by: Jan Haller <bromeon@gmail.com>
bors bot
added a commit
that referenced
this pull request
Jan 1, 2022
839: Fix regression in sync-doc CI job r=Bromeon a=Bromeon Fixes a small regression introduced during #833 (commit 1e907a2), regarding expansion of environment variables in the job that auto-publishes documentation. Also slightly improves the crate-level docs. bors r+ Co-authored-by: Jan Haller <bromeon@gmail.com>
bors bot
added a commit
that referenced
this pull request
Jan 8, 2022
838: Godot version check + workaround for API generation bug r=Bromeon a=Bromeon As mentioned in #833, Godot versions < 3.3.1 were subject to [a bug](godotengine/godot#48081) that caused non-deterministic crashes during the command: ``` godot --gdnative-generate-json-api api.json ``` For users working with affected Godot versions (e.g. 3.2), this makes the feature flag `custom-godot` annoying to use, since they can't rely on the API generation to succeed -- let alone use it for automation/CI. This PR works around that by retrying the command up to 10 times (magic number). I changed the minimum supported Godot version in our own CI again to 3.2, meaning that if it _doesn't_ work, we have to suffer, too 😬 Additionally, this PR parses the Godot version and emits a meaningful error message if an unsupported version is detected (3.1 or 4.0). Co-authored-by: Jan Haller <bromeon@gmail.com>
bors bot
added a commit
that referenced
this pull request
Jan 8, 2022
838: Godot version check + workaround for API generation bug r=Bromeon a=Bromeon As mentioned in #833, Godot versions < 3.3.1 were subject to [a bug](godotengine/godot#48081) that caused non-deterministic crashes during the command: ``` godot --gdnative-generate-json-api api.json ``` For users working with affected Godot versions (e.g. 3.2), this makes the feature flag `custom-godot` annoying to use, since they can't rely on the API generation to succeed -- let alone use it for automation/CI. This PR works around that by retrying the command up to 10 times (magic number). I changed the minimum supported Godot version in our own CI again to 3.2, meaning that if it _doesn't_ work, we have to suffer, too 😬 Additionally, this PR parses the Godot version and emits a meaningful error message if an unsupported version is detected (3.1 or 4.0). Co-authored-by: Jan Haller <bromeon@gmail.com>
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c: bindings
Component: GDNative bindings (mod api)
c: ci
Component: CI and automation
c: tools
Component: tooling, tests, IDEs, Cargo, Rust ecosystem
feature
Adds functionality to the library
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enables the use of custom Godot builds in a straightforward way.
This includes older versions such as Godot 3.2, for which
api.json
is no longer shipped along.Previous process (see also book):
godot --gdnative-generate-json-api
api.json
insidegdnative-binding
New process:
custom-godot
godot
executable is in path OR setGODOT_BIN
env varThis supersedes the previous
bindings
feature, which is now removed.I also added CI support for previous Godot version 3.3.1, so far only for integration tests. Originally I wanted to use Godot 3.2 (the oldest supported version), however godotengine/godot#36582 prevented headless versions from generating
api.json
reliably without crashing. This has been fixed for versions >= 3.3.1.There is still testing to be done; feedback is always appreciated! 🙂
Closes #640. Thanks for the great ideas in that issue.