Skip to content
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

feat(compiler-cli): JIT compilation of component declarations #40127

Closed
wants to merge 3 commits into from

Conversation

JoostK
Copy link
Member

@JoostK JoostK commented Dec 15, 2020

The ɵɵngDeclareComponent 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 ɵɵngDeclareComponent which invokes the JIT compiler
using the declaration object, such that a compiled component definition
is made available to the Ivy runtime.

@JoostK JoostK added state: WIP area: compiler Issues related to `ngc`, Angular's template compiler target: minor This PR is targeted for the next minor release compiler: linker labels Dec 15, 2020
@ngbot ngbot bot added this to the Backlog milestone Dec 15, 2020
@google-cla google-cla bot added the cla: yes label Dec 15, 2020
@JoostK JoostK added this to In progress in ng-linker via automation Dec 15, 2020
@JoostK JoostK force-pushed the linker/components_jit branch 5 times, most recently from 557e067 to e685467 Compare December 18, 2020 22:03
@google-cla
Copy link

google-cla bot commented Dec 18, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Dec 18, 2020
@google-cla google-cla bot added cla: yes and removed cla: no labels Dec 23, 2020
@JoostK JoostK marked this pull request as ready for review December 23, 2020 19:14
@pullapprove pullapprove bot added area: core Issues related to the framework runtime area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) labels Dec 23, 2020
@JoostK JoostK added action: review The PR is still awaiting reviews from at least one requested reviewer and removed area: core Issues related to the framework runtime area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) state: WIP labels Dec 23, 2020
@pullapprove pullapprove bot added the area: core Issues related to the framework runtime label Dec 23, 2020
@pullapprove pullapprove bot added the area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) label Dec 23, 2020
@JoostK JoostK requested review from petebacondarwin and removed request for atscott December 23, 2020 19:14
@pullapprove pullapprove bot requested a review from atscott December 23, 2020 19:14
@JoostK JoostK moved this from In progress to Review in progress in ng-linker Dec 23, 2020
Copy link
Member

@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.

Another marvellous PR @JoostK - just a couple of nits and bike-sheds.

packages/compiler/src/render3/view/compiler.ts Outdated Show resolved Hide resolved
packages/compiler/src/render3/partial/component.ts Outdated Show resolved Hide resolved
packages/compiler/src/render3/view/api.ts Outdated Show resolved Hide resolved
packages/compiler/src/jit_compiler_facade.ts Outdated Show resolved Hide resolved
packages/compiler/src/jit_compiler_facade.ts Outdated Show resolved Hide resolved
@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 25, 2020
Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

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

reviewed-for: fw-core

Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Reviewed-for: dev-infra

@JoostK JoostK added action: merge The PR is ready for merge by the caretaker action: presubmit The PR is in need of a google3 presubmit and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 28, 2020
@JoostK JoostK moved this from Review in progress to Reviewer approved in ng-linker Dec 28, 2020
Copy link
Member

@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.

L even better TM

The `render3` test targets are currently also executed for ViewEngine
builds, even though the `render3` infrastructure only concerns Ivy
infrastructure. This commit tags the test targets as ivy-only to disable
those tests for View Engine.
The `ɵɵngDeclareComponent` 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 `ɵɵngDeclareComponent` which invokes the JIT compiler
using the declaration object, such that a compiled component definition
is made available to the Ivy runtime.
josephperrott pushed a commit that referenced this pull request Jan 6, 2021
The `ɵɵngDeclareComponent` 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 `ɵɵngDeclareComponent` which invokes the JIT compiler
using the declaration object, such that a compiled component definition
is made available to the Ivy runtime.

PR Close #40127
ng-linker automation moved this from Reviewer approved to Done Jan 6, 2021
JoostK added a commit to JoostK/angular that referenced this pull request Jan 7, 2021
…ction name

The "monitoring" workflow is has been failing since angular#40127 was merged,
due to a Saucelabs test failure in Internet Explorer 11. The issue is
with the test's expectation which does not account for Ivy instruction
invocations to use "anonymous" instead of the instruction's function
name. This commit changes the test expectation to also accept
"anonymous", which was already the case for similar expectations.
JoostK added a commit to JoostK/angular that referenced this pull request Jan 7, 2021
…ction name

The "monitoring" workflow has been failing since angular#40127 was merged,
due to a Saucelabs test failure in Internet Explorer 11. The issue is
with the test's expectation which does not account for Ivy instruction
invocations to use "anonymous" instead of the instruction's function
name. This commit changes the test expectation to also accept
"anonymous", which was already the case for similar expectations.
atscott pushed a commit that referenced this pull request Jan 7, 2021
…ction name (#40342)

The "monitoring" workflow has been failing since #40127 was merged,
due to a Saucelabs test failure in Internet Explorer 11. The issue is
with the test's expectation which does not account for Ivy instruction
invocations to use "anonymous" instead of the instruction's function
name. This commit changes the test expectation to also accept
"anonymous", which was already the case for similar expectations.

PR Close #40342
@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 Feb 6, 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 action: presubmit The PR is in need of a google3 presubmit area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) cla: yes compiler: linker target: minor This PR is targeted for the next minor release
Projects
No open projects
ng-linker
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants