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

Provide instructions on how to update api.json while using a custom Godot build #103

Open
necrashter opened this issue May 19, 2023 · 2 comments
Labels
new-topic A new topic to be added has been requested

Comments

@necrashter
Copy link
Contributor

In "Using custom builds of Godot" section, the book should provide instructions on how to update the automatically generated api.json file after upgrading the custom build.

I solved this problem by going to ~/.cargo/git/checkouts/godot-rust-1005fa777d499fc2/ and executing

find -name "api.json" -delete

After that, I removed the target folder in my Rust project to trigger a clean build from scratch. Not sure whether this is the best method. Please let me know if there's a better alternative.

@necrashter necrashter added the new-topic A new topic to be added has been requested label May 19, 2023
@Bromeon
Copy link
Member

Bromeon commented May 19, 2023

You should not need to manually delete the api.json.

It's possible that an engine update (change of binary file) is not picked up, but in that case it should suffice to recompile gdnative (cargo clean), which will re-generate the JSON file from the engine binary.

Does this not work in your case?

@necrashter
Copy link
Contributor Author

I confirm that running cargo clean and cargo build updates the gdnative-bindings/api.json file. Thanks!

However, I still think we should mention this in the book because running cargo build does not detect an engine update if there were no changes in the Rust GDNative library. (I'm using $GODOT_BIN environment variable method if that makes a difference.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-topic A new topic to be added has been requested
Projects
None yet
Development

No branches or pull requests

2 participants