Fix Testing Framework in the JSOO build
Motivation and Context
ligo.js
doesn't have a working testing framework.
Description
This MR uses a patched version of protocol to let us use it for the testing framework.
Protocol is written with 64-bit environment in mind. Browsers, however, are 32-bit (as far as JSOO is concerned). This MR adapts saturation_repr.ml
to use Zarith's Z.t
so that when compiled to JS, zarith's stubs get linked in and get us 64 bit emulation for integer arithmetic in the browser.
Note: one of the interpreter step invocation passes zero gas as the initial state. I don't know where this is coming from as of now. To workaround this, the gas costs of all instructions are temporarily made free.
Component
-
compiler -
website -
webide -
vscode-plugin -
debugger
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to not work as expected) -
Performance improvement (non-breaking change that improves performance) -
None (change with no changelog)
Changelog
Fixes testing framework in ligo.js
Checklist:
-
Changes follow the existing coding style (use dune @fmt
to check). -
Tests for the changes have been added (for bug fixes / feature). -
Documentation has been updated. -
Changelog description has been added (if appropriate). -
Start titles under ## Changelog
section with #### (if appropriate). -
There is no image or uploaded file in changelog -
Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Merge request reports
Activity
added 92 commits
-
a2885943...d95b1213 - 91 commits from branch
dev
- fa27defb - Merge remote-tracking branch 'origin/dev' into prometheansacrifice@ligojs-testing-framework
-
a2885943...d95b1213 - 91 commits from branch
added 606 commits
-
fa27defb...e770d410 - 591 commits from branch
dev
- e770d410...05078b8d - 5 earlier commits
- 8cf2d4fe - wip
- 0308ed3b - wip: makefile: use nairobi gas free branch
- 5396aac7 - debug
- 5bc4cb70 - JSOO: fix watchman.sh
- 27726fa9 - wip: makefile: revert back to regular submodule
- 1ed79930 - JSOO: Use @ligolang/hacl-wasm 1.1.0-dev.1
- a6f53124 - JSOO: cleanup threads.js stub
- fbcabef9 - JSOO: optionally load js_main.bc.runtime.js
- c5db079c - Js_of_ocaml has trouble pattern matching ("..." | "...")
- e81043cc - Merge remote-tracking branch 'origin/dev' into prometheansacrifice@ligojs-testing-framework
Toggle commit list-
fa27defb...e770d410 - 591 commits from branch
added 17 commits
- e81043cc...f5b591a8 - 7 earlier commits
- f14ee0e6 - Adds missing Js stubs for Nairobi protocol
- 115f8d32 - Add e2e test for Ligo.js bundle
- 0cccaedb - Fix protocols_str to include nairobi and remove lima
- e34762c5 - WIP: Adds CI job to test jsoo build with puppeteer
- 3ff51a0b - wip: js_main: add testing_framework api
- 537a5acb - Makefile: use nairobi gas free branch for JSOO
- de3e2b34 - JSOO IDE: improvements
- 7cee92ba - JSOO IDE: Use @ligolang/hacl-wasm 1.1.0-dev.1
- 451ae42b - JSOO: cleanup threads.js stub
- 1a424c3c - Js_of_ocaml has trouble pattern matching ("..." | "...")
Toggle commit listadded 14 commits
- 1a424c3c...28403cb0 - 4 earlier commits
- 670416bb - Display commit hash in poc webide
- 0af08de3 - Makefile: use nairobi gas free branch for JSOO
- f41c7722 - Adds missing Js stubs for Nairobi protocol
- ffadae7e - Add e2e test for Ligo.js bundle
- cacf7cdf - Fix protocols_str to include nairobi and remove lima
- 01374fe9 - WIP: Adds CI job to test jsoo build with puppeteer
- bd0512b2 - JSOO IDE: improvements
- e4b630f8 - JSOO IDE: Use @ligolang/hacl-wasm 1.1.0-dev.1
- c9e76810 - JSOO: cleanup threads.js stub
- b1a7ad64 - Js_of_ocaml has trouble pattern matching ("..." | "...")
Toggle commit listadded 18 commits
-
b1a7ad64...38cc5b1e - 7 commits from branch
dev
- aaaea6b4 - 1 earlier commit
- a3202bad - Expose testing framework to jsoo bundle
- 91993170 - Disable michelson typechecking for JSOO testing framework
- 1cf4911b - Temporarily set unlimited gas for testing framework for JSOO
- 82d32756 - JSOO IDE: Add ./watchman.sh to npm start
- 75285bab - Display commit hash in poc webide
- 94861b52 - Makefile: use nairobi gas free branch for JSOO
- 4cc52be0 - JSOO IDE: improvements
- 615eeeff - JSOO IDE: Use @ligolang/hacl-wasm 1.1.0-dev.1
- 00e52c5e - JSOO: cleanup threads.js stub
- ba1eb53c - Js_of_ocaml has trouble pattern matching ("..." | "...")
Toggle commit list-
b1a7ad64...38cc5b1e - 7 commits from branch
added 8 commits
- 5a545544 - Disable michelson typechecking for JSOO testing framework
- 11f300b2 - JSOO IDE: Add ./watchman.sh to npm start
- d0d8b3c8 - Display commit hash in poc webide
- c9af4e50 - Makefile: use nairobi gas free branch for JSOO
- 788dd470 - JSOO IDE: improvements
- 55694f2b - JSOO IDE: Use @ligolang/hacl-wasm 1.1.0-dev.1
- 1ddd1b3b - JSOO: cleanup threads.js stub
- fa4f05be - Js_of_ocaml has trouble pattern matching ("..." | "...")
Toggle commit listmentioned in commit 9ecbf8c0
A new deploy preview is available on Netlify at https://2470-ccd38868--ligolang.netlify.app, you can view the logs at https://app.netlify.com/sites/ligolang/deploys/647f02cf4c5a7d0726ebcfae
Edited by Ligo Lang- Resolved by prometheansacrifice
- Resolved by prometheansacrifice
added 6 commits
Toggle commit list