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
fix(ivy): ngtsc program emit ignoring custom transformers #27837
Conversation
You can preview 1877bd5 at https://pr27837-1877bd5.ngbuilds.io/. |
[ivyTransformFactory(this.compilation !, this.reflector, this.coreImportsFrom)]; | ||
const afterTransforms = customTransforms && customTransforms.afterTs || []; |
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.
Nit: I don’t think that || []
is required here as you should be able to pass undefined to emitCallback
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 @crisbeto. LGTM.
1877bd5
to
5edba41
Compare
You can preview 5edba41 at https://pr27837-5edba41.ngbuilds.io/. |
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.
Any way to test this?
I couldn't find any tests for reference @petebacondarwin. The |
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.
All of the ones should have tests.
@alxhub can you suggest how to write some tests for this? |
Fixes the `customTransformers` that are passed to the `NgtscProgram.emit` not being passed along.
5edba41
to
1bee7c4
Compare
You can preview 1bee7c4 at https://pr27837-1bee7c4.ngbuilds.io/. |
@petebacondarwin @mhevery I've added a unit test. Can you take another look? |
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.
This test works for me.
BTW normally I would have added this test as a fixup commit to the PR, to make it easier to review. I appreciate that it doesn't make much difference in this case. But I wanted to check that you are onboard with that approach of adding to PRs after review.
Of course, I wasn't aware that it was the convention. On the angular/material2 repo we usually keep squashing it into the initial commit. |
No problem. Fixup commits work well in this repo because the caretaker script will automatically squash them at merge time. |
) Fixes the `customTransformers` that are passed to the `NgtscProgram.emit` not being passed along. PR Close angular#27837
) Fixes the `customTransformers` that are passed to the `NgtscProgram.emit` not being passed along. PR Close angular#27837
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. |
Fixes the
customTransformers
that are passed to theNgtscProgram.emit
not being passed along to the emit callback.