-
Notifications
You must be signed in to change notification settings - Fork 31
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
TS bindings break on .scip files generated by rust-analyzer #274
Comments
The SCIP CLI written in Go is able to parse the file just fine, and the generated code is not that complex, so I suspect it's likely a bug in one of:
E.g. I found this issue which has a similar flavor. webpack/webpack#9210 Can you provide a minimal repo with appropriate package.json etc to reproduce? It would also be helpful to provide a stack trace that doesn't involve minified code. |
Thank you for reporting! What version of google-protobuf are you using? The stack trace does not seem seem related to the scip.ts file itself. I recall hitting on runtime errors in google-protobuf when working on scip-typescript that I resolved by downgrading (can't remember exact version, and didn't find the related commit after a brief search). It might be worth trying a few different versions so see if that works around the issue. An alternative workaround is to experiment with protoc-gen-es instead of protoc-gen-ts. I pushed a branch that generates the code here https://github.com/sourcegraph/scip/compare/olafurpg/connect-es?expand=1 I think |
I came here to report this as well -- I ran into the same issue, which persisted after updating There was also a new version of |
@olafurpg I tried a few different versions of google-protobuf, but I created an example of the error using the latest version (3.21.2) here: https://github.com/ephraimrothschild/example-scip-ts-error You can reproduce the error by running example_working creates a scip file with scip-python, and then tries to parse it with the TS bindings, and example_not_working creates a scip file with rust-analyzer and then tries to parse it in exactly the same way and fails. |
@ephraimrothschild thank you for the minimized reproduction! That is very helpful. I'm able to reproduce the error with I've dealt with enough cryptic errors from |
I don't know if this should be here, or in the rust-analyzer repo, but something appears incompatible between the two of them. After generating an index using
rust-analyzer scip .
(using any version ofrust-analyzer
, and any rust repo), the Typescript bindings fail to parse that index. For example, the following tsx script:Running
./testscript.ts ./index.scip
Will cause the following error:
This does not seem to happen with other indexers (eg running this on an
index.scip
file generated from scip-python, and scip-java do not result in this error, but this occurs no matter which version of rust-analyzer is used). The scip.ts file used is copied directly from sourcegraph/scip/bindings/scip.tsThe text was updated successfully, but these errors were encountered: