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

build: run partial compilation tests with linker JIT #23882

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

devversion
Copy link
Member

@devversion devversion commented Nov 3, 2021

Runs partial compilation tests with the linker at JIT. This helps
validating the Angular linker to catch bugs as reported by Stackblitz
which relies on JIT compilation with its v1 non-webcontainer approach.

@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 3, 2021
@devversion devversion changed the title build: run partial compilation tests with linker at JIT build: run partial compilation tests with linker JIT Nov 3, 2021
@devversion devversion added blocked This issue is blocked by some external factor, such as a prerequisite PR merge safe target: patch This PR is targeted for the next patch release labels Nov 3, 2021
@devversion devversion marked this pull request as ready for review November 3, 2021 18:51
@devversion devversion requested review from jelbourn and a team as code owners November 3, 2021 18:51
@devversion
Copy link
Member Author

devversion commented Nov 3, 2021

Currently blocked until the fix from Pete for forwardRef partial compilation lands in framework.

petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 8, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 8, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 8, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 8, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 9, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 9, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 10, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
petebacondarwin added a commit to petebacondarwin/angular that referenced this pull request Nov 10, 2021
…ard references

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907
atscott pushed a commit to angular/angular that referenced this pull request Nov 10, 2021
…ard references (#44113)

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907

PR Close #44113
atscott pushed a commit to angular/angular that referenced this pull request Nov 10, 2021
…ard references (#44113)

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907

PR Close #44113
devversion added a commit to devversion/material2 that referenced this pull request Nov 11, 2021
…lation output

We updated to Angular v13.0.1 which fixes the partial compilation output
for `forwardRef` usages in queries. The fixed partial compilation output
will ensure that Angular CDK/Material works with JIT linking at runtime,
as done in e.g. Jest.

Fix upstream: angular/angular#44113.

We will add some testing for the JIT linker to the `angular/components`
repository with: angular#23882. That
should help ensuring JIT linking does not regress.

Fixes angular#23907.
devversion added a commit to devversion/material2 that referenced this pull request Nov 11, 2021
…lation output

Updates to Angular v13.0.1 which fixes the partial compilation output
for `forwardRef` usages in queries. The fixed partial compilation output
will ensure that Angular CDK/Material works with JIT linking at runtime,
as done in e.g. Jest.

Fix upstream: angular/angular#44113.

We will add some testing for the JIT linker to the `angular/components`
repository with: angular#23882. That
should help ensuring JIT linking does not regress.

Fixes angular#23907.
amysorto pushed a commit that referenced this pull request Nov 11, 2021
…lation output (#23951)

Updates to Angular v13.0.1 which fixes the partial compilation output
for `forwardRef` usages in queries. The fixed partial compilation output
will ensure that Angular CDK/Material works with JIT linking at runtime,
as done in e.g. Jest.

Fix upstream: angular/angular#44113.

We will add some testing for the JIT linker to the `angular/components`
repository with: #23882. That
should help ensuring JIT linking does not regress.

Fixes #23907.
amysorto pushed a commit that referenced this pull request Nov 11, 2021
…lation output (#23951)

Updates to Angular v13.0.1 which fixes the partial compilation output
for `forwardRef` usages in queries. The fixed partial compilation output
will ensure that Angular CDK/Material works with JIT linking at runtime,
as done in e.g. Jest.

Fix upstream: angular/angular#44113.

We will add some testing for the JIT linker to the `angular/components`
repository with: #23882. That
should help ensuring JIT linking does not regress.

Fixes #23907.

(cherry picked from commit 8cb0f12)
@devversion devversion removed the blocked This issue is blocked by some external factor, such as a prerequisite PR label Nov 11, 2021
@devversion devversion requested a review from crisbeto November 11, 2021 17:08
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Nov 16, 2021
AndrewKushnir pushed a commit to angular/angular that referenced this pull request Nov 16, 2021
…ard references (#44124)

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907

PR Close #44124
@zarend
Copy link
Contributor

zarend commented Nov 23, 2021

Hi @devversion 👋 , are we still trying to get this in :). LMK if we are, and I can try to merge it before merging other PR's that touch the same files to avoid a conflict.

@devversion
Copy link
Member Author

@zarend Yeah, thx for the heads-up. I will rebase it and let you know! I think this shouldn't conflict anytime soon again

Runs partial compilation tests with the linker at JIT. This helps
validating the Angular linker to catch bugs as reported by Stackblitz
which relies on JIT compilation with its v1 non-webcontainer approach.
@devversion devversion added the P2 The issue is important to a large percentage of users, with a workaround label Nov 28, 2021
@wagnermaciel wagnermaciel merged commit 1ca8a78 into angular:master Dec 3, 2021
wagnermaciel pushed a commit that referenced this pull request Dec 3, 2021
Runs partial compilation tests with the linker at JIT. This helps
validating the Angular linker to catch bugs as reported by Stackblitz
which relies on JIT compilation with its v1 non-webcontainer approach.

(cherry picked from commit 1ca8a78)
dimakuba pushed a commit to dimakuba/angular that referenced this pull request Dec 28, 2021
…ard references (angular#44113)

When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See angular/components#23882 and angular/components#23907

PR Close angular#44113
@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 3, 2022
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 cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants