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

fix: pass sdkUrl into init() in worker #445

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

c0per
Copy link
Contributor

@c0per c0per commented Nov 26, 2024

When a worker is calling init(), if the sdkUrl isn't passed in, the sdk url will be reset due to this code in index.ts:

if (initValue.sdkUrl) {
  setSDKUrl(initValue.sdkUrl.toString());
}
else {
  setSDKUrl(new URL("index.mjs", import.meta.url).toString());
}

It may cause some bugs since the default sdk url isn't available due to hashing in filename and etc.

@syrusakbary
Copy link
Member

Great call! Merging

@syrusakbary syrusakbary merged commit 905e9a8 into wasmerio:main Nov 26, 2024
1 of 5 checks passed
@c0per
Copy link
Contributor Author

c0per commented Nov 26, 2024

Wow what a quick merge! Thanks a lot.

Any chance we can get a new version of @wasmer/sdk in npm? I'm having some breaking bugs in production due to this bug right now.

@c0per c0per deleted the fix/worker-sdk-url branch November 26, 2024 11:51
@syrusakbary
Copy link
Member

Yup, let me try do release it soon

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.

2 participants