-
Notifications
You must be signed in to change notification settings - Fork 70
fix: force noEmitOnError: false
#338
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
Merged
ezolenko
merged 1 commit into
ezolenko:master
from
agilgur5:fix-force-noEmitOnError-false
Jun 1, 2022
Merged
fix: force noEmitOnError: false
#338
ezolenko
merged 1 commit into
ezolenko:master
from
agilgur5:fix-force-noEmitOnError-false
Jun 1, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- `noEmitOnError: true` acts like `noEmit: true` when there is an error
- this is problematic because it will then cause _all_ files to have
`emitSkipped` set to `true`, which this plugin interprets as a fatal
error
- meaning it will treat the first file it finds as having a fatal
error and then abort, but possibly without outputting any
diagnostics what-so-ever as the file with the error in it may not
yet have run through the `transform` hook
- i.e. an initial file that imports an erroring file at some point
in its import chain will cause rpt2 to abort, even if that
initial file _itself_ has no type-check/diagnostic issues
- bc TS does whole-program analysis after all
- this has only been reported as an issue once so far, probably because
it defaults to `false` in TS and, as such, is rarely used:
https://www.typescriptlang.org/tsconfig#noEmitOnError
- we usually have the opposite issue, people trying to set it to
`false` (i.e. the default) because they don't realize the
`abortOnError` option exists
- add `noEmitOnError: false` to the forced options list and tests too
- add it to the docs on what tsconfig options are forced
- and add a reference to the issue like the existing options
- also reference `abortOnError` since they're commonly associated with
each other and that plugin option is often missed (per above)
- briefly explain that `noEmit` and `noEmitOnError` are `false` because
Rollup controls emit settings in the context of this plugin, instead
of `tsc` etc
- should probably watch out for when new emit settings are added to
TS, as we may want to force most with the same reasoning
This was referenced Jun 1, 2022
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind: bug
Something isn't working properly
topic: TS Compiler API Docs
Related to the severely lacking TS Compiler API Docs
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Force
noEmitOnError: falsefor the same reason we forcenoEmit: falsefailed to transpileerror --noEmitOnError: truebreaks rpt2 #254Details
noEmitOnError: trueacts likenoEmit: truewhen there is an erroremitSkippedset totrue, which this plugin interprets as a fatal errortransformhookthis has only been reported as an issue once so far, probably because it defaults to
falsein TS and, as such, is rarely usedfalse(i.e. the default) because they don't realize theabortOnErroroption exists (c.f.noEmitOnError: falseseems to be ignored -- use plugin optionabortOnError#62 and its duplicates)add
noEmitOnError: falseto the forced options list and tests tooadd it to the docs on what tsconfig options are forced
abortOnErrorsince they're commonly associated with each other and that plugin option is often missed (per above)briefly explain that
noEmitandnoEmitOnErrorarefalsebecause Rollup controls emit settings in the context of this plugin, instead oftscetcCan see more details in my root cause analysis in #254 (comment)
Related feature request: #168