-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Cranelift: rework isle-in-source-tree functionality. #9633
Cranelift: rework isle-in-source-tree functionality. #9633
Conversation
Per bytecodealliance#9625 and bytecodealliance#9588, a downstream user of Cranelift was misusing the `isle-in-source-tree` feature, enabling it indiscriminately even in published crates (wasmerio/wasmer#5202). This went against the intent of the feature, to be a way for local developers to observe the generated source. As such, it ran afoul of some safety checks for that purpose, and also polluted users' Cargo caches in a way that we cannot now fix except in future releases. The best we can do is probably to take away features that are liable to be misused. Following discussion in today's Cranelift weekly meeting, we decided to provide this functionality under an environment variable instead. This allows folks who know what they're doing to get the same behavior, but does not expose a feature to crate users. Fixes bytecodealliance#9625.
I think the merge queue run raced with the release; cargo-vet failed because it found a version on crates.io it didn't expect. Re-running, but noting in case we see it again later -- interesting corner case! |
Ah I don't think this is spurious but should be fixed at #9635 |
std::process::exit(1); | ||
} | ||
} | ||
let isle_dir = if let Ok(path) = std::env::var("ISLE_SOURCE_DIR") { |
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.
Shouldn't this use cargo::rerun-if-env-changed
?
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.
Ah, yes, I suppose so -- thanks for noticing this! I'll post a PR.
- Add a `cargo:rerun-if-env-changed` clause for the `ISLE_SOURCE_DIR` environment variable to properly rebuild if the config changes. - Update docs to point to the new env-var-based approach rather than the old Cargo feature. As per this Zulip conversation [1] and this GitHub comment [2]. [1]: https://bytecodealliance.zulipchat.com/#narrow/channel/217117-cranelift/topic/How.20to.20enable.20the.20isle-in-source-tree.20feature.3F/near/508028830 [2]: bytecodealliance#9633 (comment)
) - Add a `cargo:rerun-if-env-changed` clause for the `ISLE_SOURCE_DIR` environment variable to properly rebuild if the config changes. - Update docs to point to the new env-var-based approach rather than the old Cargo feature. As per this Zulip conversation [1] and this GitHub comment [2]. [1]: https://bytecodealliance.zulipchat.com/#narrow/channel/217117-cranelift/topic/How.20to.20enable.20the.20isle-in-source-tree.20feature.3F/near/508028830 [2]: #9633 (comment)
Per #9625 and #9588, a downstream user of Cranelift was misusing the
isle-in-source-tree
feature, enabling it indiscriminately even in published crates (wasmerio/wasmer#5202). This went against the intent of the feature, to be a way for local developers to observe the generated source. As such, it ran afoul of some safety checks for that purpose, and also polluted users' Cargo caches in a way that we cannot now fix except in future releases.The best we can do is probably to take away features that are liable to be misused. Following discussion in today's Cranelift weekly meeting, we decided to provide this functionality under an environment variable instead. This allows folks who know what they're doing to get the same behavior, but does not expose a feature to crate users.
Fixes #9625.