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

Migrate crate-local /gen directories to OUT_DIR #687

Merged
merged 2 commits into from
May 22, 2024
Merged

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented May 1, 2024

Please help test this pull request on different IDEs. In the past, we experienced problems with static analysis and symbol completion when using OUT_DIR.

To try this PR, you can run cargo clean, then replace your godot entry in Cargo.toml with this:

[dependencies]
godot = { git = "https://github.com/godot-rust/gdext", branch = "feature/output-dir" }

Jetbrains

On Jetbrains IDEs, it may be necessary to run Cargo refresh:

Cargo refresh

Feedback

I'd appreciate if you could then respond here quickly with your IDE, its version and if things work (out of the box, or if a manual step like Cargo refresh is needed).

Closes #506.

@Bromeon Bromeon added the feature Adds functionality to the library label May 1, 2024
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-687

@LeaoLuciano
Copy link
Contributor

Seems fine on VSCode (for Linux) using Rust-Analyzer extension (v0.4.1943)

@fstxz
Copy link

fstxz commented May 2, 2024

VSCodium 1.87.2 on Linux (Flatpak version). Works out of the box.

@StatisMike
Copy link
Contributor

Works on Linux, VSCode + RustAnalyzer. Also tested whole build process and godot export on CI in gd-rehearse.

@Bromeon Bromeon force-pushed the feature/output-dir branch 2 times, most recently from 9d7de11 to 6d6c15c Compare May 6, 2024 19:45
@jacobsky
Copy link
Collaborator

jacobsky commented May 11, 2024

Tested on VSCode 1.89 (windows) with Rust Analyzer v0.3.1950, and there were no issues.

I would also like to note that I can confirm that this resolves some rust analyzer panic/warnings when compared with the master branch.

Remnant from times where the header regularly had breaking changes. Since Godot 4.1,
changes should generally be backwards compatible. Some patching still happens in Rust
code, with direct String::replace() calls.
@Bromeon Bromeon marked this pull request as ready for review May 22, 2024 06:22
@Bromeon Bromeon added this pull request to the merge queue May 22, 2024
@Bromeon Bromeon removed this pull request from the merge queue due to a manual request May 22, 2024
@Bromeon Bromeon added this pull request to the merge queue May 22, 2024
Merged via the queue into master with commit 9afa98d May 22, 2024
15 checks passed
@Bromeon Bromeon deleted the feature/output-dir branch May 22, 2024 06:48
@Bromeon
Copy link
Member Author

Bromeon commented May 22, 2024

Bringing this to master to expose it to more testing. If people run into issues, we can always rethink our approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds functionality to the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jetbrains IDEs don't support static analysis of generated code in OUT_DIR
6 participants