unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.38k stars 178 forks source link

Fix nightly WASM target #5799

Closed robertbastian closed 1 week ago

robertbastian commented 1 week ago

https://unicode-org.slack.com/archives/C06K24H8XHQ/p1731075306932339

CI passes on the PR

robertbastian commented 1 week ago

https://unicode-org.slack.com/archives/C06K24H8XHQ/p1730988954956999

Manishearth commented 1 week ago

@sffc Rustc has been working on renaming wasm-wasi to wasm-wasip1 for a while (there's a wasip2 target being introduced as well, hence the rename). Our build has warned on this for a while but we haven't noticed since it's in CI.

sffc commented 1 week ago

Okay, I understand "wasip1" and why we want to use it; I just don't know "why now". The pinned nightly that we had been using for a long time, about a year old, did not support "wasip1" last I checked. I don't know how big the window was of nightlies that supported both "wasi" and "wasip1". I guess the latest nightly out last night dropped "wasi" backwards compatibility support?

Manishearth commented 1 week ago

Yes.

Manishearth commented 1 week ago

See https://github.com/rust-lang/rust/pull/132562: wasip1 introduced in January, and wasi removed a few days ago.

sffc commented 1 week ago

That seems like a fairly aggressive schedule, especially considering wasm32-wasi is a target on stable...

Currently our LLVM_COMPATIBLE_NIGHTLY ?= "nightly-2024-01-01" which is still too old. I think we picked that version because it was the latest version that was compatible with LLVM in Xcode; I assume it is a coincidence that it is January 1.

So this is a bit unfortunate of timing. But I guess if CI works, we can ignore it and hope things are okay

Manishearth commented 1 week ago

@sffc I think it would be fine to mention the Xcode thing on that PR, people who care about LLVM versions have heavy overlap with people doing wasm stuff. I agree that the schedule feels aggressive, it felt aggressive to me as well.

Manishearth commented 1 week ago

Surprised it didn't show up with deny(warnings) though

sffc commented 1 week ago

Well we do link C++ together with Rust on a WASI target in the codepointtrie builder code. So it may be difficult to rebuild the codepointtrie builder WASM with this change. Hopefully we won't need to do that again soon.

bjorn3 commented 1 week ago

Surprised it didn't show up with deny(warnings) though

#[deny] only denies lints and this warning is not a lint. If it was a lint, you did see a note with the name of the lint and the current lint level attached to the warning.

riking commented 6 days ago

@sffc Target availability is explicitly excluded from the stability promises, due to it needing to match timing decisions of other organizations outside of Rust's control https://doc.rust-lang.org/rustc/target-tier-policy.html?highlight=hard%20stability%20guarantee#general