Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a no-op package loader by default in PluggableRuntime #4055

Merged
merged 4 commits into from
Jul 5, 2023

Conversation

Michael-F-Bryan
Copy link
Contributor

@Michael-F-Bryan Michael-F-Bryan commented Jul 5, 2023

Description

This fixes the root cause of #4029 by switching PluggableRuntime from the BuiltinPackageLoader to an UnsupportedPackageLoader which will error out when you try to resolve a package tree. This should side-step the .expect("Loading the builtin resolver should never fail") @kwonoj was encountering.

I've also added default implementations for Runtime::module_cache() and Runtime::package_loader() which will return some sane values. In the case of module_cache(), we'll return a thread-local cache so users get some level of caching by default. For package_loader() I'm just returning UnsupportedPackageLoader.

Closes #4029.

@Michael-F-Bryan Michael-F-Bryan requested a review from theduke July 5, 2023 05:03
@theduke
Copy link
Contributor

theduke commented Jul 5, 2023

Closes #4029

@Michael-F-Bryan Michael-F-Bryan enabled auto-merge July 5, 2023 07:09
@Michael-F-Bryan Michael-F-Bryan merged commit 526292d into master Jul 5, 2023
@Michael-F-Bryan Michael-F-Bryan deleted the default-package-loader branch July 5, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasmer-wasix@4 does not allow to instantiate without http client
2 participants