Skip to content
Snippets Groups Projects

Fix Testing Framework in the JSOO build

Merged prometheansacrifice requested to merge prometheansacrifice@ligojs-testing-framework into dev

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Melwyn Saldanha
  • Melwyn Saldanha approved this merge request

    approved this merge request

  • prometheansacrifice marked this merge request as ready

    marked this merge request as ready

  • added 6 commits

    • c98a2909 - Makefile: use nairobi gas free patches for JSOO
    • 91653ec7 - JSOO IDE: improvements
    • cee03935 - JSOO IDE: Use @ligolang/hacl-wasm 1.1.0-dev.1
    • 9c41a3d2 - JSOO: cleanup threads.js stub
    • c3306fab - Js_of_ocaml has trouble pattern matching ("..." | "...")
    • 73e0bdf3 - [Bot] add changelog entry

    Compare with previous version

  • prometheansacrifice resolved all threads

    resolved all threads

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading