Skip to content

Update Angular CLI ivy tests - #28372

Closed
filipesilva wants to merge 6 commits into
angular:masterfrom
filipesilva:cli-ivy-updates
Closed

filipesilva wants to merge 6 commits into
angular:masterfrom
filipesilva:cli-ivy-updates

Conversation

@filipesilva

@filipesilva filipesilva commented Jan 25, 2019 •

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

This PR updates the versions of Angular CLI and Build Optimizer used in Angular tests.

The updated versions contain improvements in code optimization that enable smaller bundle sizes with Ivy on Angular CLI and Bazel projects.

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@filipesilva
filipesilva requested review from a team January 25, 2019 16:34
@filipesilva filipesilva added the target: major This PR is targeted for the next major release label Jan 25, 2019
@filipesilva
filipesilva requested a review from gkalpak January 25, 2019 16:36
@cexbrayat

Copy link
Copy Markdown
Member

@filipesilva Dumb question: if this enables smaller bundles, shouldn't https://github.com/angular/angular/blob/master/integration/_payload-limits.json be updated with smaller numbers for cli-hello-world-ivy?

@filipesilva

Copy link
Copy Markdown
Contributor Author

@cexbrayat not a dumb question at all, but rather a very valid point I did not address. Thanks for a heads up!

@jasonaden jasonaden added the area: build & ci Related the build and CI infrastructure of the project label Jan 25, 2019
@ngbot ngbot Bot added this to the needsTriage milestone Jan 25, 2019
@filipesilva filipesilva changed the title build: update version of Angular CLI and Build Optimizer used for tests Update Angular CLI ivy tests Jan 28, 2019
Comment thread integration/_payload-limits.json Outdated

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.

Amazing work! 🎉

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

🎉

Comment thread integration/run_tests.sh Outdated

@gkalpak gkalpak Jan 28, 2019 •

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.

+ cli-hello-world-ivy

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@filipesilva
filipesilva requested a review from a team January 29, 2019 11:47
@mary-poppins

Copy link
Copy Markdown

You can preview a2e7fb6 at https://pr28372-a2e7fb6.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 9d7620e at https://pr28372-9d7620e.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview a943c32 at https://pr28372-a943c32.ngbuilds.io/.

@filipesilva
filipesilva requested a review from gkalpak January 29, 2019 14:15
@mary-poppins

Copy link
Copy Markdown

You can preview 82f3686 at https://pr28372-82f3686.ngbuilds.io/.

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

The permission changes (100755 --> 100644) in integration/cli-hello-world-ivy/debug-test.sh should be reverted (afaict).

Comment thread integration/_payload-limits.json Resolved

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.

cli-hello-world-ivy --> cli-hello-world-ivy-compat

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

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.

CliHelloWorldIvy --> CliHelloWorldIvyCompat

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

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.

cli-hello-world --> cli-hello-world-ivy

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

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.

Why not add a pipe 😉

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This integration test is meant to mimic https://github.com/angular/angular/tree/master/packages/core/test/bundling/hello_world and obtain similar sizes bundles. For that reason it doesn't have anything more than that app does.

I suppose this isn't clear because I have mentioned it exactly 0 times, and nothing in the test name reflects that either.

Maybe this test should be called cli-minimal-ivy-hello-world, WDYT? And reference that it's a version of that other one somewhere too.

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.

I see. It is definitely worth mentioning somewhere, because my general assumption is that cli-* projects in integration/ are sort of equivalent to each other (which would make much more sense imo, especially given that their tracked payload sizes are included side-by-side in the same JSON file).

But if this one must much the one in packages/, your suggestions SGTM.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed to cli-hello-world-ivy-minimal, added a note to the integration test README, and to the app main.ts.

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.

Why such a minimal template?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same answer as the pipe comment above.

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.

Maybe we could log a warning for now? Or is it safe to always return all lazy routes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wouldn't like a warning because there's no way to turn it off.

I think it's ok to always return all lazy routes but will confirm with the team.

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.

Suggested change
// Listing specific routes is unsupported for now.
// Listing specific routes is unsupported for now, so we erroneously
// return all lazy routes instead (which should be okay for the CLI's
// usage).

@mary-poppins

Copy link
Copy Markdown

You can preview 6dbcf85 at https://pr28372-6dbcf85.ngbuilds.io/.

@filipesilva

Copy link
Copy Markdown
Contributor Author

@gkalpak the permissions change should be gone now.

@mary-poppins

Copy link
Copy Markdown

You can preview cf3ecbc at https://pr28372-cf3ecbc.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview e513ab5 at https://pr28372-e513ab5.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 778bea7 at https://pr28372-778bea7.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 5507426 at https://pr28372-5507426.ngbuilds.io/.

@gkalpak gkalpak added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 2, 2019

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

👌

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.

CliHelloWorldIvy --> CliHelloWorldIvyMinimal 😇

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Donesies 👍

@mary-poppins

Copy link
Copy Markdown

You can preview 61d6de9 at https://pr28372-61d6de9.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 4162517 at https://pr28372-4162517.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 1def325 at https://pr28372-1def325.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview be6ef37 at https://pr28372-be6ef37.ngbuilds.io/.

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.

Suggested change
// Listing specific routes is unsupported for now.
// Listing specific routes is unsupported for now, so we erroneously
// return all lazy routes instead (which should be okay for the CLI's
// usage).

…route

In #27697 the listLazyRoutes was fixed to work with ivy.

Since the entryRoute argument is not supported, it was made to also error.

But by erroring it breaks existing usage with Angular CLI where the entry route is sent in as an argument.

This commit changes listLazyRoutes to not error out, but instead ignore the argument.
There are two ways to bootstrap an Ivy app: with `platformBrowserDynamic().bootstrapModule` and `renderComponent`.

To distinguish between these two approaches we call the `platformBrowserDynamic().bootstrapModule` way `ivy-compat` and the `renderComponent` way just `ivy`.
@mary-poppins

Copy link
Copy Markdown

You can preview 4b9641b at https://pr28372-4b9641b.ngbuilds.io/.

@alexeagle alexeagle added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 7, 2019
@mhevery mhevery closed this in 2caa419 Feb 7, 2019
mhevery pushed a commit that referenced this pull request Feb 7, 2019
…28372)

There are two ways to bootstrap an Ivy app: with `platformBrowserDynamic().bootstrapModule` and `renderComponent`.

To distinguish between these two approaches we call the `platformBrowserDynamic().bootstrapModule` way `ivy-compat` and the `renderComponent` way just `ivy`.

PR Close #28372
@filipesilva
filipesilva deleted the cli-ivy-updates branch February 7, 2019 21:10
@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 area: build & ci Related the build and CI infrastructure of the project 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.

9 participants