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

Handle compiler diagnostics in Rust. #2445

Merged
merged 4 commits into from
Jun 4, 2019
Merged

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Jun 3, 2019

Resolves #1738

Replaces #2310

This PR is a more simplified approach to dealing with diagnostics. It only touches the cli in Rust.

It doesn't touch any of the JSError code, which means it doesn't align it to the TypeScript style of output. There is a trait though in cli/diagnostic.ts called DisplayFormatter which could be moved into core and simplify the logic of formatting the parts of a JSError to align the TypeScript style, which could be tackled as a seperate PR.

@kitsonk kitsonk mentioned this pull request Jun 3, 2019
4 tasks
@kitsonk kitsonk force-pushed the rust-diagnostics branch 2 times, most recently from bd5acec to b59d403 Compare June 3, 2019 11:46
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice clean up!

js/compiler.ts Show resolved Hide resolved
cli/diagnostics.rs Outdated Show resolved Hide resolved
cli/diagnostics.rs Show resolved Hide resolved
cli/diagnostics.rs Show resolved Hide resolved
cli/diagnostics.rs Show resolved Hide resolved
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - just a few nits and loose ends - otherwise I'm ready to land.

@kitsonk kitsonk force-pushed the rust-diagnostics branch from b59d403 to 4fc69b1 Compare June 4, 2019 02:24
@kitsonk
Copy link
Contributor Author

kitsonk commented Jun 4, 2019

@ry I think all the feedback has been addressed.

@kitsonk
Copy link
Contributor Author

kitsonk commented Jun 4, 2019

Actually I need to upgrade prettier it looks like. It needs to be running on 3.4 TypeScript, because I had to use some new 3.4 syntax to get some of the code to work, and prettier doesn't like it.

@kitsonk kitsonk force-pushed the rust-diagnostics branch from 19590b7 to 8977c3f Compare June 4, 2019 04:50
@kitsonk
Copy link
Contributor Author

kitsonk commented Jun 4, 2019

Ok, finally, should be all fixed now.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ry ry merged commit a71305b into denoland:master Jun 4, 2019
@kitsonk kitsonk deleted the rust-diagnostics branch August 2, 2022 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle TypeScript Diagnostics like V8 Syntax errors in Rust
3 participants