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

Vitest benchmark stopped working since 0.31.2 #3538

Closed
6 tasks done
jrouviere opened this issue Jun 7, 2023 · 1 comment · Fixed by #3629
Closed
6 tasks done

Vitest benchmark stopped working since 0.31.2 #3538

jrouviere opened this issue Jun 7, 2023 · 1 comment · Fixed by #3629
Milestone

Comments

@jrouviere
Copy link

Describe the bug

Vitest benchmarks works with Vitest 0.31.1 but gets an exception with 0.31.2+.
The exception occurs on 0.32.0 as well.

Reproduction

https://github.com/jrouviere/vitest-bench-bug
Just a simple minimal benchmark file, tested with Node v18.16.0:
vitest 0.31.1 works:
npm install -D vitest@0.31.1 && npx vitest bench --watch false

vitest 0.31.2 gets an exception:
npm install -D vitest@0.31.2 && npx vitest bench --watch false

DataCloneError: () => {
  var n;
  return typeof ((n = globalThis.process) == null ? void 0 : n.hrtime) == "function" ? P(Numbe...<omitted>...
} could not be cloned.
 ❯ new DOMException node:internal/per_context/domexception:53:5
 ❯ post node_modules/vitest/dist/worker.js:48:16
 ❯ node_modules/vitest/dist/vendor-index.5037f2c0.js:132:11
 ❯ sendCall node_modules/vitest/dist/vendor-index.5037f2c0.js:129:16
 ❯ node_modules/vitest/dist/vendor-rpc.4d3d7a54.js:50:18

System Info

System:
    OS: macOS 13.4
    CPU: (12) arm64 Apple M2 Pro
    Memory: 919.44 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.6.6 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.90
    Safari: 16.5
  npmPackages:
    vitest: ^0.31.2 => 0.31.2

Used Package Manager

npm

Validations

@gyhyfj
Copy link

gyhyfj commented Jun 20, 2023

Same problem

  • Operating System: Linux
  • Node Version: v18.16.0
  • Package Manager: pnpm@8.5.1
  • vitest: 0.32.2

@sheremet-va sheremet-va added this to the 0.32.3 milestone Jun 20, 2023
umajho added a commit to umajho/dicexp that referenced this issue Jun 27, 2023
由于 vitest 的 bug[^1],需要等到新版本才能执行 bench。
目前不能确定实现是否存在问题。

[^1]: vitest-dev/vitest#3538
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants