Skip to content

Commit 873f3f2

Browse files
authored
Merge pull request #211 from polywrap/dev
prep 0.1.0a34 | /workflows/cd
2 parents 9f300db + c00e414 commit 873f3f2

File tree

8 files changed

+55
-75
lines changed

8 files changed

+55
-75
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0a33
1+
0.1.0a34

packages/polywrap-client/poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/polywrap-uri-resolvers/poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/polywrap-wasm/poetry.lock

Lines changed: 24 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/polywrap-wasm/polywrap_wasm/imports/abort.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ def wrap_abort(
3838
file_len,
3939
)
4040

41-
if (
42-
self.state.subinvoke_result
43-
and self.state.subinvoke_result.error
44-
and msg == repr(self.state.subinvoke_result.error)
45-
):
41+
if self.state.subinvoke_result and self.state.subinvoke_result.error:
4642
# If the error thrown by Wasm module is the same as the subinvoke error,
4743
# then we can notify the subinvoke error was cause of the Wasm module abort.
4844
raise WrapAbortError(

packages/polywrap-wasm/polywrap_wasm/imports/get_implementations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def wrap_get_implementations(self, uri_ptr: int, uri_len: int) -> bool:
3030
message="Expected invoker to be defined got None",
3131
)
3232
try:
33-
maybe_implementations = self.invoker.get_implementations(uri=uri)
33+
maybe_implementations = self.invoker.get_implementations(uri, False)
3434
implementations: List[str] = (
3535
[uri.uri for uri in maybe_implementations]
3636
if maybe_implementations

packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,19 @@ def invoke(
135135
)
136136

137137
encoded_args = (
138-
state.invoke_options.args
139-
if isinstance(state.invoke_options.args, bytes)
140-
else msgpack_encode(state.invoke_options.args)
138+
(
139+
state.invoke_options.args
140+
if isinstance(state.invoke_options.args, bytes)
141+
else msgpack_encode(state.invoke_options.args)
142+
)
143+
if state.invoke_options.args
144+
else b""
145+
)
146+
encoded_env = (
147+
msgpack_encode(state.invoke_options.env)
148+
if state.invoke_options.env
149+
else b""
141150
)
142-
encoded_env = msgpack_encode(state.invoke_options.env)
143151

144152
method_length = len(state.invoke_options.method)
145153
args_length = len(encoded_args)
@@ -149,6 +157,7 @@ def invoke(
149157
instance = self.create_wasm_instance(store, state, client)
150158

151159
exports = WrapExports(instance, store)
160+
print("env length", env_length)
152161
result = exports.__wrap_invoke__(method_length, args_length, env_length)
153162

154163
if result and state.invoke_result and state.invoke_result.result:

packages/polywrap-wasm/pyproject.toml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ readme = "README.md"
1111

1212
[tool.poetry.dependencies]
1313
python = "^3.10"
14-
wasmtime = "^6.0.0"
15-
unsync = "^1.4.0"
16-
unsync-stubs = "^0.1.2"
17-
polywrap-msgpack = "^0.1.0a33"
18-
polywrap-manifest = "^0.1.0a33"
19-
polywrap-core = "^0.1.0a33"
20-
[tool.poetry.dev-dependencies]
14+
wasmtime = "^9.0.0"
15+
polywrap-msgpack = {path = "../polywrap-msgpack", develop = true}
16+
polywrap-manifest = {path = "../polywrap-manifest", develop = true}
17+
polywrap-core = {path = "../polywrap-core", develop = true}
18+
19+
[tool.poetry.group.dev.dependencies]
20+
pycln = "^2.1.3"
2121
pytest = "^7.1.2"
2222
pytest-asyncio = "^0.19.0"
2323
pylint = "^2.15.4"
@@ -30,9 +30,6 @@ pyright = "^1.1.275"
3030
pydocstyle = "^6.1.1"
3131
pydantic = "^1.10.2"
3232

33-
[tool.poetry.group.dev.dependencies]
34-
pycln = "^2.1.3"
35-
3633
[tool.bandit]
3734
exclude_dirs = ["tests"]
3835

0 commit comments

Comments
 (0)