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

Blocking SnarkyJS CI tests #997

Merged
merged 10 commits into from
Jun 22, 2023
Merged

Conversation

mitschabaude
Copy link
Member

@mitschabaude mitschabaude commented Jun 20, 2023

companion of MinaProtocol/mina#13430

  • uses the existing ./run --bundle script to build & run TS scripts on the fly
  • in order to make ./run handle our entire code base, and don't mix the worker code into the bundle, we stop bundling at wrapper.js (which has the compiled wasm/jsoo artifacts as dependencies)
  • we make sure that artifacts are actually at the place where they are imported from (src/bindings/compiled/_node_bindings). The make script now puts compiled artifacts into that folder instead of into /dist.
  • other build scripts are modified so that they copy additional files into /dist after invoking the TS compiler
  • our old hack to ensure that TS doesn't type-check the jsoo output (importing a file name that doesn't exist within src) is no longer valid. We instead add an empty declaration file snarky_js_bindings.bc.d.cts which also stops TS from looking at that file

All in all, the build setup is a bit more logical and less hacky now - in particular, files are located where they are imported from and it's actually possible to bundle the entire TS code base without copying around files before doing that

@mitschabaude mitschabaude force-pushed the feature/revive-snarkyjs-ci-develop branch from 521ce79 to 7062619 Compare June 21, 2023 10:19
@mitschabaude mitschabaude marked this pull request as ready for review June 21, 2023 10:22
@mitschabaude mitschabaude changed the title Blocking SnarkyJS CI tests (develop) Blocking SnarkyJS CI tests Jun 21, 2023
src/build/utils.js Outdated Show resolved Hide resolved
src/tests/test.ts Outdated Show resolved Hide resolved
@@ -0,0 +1,156 @@
import {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when is this run?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never, but I hope to reconcile some Mina tests which are currently in snarkyjs/tests/integration and are written in raw JS w/o types, with this directory

await testRecursion(MaxProofsVerifiedOne, 1);

async function testRecursion(
Program: typeof MaxProofsVerifiedOne,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: should this be explicit? I think we want to have to change things if the backend changes, right?

@mitschabaude mitschabaude merged commit 6ce3f97 into develop Jun 22, 2023
9 checks passed
@mitschabaude mitschabaude deleted the feature/revive-snarkyjs-ci-develop branch June 22, 2023 13:42
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

Successfully merging this pull request may close these issues.

None yet

3 participants