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
perf(core): use ngDevMode
to tree-shake error messages
#38612
perf(core): use ngDevMode
to tree-shake error messages
#38612
Conversation
f2e6af3
to
a39e786
Compare
a39e786
to
e2247cc
Compare
566468b
to
a960a41
Compare
ngDevMode
to tree-shake error messagesngDevMode
to tree-shake error messages
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 making this changes @sonukapoor 👍
The changes LGTM, I just have a quick note on commit message:
- I think we should remove a reference to the
r3_injector
, sinceshared.ts
is also updated - Let's mention that these assertions are dev-mode-only, so adding
ngDevMode
will help tree-shake they away for production builds (in dev mode everything will work as it works now)
I also think it'd be great if @mhevery can have a quick look (I've added him as a reviewer) to check if it's safe to tree-shake these errors.
Thank you.
Thanks, @AndrewKushnir - I will make the commit messages changes. In the meanwhile, can you run a presubmit? |
Sure, I've started a new presubmit and will keep you updated once I get the results. Thank you. |
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.
Reviewed-for: size-tracking
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.
Reviewed-for: size-tracking
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.
LGTM
a960a41
to
aa01b6a
Compare
This commit adds `ngDevMode` guard to throw some errors only in dev mode (similar to how things work in other parts of Ivy runtime code). The `ngDevMode` flag helps to tree-shake these error messages from production builds (in dev mode everything will work as it works right now) to decrease production bundle size.
aa01b6a
to
6caecbe
Compare
This commit adds `ngDevMode` guard to throw some errors only in dev mode (similar to how things work in other parts of Ivy runtime code). The `ngDevMode` flag helps to tree-shake these error messages from production builds (in dev mode everything will work as it works right now) to decrease production bundle size. PR Close #38612
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. |
This commit adds
ngDevMode
guard to throw some errors only in dev mode(similar to how things work in other parts of Ivy runtime code). The
ngDevMode
flag helps to tree-shake these error messages from productionbuilds (in dev mode everything will work as it works right now) to decrease
production bundle size.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?