-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
pnp: esbuild-wasm@0.15.1
panics when bundling a Yarn PnP project
#2458
Comments
I'm looking into this. As far as I can tell, the problem is likely the result of the interaction between Go's file system implementation (which uses |
I believe the problem is caused by yarnpkg/berry#374, which introduced file descriptors with the high bit set. Go's file descriptor internals does not like file descriptors with the high bit set. They turn into null pointers internally, which then cause issues like this. This makes sense because the
Since Yarn is returning invalid values as file descriptors without indicating an error, this seems like a problem with Yarn, not with esbuild. |
I dig a bit and, while the high bit set is a problem, I think the true cause lies elsewhere - specifically in how Go implements the I'm not sure why they do this check rather than let the filesystem decide whether the call is valid, but it highlights a problem we had a few years ago: zip archives being both files and directories, it's not clear whether But since we had to pick a side, and we wanted to avoid third-party packages to accidentally recurse within zip files (which would have been slow), we went with representing them as files, except that they accept any directory syscall, and their file contents are also files. Anyway, the |
Indeed, fixed upstream in yarnpkg/berry#4737, thanks for looking into this!
|
esbuild-wasm@0.15.1
panics when bundling a Yarn PnP projectesbuild-wasm@0.15.1
panics when bundling a Yarn PnP project
Describe the bug
When using
esbuild-wasm@0.15.1
to bundle a Yarn PnP project it panics with the following error:Ref yarnpkg/berry#4732
To Reproduce
The text was updated successfully, but these errors were encountered: