Stamp the web glue and module with one version - #164
Merged
Merged
Conversation
EM_ASM addresses live in app.js. A host can cache that file longer than app.wasm. A new module then calls an address the cached glue does not list, and the docs page stays blank. One content version loads the pair together. Co-authored-by: Sean Cheatham <SeanCheatham@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The docs page stays blank when the browser loads a new
app.wasmwith an olderapp.js.EM_ASMaddresses are keys inASM_CONSTSinsideapp.js. The Check-stage copy moves those addresses. The host cachesapp.jsfor 4 hours andapp.wasmfor 10 minutes. After a deploy, the new module callsemscripten_asm_const_intwith an address the cached glue does not list. The lookup throwsASM_CONSTS[code] is not a functionduringcallMain, after the loading status is hidden. The page is blank.A matched pair boots. Seed 0 still fails because R won. Seed 128 still passes because L won.
Fix
The web package stamps
app.jsandapp.wasmwith one content version. The page loads that pair together.Proof
The web embedder test for
examples/docschecks the shared version and the walkthrough. A headless run starts the same package.