Let the client bundle's wasm-opt accept saturating float conversion; rustfmt
landed_seed parses committed text with typed(), which puts i64.trunc_sat_f64_s in the client bundle; the bundled wasm-opt rejects it unless the feature is named, as the worker bundle already does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
@@ -45,6 +45,7 @@ improvise-ws-server = { path = "../improvise-ws-server" }
|
||||
# The `wasm-opt` wasm-pack downloads predates bulk-memory being enabled by
|
||||
# default, while LLVM emits `memory.copy` regardless — so the validator
|
||||
# rejects the module unless the feature is named. Naming it here rather than
|
||||
# turning `wasm-opt` off keeps the optimizer in the loop.
|
||||
# turning `wasm-opt` off keeps the optimizer in the loop. `nontrapping-float-to-int`
|
||||
# is the worker bundle's second flag, needed here once the client parses typed text.
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = ["-O", "--enable-bulk-memory"]
|
||||
wasm-opt = ["-O", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]
|
||||
|
||||
@@ -1691,13 +1691,28 @@ fn a_category_committed_at_plus_cat_leaves_no_buffer_behind_on_both_ends() {
|
||||
typing_at(&mut app, &mut twin, &mut client, at, "Season");
|
||||
client = furnished_client(&app, (12, 12));
|
||||
client.view = app.view_state.clone();
|
||||
assert_eq!(read_edit(&client.view.buffers), "Season", "nothing was typed, so this proves nothing");
|
||||
assert_eq!(
|
||||
read_edit(&client.view.buffers),
|
||||
"Season",
|
||||
"nothing was typed, so this proves nothing"
|
||||
);
|
||||
|
||||
both_ends(&mut app, &mut twin, &mut client, "Enter");
|
||||
|
||||
assert!(document_text(&app).contains("Season"), "the commit did not land");
|
||||
assert_eq!(read_edit(&app.view_state.buffers), "", "the host left the name behind");
|
||||
assert_eq!(read_edit(&client.view.buffers), "", "the browser left the name behind");
|
||||
assert!(
|
||||
document_text(&app).contains("Season"),
|
||||
"the commit did not land"
|
||||
);
|
||||
assert_eq!(
|
||||
read_edit(&app.view_state.buffers),
|
||||
"",
|
||||
"the host left the name behind"
|
||||
);
|
||||
assert_eq!(
|
||||
read_edit(&client.view.buffers),
|
||||
"",
|
||||
"the browser left the name behind"
|
||||
);
|
||||
}
|
||||
|
||||
fn read_edit(buffers: &std::collections::HashMap<String, String>) -> &str {
|
||||
@@ -2307,7 +2322,10 @@ fn tab_at_the_rightmost_column_reopens_on_the_stored_spelling() {
|
||||
apply_on(&mut client_host, &cmds);
|
||||
reduce_key(&mut key_host, event);
|
||||
}
|
||||
assert_eq!(key_host.view_state.buffers.get("edit").map(String::as_str), Some("7"));
|
||||
assert_eq!(
|
||||
key_host.view_state.buffers.get("edit").map(String::as_str),
|
||||
Some("7")
|
||||
);
|
||||
assert_eq!(client.view.buffers, key_host.view_state.buffers);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user