- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 362
The npm module should work on CodeSandbox #864
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
Comments
I wonder if this is a GopherJS bug, because we don't really control what JS code gets produced when transpiling. Also, if WASM is an option, perhaps try https://github.com/rx-ts/sh-syntax. It does not use GopherJS, so it potentially sidesteps this bug. cc @JounQin |
It seems the reproduction is using |
Workaround: delete See https://codesandbox.io/s/tty-demo-1-forked-d6xg0p?file=/src/sh/parse/parse.service.ts |
Also, there is also a fix in gopherjs gopherjs/gopherjs#1117 which has not been released. |
@JounQin thanks for looking into it. Great that there's a GopherJS fix in the works already. Generally speaking, it would be nice to have a bunch of CodeSandbox links demoing |
I want to use version
I guess I'll just wait for a fix. |
Apologies for the slowness here. The reality is that I don't have the time to properly maintain a JS port of this shell library, or to learn enough JS to be a good steward for it. Moreover, I built mvdan-sh on top of GopherJS, which is still somewhat maintained, but is struggling to support the latest versions of Go - which this library uses. The good news is that someone else built a new JS library on top op of this one, which is actively maintained and uses WASM instead of GopherJS, seemingly bringing a speed-up of over 4x: https://github.com/un-ts/sh-syntax I'd suggest that you give that a try, and re-raise any issues on that repo if they are still relevant. For now, given that I don't intend to further develop mvdan-sh, I am closing existing issues and deleting the code, but leaving notes in the README and the npm package's page so that any users get pointed in the right direction. For more, see #1145. Thanks for understanding :) |
I have a demo using
[email protected]
working on CodeSandbox.But I had to comment out two similar lines:
Otherwise, I see
runtime error: makeslice: len out of range
.It is reproducible by switching the imports back in CodeSandbox link:
The error occurs simply by importing the module, and also occurs for
[email protected]
.The text was updated successfully, but these errors were encountered: