Skip to content

Undo Wasm threading fix on panic context tracking #1107

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
Mar 30, 2025

Conversation

PgBiel
Copy link
Contributor

@PgBiel PgBiel commented Mar 30, 2025

Partially reverts #1093. The wasm binary name feature is still needed, and in principle we can keep the #[cfg] to not check for the main thread id as an optimization, though we can revise this in the future if the lack of the main thread id facilities ever becomes a hurdle for other parts of gdext.

As for thread locals, turns out we only need to ensure we don't pass atomics-related target feature flags when building for nothreads, and thread locals start working properly.

So, instead of trying to work around them in #1105, we should use thread locals like normal and instead change the book's instructions to suggest removing those flags only for nothreads builds (threaded builds still need them).

Turns out we only need to ensure we don't pass `atomics`-related target feature flags when building for nothreads, and thread locals work properly.

Partial backout of 2d84322
@PgBiel PgBiel changed the title undo wasm threading fix on panic context tracking Undo wasm threading fix on panic context tracking Mar 30, 2025
@PgBiel PgBiel changed the title Undo wasm threading fix on panic context tracking Undo Wasm threading fix on panic context tracking Mar 30, 2025
@GodotRust
Copy link

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

@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: wasm WebAssembly export target labels Mar 30, 2025
@Bromeon Bromeon added this pull request to the merge queue Mar 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 30, 2025
@Bromeon
Copy link
Member

Bromeon commented Mar 30, 2025

CI failed here:
https://github.com/godot-rust/gdext/actions/runs/14154962397/job/39653017427#step:3:4690

I wonder if that's a spurious issue? Do you have any idea what could cause this, or if it might be related to this PR?

@PgBiel
Copy link
Contributor Author

PgBiel commented Mar 30, 2025

This PR only makes the panic context tracking code run on Wasm nothreads on debug mode. If that test does not use Wasm nothreads, then there should be no relation (and indeed, CI succeeded before). Perhaps you could try another run

@Bromeon Bromeon added this pull request to the merge queue Mar 30, 2025
Merged via the queue into godot-rust:master with commit 73c4aa7 Mar 30, 2025
16 checks passed
@PgBiel PgBiel deleted the undo-nothreads-fix branch March 30, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: wasm WebAssembly export target quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants