-
Notifications
You must be signed in to change notification settings - Fork 12k
fix(angularCompilerPlugin): respect noEmitOnError compiler's option when checking for typescript errors #15199
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
Conversation
…ript errors Currently noEmitOnError compiler's option is not respected when executing typescript program. In case when noEmitOnError is false and there are compilation errors in project, no .js files are emitted. However, in this case .js files should be emitted. In case when noEmitOnError is true and there are compilation errors in project, `.js` files should not be emitted.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
This behavior is intentional and the option is always disabled within the plugin. See: |
Hi @clydin, Why did you close this?You are referring a code which sets the However, as @Fatme described in this PR, you have manual errors check and the AngularCompilerPlugin does NOT emit any Am I getting something wrong or you've just read only the title and didn't review the changes at all? |
Please be aware that disrespectful and/or unprofessional language is a violation of the code of conduct by which this and all other projects within the organization abide. This is closed because the current behavior is intentional. Adding broken code to the bundling pipeline can cause a cascade of errors that are confusing and difficult to diagnose. Further the link to the code also demonstrated that the change within this PR will cause code to always be emitted regardless of the value set in the project's tsconfig or the presence of errors as it is hard coded to be false. |
Thanks for the fast and more detailed comment! I'm sorry you've felt disrespected, I just didn't get the connection between your answer and the PR content. It looks like we will have to accept this as a known Limitation of the plugin but I believe that not emitting any What do you think about overriding this behavior through the AngularCompilerPlugin options? For example something like: new AngularCompilerPlugin({
...
emitOnTsError: true
}); |
Every additional option adds a long-term sustainment cost in both time and resources. In this case, the team believes that correcting any errors within the application would be the more beneficial and prudent action in both the short and long term. However, if a compelling use case for this behavior is presented, a change in direction would be considered. |
Thanks for the detailed statement! We will consider opening another PR with more details and use cases. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently noEmitOnError compiler's option is not respected when executing typescript program. In case when noEmitOnError is false and there are compilation errors in project, no .js files are emitted. However, in this case .js files should be emitted.
In case when noEmitOnError is true and there are compilation errors in project,
.js
files should not be emitted.