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

fix: fix build dependency miss for turbo run without sequence #380

Conversation

fospring
Copy link
Contributor

@fospring fospring commented Feb 2, 2024

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • Commit messages follow the conventional commits spec
  • If this is a code change: I have written unit tests.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

fix build failed issue: https://github.com/near/near-sdk-js/actions/runs/7519429209/job/20467951173
case by turbo run without order
in our workspace, this bechmark build of deploy-contract.js has dependency on tests build output of promise_api.wasm:

export function deploy_contract() {
  let promiseId = near.promiseBatchCreate("a.caller.test.near");
  near.promiseBatchActionCreateAccount(promiseId);
  near.promiseBatchActionTransfer(promiseId, 10000000000000000000000000n);
  near.promiseBatchActionDeployContract(
    promiseId,
    includeBytes("../../tests/build/promise_api.wasm")
  );
  near.promiseBatchActionFunctionCall(
    promiseId,
    "cross_contract_callee",
    "abc",
    0,
    2 * Math.pow(10, 13)
  );
  near.promiseReturn(promiseId);
}

so we need to make sure promise_api.js has been build before building deploy-contract.js

Test Plan

Related issues/PRs

@fospring fospring force-pushed the fix/fix-build-dependency-miss-for-turbo-run-without-sequence branch from 6adef07 to 88a4460 Compare February 2, 2024 16:55
@fospring fospring force-pushed the fix/fix-build-dependency-miss-for-turbo-run-without-sequence branch from 88a4460 to 738baa0 Compare February 3, 2024 02:29
Copy link
Member

@ailisp ailisp left a comment

Choose a reason for hiding this comment

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

Good finding! Thank you!

@ailisp ailisp merged commit b44fe8e into near:develop Feb 5, 2024
2 checks passed
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.

2 participants