icp-sync-plugin/build.rs: warn instead of panic when wasm32-wasip2 is missing#545
Closed
SAY-5 wants to merge 1 commit intodfinity:mainfrom
Closed
icp-sync-plugin/build.rs: warn instead of panic when wasm32-wasip2 is missing#545SAY-5 wants to merge 1 commit intodfinity:mainfrom
SAY-5 wants to merge 1 commit intodfinity:mainfrom
Conversation
… missing Signed-off-by: SAY-5 <say.apm35@gmail.com>
|
Dear @SAY-5, In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA. If you decide to agree with it, please visit this issue and read the instructions there. Once you have signed it, re-trigger the workflow on this PR to see if your code can be merged. — The DFINITY Foundation |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #543.
crates/icp-sync-plugin/build.rsunconditionally rancargo build --target wasm32-wasip2for the test fixture and panicked the entire build when the target wasn't installed. Distribution toolchains (Homebrew, distro packagers) often don't shipwasm32-wasip2, socargo install icp-clifailed for downstream packagers.The fixture is only consumed by
#[test]functions inruntime.rs.CARGO_CFG_TESTisn't set during build-script execution, so suggested gating doesn't actually distinguish test from non-test invocations. Instead: keep building when the target is available, but on failure emit acargo:warningand setTEST_PLUGIN_WASM=(empty). Tests that need the fixture will surface a clearer error at test time;cargo installandcargo buildsucceed cleanly on toolchains withoutwasm32-wasip2(e.g. the Homebrew Rust at Homebrew/homebrew-core#280458).