Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,146 changes: 587 additions & 559 deletions Cargo.lock

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions crates/fastly-compute-py/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,23 @@ pub fn build(output: PathBuf, entry_name: String, virtualenv: Option<PathBuf>) -

log::info!(" Componentizing Python application...");
futures::executor::block_on(async {
componentize_py::componentize(
&[merged_wit_path.as_path()],
Some("fastly:compute/service@0.1.0"),
&[],
false,
Some("wit_world"),
&python_path_refs,
&[],
&entry_name,
&temp_component_wasm_path,
None,
false,
&HashMap::new(),
&HashMap::new(),
)
componentize_py::ComponentGenerator {
wit_path: &[merged_wit_path.as_path()],
worlds: &["fastly:compute/service@0.1.0"],
features: &[],
all_features: false,
world_module: Some("wit_world"),
python_path: &python_path_refs,
module_worlds: &[],
app_name: &entry_name,
output_path: &temp_component_wasm_path,
add_to_linker: None,
stub_wasi: false,
import_interface_names: &HashMap::new(),
export_interface_names: &HashMap::new(),
full_names: false,
}
.generate()
.await
})?;

Expand Down
2 changes: 1 addition & 1 deletion fastly_compute/testing/stubs/wit_world/exports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import weakref

from componentize_py_types import Result, Ok, Err, Some
from ..imports import async_io
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found that, unfortunately, the order of imports in stubs is unstable. I'd prefer to not keep committing changes that wiggle them back and forth unless we can show it's stable now. (Maybe we should run a fixer over them in the interrim.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually changing due to changes in upstream to hopefully fix that issue: bytecodealliance/componentize-py@81d582a

from ..imports import http_req
from ..imports import async_io

class HttpIncoming(Protocol):

Expand Down
2 changes: 1 addition & 1 deletion fastly_compute/testing/stubs/wit_world/imports/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import weakref

from componentize_py_types import Result, Ok, Err, Some
from ..imports import types
from ..imports import async_io
from ..imports import types

class AclError(Enum):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
import weakref

from componentize_py_types import Result, Ok, Err, Some
from ..imports import async_io
from ..imports import cache
from ..imports import http_req
from ..imports import backend
from ..imports import http_resp
from ..imports import async_io

class ExtraLookupOptions:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import weakref

from componentize_py_types import Result, Ok, Err, Some
from ..imports import types
from ..imports import http_req
from ..imports import types
from ..imports import async_io

class ExtraNextRequestOptions:
Expand Down
2 changes: 1 addition & 1 deletion fastly_compute/testing/stubs/wit_world/imports/http_req.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

from componentize_py_types import Result, Ok, Err, Some
from ..imports import http_types
from ..imports import types
from ..imports import backend
from ..imports import types
from ..imports import async_io
from ..imports import http_resp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
import weakref

from componentize_py_types import Result, Ok, Err, Some
from ..imports import http_resp
from ..imports import backend
from ..imports import http_req
from ..imports import backend
from ..imports import async_io
from ..imports import http_resp

class ExtraImageOptimizerTransformOptions:
"""
Expand Down
Loading