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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ngDevMode to tree shake error messages in pipes #40096
Comments
I don鈥檛 think these errors should be removed when not ngDevMode is false. Data can be non statically analysable such as from an API. In which case invalid value type should result in a meaningful and actionable errors. Although it does feel weird that we allow |
@alan-agius4 Hmm, would you mind to share how do you decide an error message should be thrown in production mode or not? I'm asking it to understand as I saw
Maybe. I also found it strange (because even the |
I thought Ivy now properly checks the type of pipes? angular/packages/common/src/pipes/case_conversion_pipes.ts Lines 32 to 35 in 884f743
The function will already scream at you during compilation for passing a wrong argument type. |
In this particular case |
Actually never mind, I just noticed that the check in
= and not triple.
So you are right 馃槉 |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
I think it should be safe to tree-shake away this error in prod mode (in all pipes within the @ramthir this looks similar to other changes you made recently. Please let us know if you might be interested in helping with this code? |
Great @AndrewKushnir, I'll raise a PR on this. 馃憤 |
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. |
馃殌 feature request
Description
Currently all the errors throwed by pipes are not being tree-shaked in production mode.
Relevant Package
@angular/common/(pipes)
Example:
angular/packages/common/src/pipes/case_conversion_pipes.ts
Lines 37 to 39 in 884f743
Describe the solution you'd like
I have seen that you made a lot of progress with
ngDevMode
, so I think it would be a case of using it for the purpose of making the package smaller.The text was updated successfully, but these errors were encountered: