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

Wasm cache versionning #44

Closed
sigmaSd opened this issue Dec 27, 2022 · 6 comments
Closed

Wasm cache versionning #44

sigmaSd opened this issue Dec 27, 2022 · 6 comments

Comments

@sigmaSd
Copy link
Contributor

sigmaSd commented Dec 27, 2022

I didn't run into a problem yet, but just reading the code, it seems like wasm caching just checks if the file exists locally

So if the wasm file gets new apis, it wont be re-downloaded again because it exists already

Maybe the wasm caching need to be aware of dax version

@dsherret
Copy link
Owner

It should be. Does your cache not store a version number?

@dsherret
Copy link
Owner

const version = getUrlVersion(url);

@sigmaSd
Copy link
Contributor Author

sigmaSd commented Dec 28, 2022

Ah so the version is in the file name cool

@sigmaSd sigmaSd closed this as completed Dec 28, 2022
@sigmaSd
Copy link
Contributor Author

sigmaSd commented Dec 28, 2022

What about adding this to deno wasm build somewhere seems useful, maybe also worth mentioning serde_wasm_bindgen

@dsherret
Copy link
Owner

Yeah, it would be probably better if wasmbuild just handled this or had an option to generate code that does. One restriction in wasmbuild is it probably shouldn’t have any external dependencies so it works well in a web browser. We would also probably have to have more general caching (maybe a hash of the url for the filename in a general wasmbuild cache folder). Would you like to implement this?

@sigmaSd
Copy link
Contributor Author

sigmaSd commented Dec 28, 2022

Sure I'll look into it, I'll start by opening an issue there

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

No branches or pull requests

2 participants