Skip to content

Conversation

@primoly
Copy link
Contributor

@primoly primoly commented Nov 23, 2025

Add missing gc feature gates.

Fixes #12071

@primoly primoly requested a review from a team as a code owner November 23, 2025 14:03
@primoly primoly requested review from alexcrichton and removed request for a team November 23, 2025 14:03
Comment on lines -1134 to 1138
/// this module.
#[cfg(any(feature = "gc", feature = "debug"))]
#[cfg(feature = "gc")]
pub(crate) fn text_offset(&self, pc: usize) -> u32 {
u32::try_from(pc - self.inner.module.text().as_ptr() as usize).unwrap()
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is only called when the gc feature is enabled, so I removed the debug gate (it produced a warning). But maybe this was intentional as it may be needed with the debug feature in the future. Should I revert this back? The PR that introduced the function is #11769

Copy link
Member

Choose a reason for hiding this comment

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

Nah that's ok, we basically just frob things until warnings and such go away

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Nov 23, 2025
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks! Could you also extend the list of checks here with the combination that didn't build? (to help ensure no future regressions)

Comment on lines -1134 to 1138
/// this module.
#[cfg(any(feature = "gc", feature = "debug"))]
#[cfg(feature = "gc")]
pub(crate) fn text_offset(&self, pc: usize) -> u32 {
u32::try_from(pc - self.inner.module.text().as_ptr() as usize).unwrap()
}
Copy link
Member

Choose a reason for hiding this comment

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

Nah that's ok, we basically just frob things until warnings and such go away

@primoly primoly requested a review from a team as a code owner November 24, 2025 16:12
@primoly primoly requested review from fitzgen and removed request for a team November 24, 2025 16:12
@alexcrichton alexcrichton added this pull request to the merge queue Nov 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 24, 2025
@alexcrichton alexcrichton added this pull request to the merge queue Nov 24, 2025
Merged via the queue into bytecodealliance:main with commit 17060bb Nov 24, 2025
45 checks passed
alexcrichton pushed a commit to alexcrichton/wasmtime that referenced this pull request Nov 24, 2025
* add more `gc` feature gates

* test debug gc feature combination
alexcrichton added a commit that referenced this pull request Nov 24, 2025
* add more `gc` feature gates

* test debug gc feature combination

Co-authored-by: primoly <168267431+primoly@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot build 39.0.0 without gc feature

2 participants