Skip to content

feat(compiler-cli): JIT compilation of directive declarations #40101

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

Closed
wants to merge 5 commits into from

Conversation

JoostK
Copy link
Member

@JoostK JoostK commented Dec 13, 2020

The ɵɵngDeclareDirective calls are designed to be translated to fully
AOT compiled code during a build transform, but in cases this is not
done it is still possible to compile the declaration object in the
browser using the JIT compiler. This commit adds a runtime
implementation of ɵɵngDeclareDirective which invokes the JIT compiler
using the declaration object, such that a compiled directive definition
is made available to the Ivy runtime.

@JoostK JoostK added target: minor This PR is targeted for the next minor release compiler: linker labels Dec 13, 2020
@google-cla google-cla bot added the cla: yes label Dec 13, 2020
@JoostK JoostK force-pushed the linker/directive_jit branch from a4eae7d to 58b0e29 Compare December 13, 2020 20:07
@JoostK JoostK marked this pull request as ready for review December 15, 2020 12:24
@JoostK JoostK added the action: review The PR is still awaiting reviews from at least one requested reviewer label Dec 15, 2020
@pullapprove pullapprove bot requested a review from mhevery December 15, 2020 12:24
@pullapprove pullapprove bot added area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 15, 2020
@ngbot ngbot bot modified the milestone: Backlog Dec 15, 2020
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first pass looks great! I'll check it fully tomorrow morning.
Nice work with the tests. I think they are sufficient.

@JoostK JoostK force-pushed the linker/directive_jit branch from 58b0e29 to 74c3d59 Compare December 15, 2020 19:59
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a couple of suggestions. Will approve once the tests are passing.

@JoostK JoostK force-pushed the linker/directive_jit branch 2 times, most recently from 6ce2b56 to ff22db0 Compare December 17, 2020 20:05
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that the CI agrees.

@petebacondarwin petebacondarwin added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Dec 17, 2020
The `ɵɵngDeclareDirective` calls are designed to be translated to fully
AOT compiled code during a build transform, but in cases this is not
done it is still possible to compile the declaration object in the
browser using the JIT compiler. This commit adds a runtime
implementation of `ɵɵngDeclareDirective` which invokes the JIT compiler
using the declaration object, such that a compiled directive definition
is made available to the Ivy runtime.
@JoostK JoostK force-pushed the linker/directive_jit branch from 20112e0 to f55f899 Compare December 22, 2020 21:04
Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really clean. Have an LGTM cookie. 🍪

@jessicajaniuk jessicajaniuk removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Dec 22, 2020
@JoostK JoostK added the action: merge The PR is ready for merge by the caretaker label Dec 22, 2020
@JoostK JoostK removed the request for review from mhevery December 22, 2020 23:01
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime cla: yes compiler: linker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants