Skip to content

fix(ivy): platform module bootstrap does not resolve resources #29083

Closed
devversion wants to merge 2 commits into
angular:masterfrom
devversion:fix/ivy-component-resources-not-resolved-in-jit-mode
Closed

fix(ivy): platform module bootstrap does not resolve resources #29083
devversion wants to merge 2 commits into
angular:masterfrom
devversion:fix/ivy-component-resources-not-resolved-in-jit-mode

Conversation

@devversion

Copy link
Copy Markdown
Member
  • See individual commits.

@devversion devversion force-pushed the fix/ivy-component-resources-not-resolved-in-jit-mode branch 5 times, most recently from a0e4954 to b5dd77a Compare March 4, 2019 17:42
@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release comp: ivy labels Mar 4, 2019
@ngbot ngbot Bot added this to the needsTriage milestone Mar 4, 2019
@devversion devversion marked this pull request as ready for review March 4, 2019 19:25
@devversion devversion requested review from a team March 4, 2019 19:25
Currently with ViewEngine, if someone runs the platform's
`bootstrapModule` method in order to boostrap a module in
JIT mode, external component resources are properly resolved
*automatically*.

Currently with Ivy, the developer would need to manually call
`resolveComponentResources` in order to asynchronously fetch
the determined external component resources. In order to make
this backwards compatible with ViewEngine, and also since
platforms can already specify a `ResourceLoader` compiler
provider, we need to automatically resolve all external
component resources on module bootstrap.

--

Since the `ResourceLoader` is part of the `@angular/compiler`,
because ViewEngine performed the factory creation in the compiler,
we can't access the `ResourceLoader` token from within core.

In order to workaround this without introducing a breaking change,
we just proxy the `ResourceLoader` token to `core` through the
compiler facade. In the future, we should be able to move the
`ResourceLoader` to core when ViewEngine code no longer exists in
the `@angular/compiler`.
With 63fb6c08cf1d69f912a0a4e9a28846d6e6985d04, the bug that required
us to temporarily disable these two SystemJS JIT tests has been fixed.

Therefore we can re-enable these tests.
@devversion devversion force-pushed the fix/ivy-component-resources-not-resolved-in-jit-mode branch from b5dd77a to e97655c Compare March 4, 2019 19:29
Comment thread packages/core/src/application_ref.ts

@gkalpak gkalpak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM for docs-infra 😁

@devversion devversion requested a review from alxhub March 7, 2019 09:56
@devversion devversion 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: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 12, 2019
@kara kara unassigned alxhub Mar 12, 2019
@kara

kara commented Mar 12, 2019

Copy link
Copy Markdown
Contributor

presubmit

@kara kara added target: major This PR is targeted for the next major release and removed action: presubmit The PR is in need of a google3 presubmit target: patch This PR is targeted for the next patch release labels Mar 12, 2019
@kara

kara commented Mar 12, 2019

Copy link
Copy Markdown
Contributor

@devversion Could you create a separate PR for patch? Not merging cleanly

@kara kara closed this in 6085f33 Mar 12, 2019
kara pushed a commit that referenced this pull request Mar 12, 2019
With 63fb6c08cf1d69f912a0a4e9a28846d6e6985d04, the bug that required
us to temporarily disable these two SystemJS JIT tests has been fixed.

Therefore we can re-enable these tests.

PR Close #29083
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
…ar#29083)

Currently with ViewEngine, if someone runs the platform's
`bootstrapModule` method in order to boostrap a module in
JIT mode, external component resources are properly resolved
*automatically*.

Currently with Ivy, the developer would need to manually call
`resolveComponentResources` in order to asynchronously fetch
the determined external component resources. In order to make
this backwards compatible with ViewEngine, and also since
platforms can already specify a `ResourceLoader` compiler
provider, we need to automatically resolve all external
component resources on module bootstrap.

--

Since the `ResourceLoader` is part of the `@angular/compiler`,
because ViewEngine performed the factory creation in the compiler,
we can't access the `ResourceLoader` token from within core.

In order to workaround this without introducing a breaking change,
we just proxy the `ResourceLoader` token to `core` through the
compiler facade. In the future, we should be able to move the
`ResourceLoader` to core when ViewEngine code no longer exists in
the `@angular/compiler`.

PR Close angular#29083
wKoza pushed a commit to wKoza/angular that referenced this pull request Apr 17, 2019
With 63fb6c08cf1d69f912a0a4e9a28846d6e6985d04, the bug that required
us to temporarily disable these two SystemJS JIT tests has been fixed.

Therefore we can re-enable these tests.

PR Close angular#29083
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Sep 14, 2019
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 target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants