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

fix(jsii): show jsii diagnostics in watch mode and support $tsc problem matcher #383

Merged
merged 3 commits into from
Mar 13, 2019

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Mar 13, 2019

Emit jsii diagnostics error when in watch mode, and also format the errors with a
"TS9999" error code so that VSCode's $tsc problem matcher will show them as
"Problems". Prefix "JSII" in the message to distinguish that these are jsii errors.

Fixes #382

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…em matcher

Emit jsii diagnostics error when in watch mode, and also format the errors with a
"TS9999" error code so that VSCode's $tsc problem matcher will show them as
"Problems". Prefix "JSII" in the message to distinguish that these are jsii errors.

Fixes #382
@eladb eladb requested a review from a team as a code owner March 13, 2019 13:24
@eladb eladb changed the title fix(jsii): show jsii diagnostics in watch mode and support $tsc probl… fix(jsii): show jsii diagnostics in watch mode and support $tsc problem matcher Mar 13, 2019
const message = diagnostic.file
? ts.formatDiagnosticsWithColorAndContext([diagnostic], formatDiagnosticsHost)
: ts.formatDiagnostics([diagnostic], formatDiagnosticsHost);
// if (hasDomain(diagnostic)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just drop that :)

@eladb eladb merged commit 0275944 into master Mar 13, 2019
@eladb eladb deleted the benisrae/watch-diagnostics branch March 13, 2019 13:55
eladb pushed a commit that referenced this pull request Apr 8, 2019
In #383 we modified the compiler to continue jsii validation despite
compilation errors but did not propagate the fact that there were
compilation errors.

This resulted in "jsii" exiting with a 0 exit code even in case
of errors.

Fixes #441
eladb pushed a commit that referenced this pull request Apr 8, 2019
In #383 we modified the compiler to continue jsii validation despite
compilation errors but did not propagate the fact that there were
compilation errors.

This resulted in "jsii" exiting with a 0 exit code even in case
of errors.

Fixes #441
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.

jsii diagnostics are not emitted in "watch" mode
3 participants