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

Secondary resolveId calls on virtual modules #6406

Open
6 tasks done
epfremmer opened this issue Aug 26, 2024 · 0 comments
Open
6 tasks done

Secondary resolveId calls on virtual modules #6406

epfremmer opened this issue Aug 26, 2024 · 0 comments

Comments

@epfremmer
Copy link

Describe the bug

The resolveId method on plugins which return a virtual module is called a second time with the previously resolved module id. It seems odd this would happen which made me question if this the intended behavior?

This came up while troubleshooting import errors using the plugin from lezer-parser/generator which uses virtual modules to load *.grammar.terms imports. I've opened an issue there (lezer-parser/generator#21), but the question that this may be a bug in vitest was raised in that discussion.

Thank you for any assistance & guidance you can provide ❤️

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-yzpqjh?file=README.md

System Info

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.63 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.volta/tools/image/node/18.18.2/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 9.8.1 - ~/.volta/tools/image/node/18.18.2/bin/npm
    pnpm: 8.15.6 - /opt/homebrew/bin/pnpm
    Watchman: 2024.04.08.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 128.0.6613.84
    Safari: 17.6
  npmPackages:
    vitest: 2.0.5 => 2.0.5

Used Package Manager

npm

Validations

@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2024
@vitest-dev vitest-dev locked as spam and limited conversation to collaborators Aug 26, 2024
@vitest-dev vitest-dev unlocked this conversation Aug 26, 2024
@sheremet-va sheremet-va reopened this Aug 26, 2024
@github-staff github-staff deleted a comment from mabhi02 Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@epfremmer @sheremet-va and others