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

Cargo.toml changes and cache busting #29

Open
nickbabcock opened this issue Dec 15, 2019 · 0 comments
Open

Cargo.toml changes and cache busting #29

nickbabcock opened this issue Dec 15, 2019 · 0 comments

Comments

@nickbabcock
Copy link

nickbabcock commented Dec 15, 2019

It seems like if Cargo.toml is modified the script that imports the wasm does not get a new content hash.

Below are instructions on building a project of mine. I noticed that that diff between two commits resulted in the same js hash:

diff --git a/crate/Cargo.toml b/crate/Cargo.toml
index d131c19..9928d1d 100644
--- a/crate/Cargo.toml
+++ b/crate/Cargo.toml
@@ -11,3 +11,7 @@ crate-type = ["cdylib"]
 wasm-bindgen = "0.2.55"
 boxcars = "0.6"
 serde_json = "1.0"
+
+[profile.release]
+lto = true
+opt-level = 'z'

Full instructions:

git clone https://github.com/nickbabcock/rl-web.git
cd rl-web

git checkout 354f8362acaaee6f71a9ab2fe9d2c0452bf54765
npm ci
npm run build

git checkout a16eaebdcdf216e9f121d305db8e46ab8c644e62
npm run build

Screenshot highlighting the differences:

image

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

1 participant