Skip to content

Commit 053e812

Browse files
committed
feat(wit)!: remove unnecessary host-api/host-state#set-repl-vars
BREAKING CHANGE: break repl-logic backwards compatibility by changing the wit contract
1 parent 32d6758 commit 053e812

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

crates/pluginlab/src/store.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,6 @@ impl crate::api::host_api::repl::api::host_state::Host for WasiState {
124124
self.plugins_names.clone()
125125
}
126126

127-
async fn set_repl_vars(
128-
&mut self,
129-
vars: wasmtime::component::__internal::Vec<
130-
crate::api::host_api::repl::api::transport::ReplVar,
131-
>,
132-
) {
133-
// Store environment variables in the WasiState
134-
for var in vars {
135-
self.repl_vars.insert(var.key.clone(), var.value.clone());
136-
println!("Setting repl var: {} = {}", var.key, var.value);
137-
}
138-
}
139-
140127
async fn get_repl_vars(
141128
&mut self,
142129
) -> wasmtime::component::__internal::Vec<crate::api::host_api::repl::api::transport::ReplVar>

crates/pluginlab/wit/host-api.wit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ interface host-state {
55
use transport.{repl-var};
66

77
get-plugins-names: func() -> list<string>;
8-
set-repl-vars: func(vars: list<repl-var>);
98
get-repl-vars: func() -> list<repl-var>;
109
set-repl-var: func(var: repl-var);
1110
}

packages/web-host/src/types/generated/interfaces/repl-api-host-state.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/** @module Interface repl:api/host-state **/
22
export function getPluginsNames(): Array<string>;
3-
export function setReplVars(vars: Array<ReplVar>): void;
43
export function getReplVars(): Array<ReplVar>;
54
export function setReplVar(var_: ReplVar): void;
65
export type ReadlineResponse =

packages/web-host/src/wasm/host/host-state.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,3 @@ export function getReplVars(): ReplVar[] {
2323
export function setReplVar({ key, value }: { key: string; value: string }) {
2424
internalState.replVars.set(key, value);
2525
}
26-
27-
export function setReplVars(vars: ReplVar[]) {
28-
for (const { key, value } of vars) {
29-
internalState.replVars.set(key, value);
30-
}
31-
}

0 commit comments

Comments
 (0)