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.
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
tidy: remove filtering for wasm32 deps, as this don't work #113449
tidy: remove filtering for wasm32 deps, as this don't work #113449
Changes from all commits
a94bd38
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why, but one of suspects is https://docs.rs/cargo-platform/0.1.2/cargo_platform/enum.Platform.html#method.matches
It says "Returns whether the Platform matches the given target and cfg.", but what means "matches"?
Lets skip target part and look at cfg.
There can be 2 situations:
cfg(not(windows))
matchescfg(target_arch="wasm32")
(matches currently): which can be understand as: if X can be Y? Butcfg(not(windows))
for example can bex86_64-unknown-linux-gnu
which actually not matchescfg(target_arch="wasm32")
.cfg(all(target_arch="wasm32",target_os="unknown"))
matchescfg(target_arch="wasm32")
becausetarget_arch
is "wasm32".But 2. can be broken again if
cfg(any(target_arch="wasm32", target_arch="x86_64"))
matched againstcfg(target_arch="wasm32")
, as it can bex86_64-unknown-linux-gnu
again, which is notcfg(target_arch="wasm32")
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, looks like this don't work as i expected:
Name("wasm32-wasi").matches("", &[Cfg::from_str("target_arch=\"wasm32\"").unwrap(),]) == false
, while should return true (ignore part that Platform::matches checks target or cfg).cargo_platform
works on strings and don't know to parse triples or if one cfg turn on other cfgs (for example target_env="msvc" should enable target_os="windows").There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments are messy (for me too, in month later), so, please ask question questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try to make this work instead of getting rid of it entirely. If we really want to remove it, we can revert the changes that were made, but I don't believe this is the best solution for this situation.