-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
Output compilerOption Diagnostics #191
Conversation
packages/typescript/test/fixtures/invalid-compiler-options/tsconfig.json
Outdated
Show resolved
Hide resolved
); | ||
|
||
t.true( | ||
err.message.includes('Composite projects may not disable declaration emit'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we override this flag too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add composite
to our list of overridden compiler options if it causes an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree - I think this is best done in a separate PR however(although if you want it done in this one too, I'm happy to do it)
It seems ideal to output compilerOptions errors, regardless of the overridden compiler options - Future typescript versions may introduce new compilerOption errors.
(And thinking about it, when I do this in a separate PR, it'll break this test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
@samcooke98 apologies that this one sat so long. Any chance you'd be willing to address the conflicts and failing CI? |
No worries, it's my bad too, it slipped off my radar. I'll try to get to it this weekend (ie within the next 3 days) |
@samcooke98 we had some CI shenanigans going that were fixed up today. Please do a merge from master and push and it should start passing. |
Just tested this with Will close now (Sorry I forgot about this PR) |
Rollup Plugin Name:
Typescript
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Typescript Rollup didn't output compiler options diagnostics. The most obvious case where this fails is when the supplied tsconfig leaves
composite: true
. (as declaration is ignored by rollup plugin)Previously, the plugin would fail silently, and print no detail about why it failed.
By adding the
services.getCompilerOptionsDiagnostics()
call the plugin will emit reasons for the failure.