feat: report error when failure in creating program#356
feat: report error when failure in creating program#356camc314 merged 2 commits intooxc-project:mainfrom
Conversation
How to use the Graphite Merge QueueAdd the label 0-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
thanks for looking at this. Just as a heads up, the non-headless entry points isn't maintained, and isn't recommended to be used. oxlint-tsgolint should be called via oxlint |
|
Yeah, and I understand it. However, when calling the oxlint via --type-aware, It would result to "failed to parse" the "null" value; after removing the wrong field in tsconfig this error disappears, so I assume it's related. Hence, there might be a way to report this (failed to create program) to oxlint side, on the other hamd. |
can you share your versions of oxlint and tsgolint. it should report a diagnostic if this happens not crash |
|
oxlint: ^1.24.0 It simply failed to parse the tsgolint result (null) — it crashes on the Rust side while serializing. Its result: |
5dde6b1 to
b1cdf57
Compare
Update to 1.25.0, and the issue should be fixed |
|
Yeah. In |
74d1602 to
3927c3f
Compare
The error in the next release is much better. this was just a first pass. https://x.com/Cameron_C2/status/1985342808916455739 |
When
tsgofails to parse thetsconfig, it displays an error and, if fatal, returnsnilwhen creating the program. However, we didn't implement it, leading to a segfault.The
tsgoreports:I added the logic to handle the TypeScript error, but I'm new to Go and don't have a clear idea of how those modules work. I wanted to implement a diagnostic report similar to the lint result, but I couldn't successfully understand it.
Now it looks like:
If there are any problems, I'm happy to fix!