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

Transition to wasm-bindgen-test/unstable-test-coverage #4369

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

daxpedda
Copy link
Collaborator

@daxpedda daxpedda commented Dec 19, 2024

Now that the #[coverage] attribute is stabilized (rust-lang/rust#130766), we can remove the hacks required to make this work and transition to a proper crate feature.

While this should be stabilized in Rust v1.85, we should wait until the release until actually encoding this information into WBG. Who knows, it might be delayed for one reason or another.

With LLVM 20 this shouldn't require any further hacks to actually run test coverage and profiling should be supported as well. While it will still require nightly Rust because of -Zno-profiler-runtime, everything should be covered from wasm-bindgens side. Before stabilizing it we should also transition the wording from test coverage to profiling to be more accurate.

@daxpedda daxpedda force-pushed the unstable-test-coverage branch 4 times, most recently from f6c54df to d89b606 Compare December 19, 2024 19:53
@daxpedda daxpedda marked this pull request as draft December 19, 2024 19:53
@daxpedda
Copy link
Collaborator Author

Setting to draft until Amanieu/minicov#28 is resolved. Right now enabling the crate feature will emit .profraw files even when not instrumenting the Wasm module with -Cinstrument-coverage.

This kinda defeats the purpose of this PR, where users could enable the crate feature in dev-dependencies and not requiring more flags to get test coverage going. But the current situation would require using --features wasm-bindgen-test/unstable-test-coverage.

So we are just trading a cfg with a crate feature, slightly better, but not by much.

@daxpedda daxpedda force-pushed the unstable-test-coverage branch from d89b606 to cd931cb Compare December 19, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant