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(aio): add support for faster, unoptimized serve #23569

Closed
wants to merge 1 commit into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Apr 27, 2018

PR Checklist

PR Type

What kind of change does this PR introduce?

[x] Build related changes

What is the current behavior?

When running yarn start and yarn serve-and-sync, we are usually more interested in faster re-build times than optimized builds. This was also the behavior, before upgrading to @angular/cli@6 (fc5af69).

What is the new behavior?

This commit introduces a new configuration (fast), which is used by yarn start and yarn serve-and-sync to restore the faster, unoptimized builds.
Other commands, such as ng serve and ng e2e, remain unchanged (using slower, optimized builds).

Does this PR introduce a breaking change?

[ ] Yes
[x] No

When running `yarn start` and `yarn serve-and-sync`, we are usually
more interested in faster re-build times than optimized builds. This was
also the behavior, before upgrading to @angular/cli@6 (fc5af69).

This commit introduces a new configuration (`fast`), which is used by
`yarn start` and `yarn serve-and-sync` to restore the faster,
unoptimized builds.
Other commands, such as `ng serve` and `ng e2e`, remain unchanged (using
slower, optimized builds).
@gkalpak gkalpak added area: build & ci Related the build and CI infrastructure of the project action: review The PR is still awaiting reviews from at least one requested reviewer comp: aio target: patch This PR is targeted for the next patch release labels Apr 27, 2018
@gkalpak gkalpak added this to REVIEW in docs-infra Apr 27, 2018
@mary-poppins
Copy link

You can preview 3915d69 at https://pr23569-3915d69.ngbuilds.io/.

@IgorMinar IgorMinar 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 Apr 27, 2018
@ngbot
Copy link

ngbot bot commented Apr 27, 2018

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure forbidden label detected: PR action: review
    failure status "continuous-integration/travis-ci/pr" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@IgorMinar
Copy link
Contributor

I was wondering about this - it seems that we no longer have the capability in cli to have a matrix of environment vs configuration - I'm not sure if this was intentional but it seems like step backwards in terms of flexibility. @hansl @filipesilva can you provide some insights? are we missing anything?

@IgorMinar IgorMinar closed this in 4cb46ce Apr 27, 2018
IgorMinar pushed a commit that referenced this pull request Apr 27, 2018
When running `yarn start` and `yarn serve-and-sync`, we are usually
more interested in faster re-build times than optimized builds. This was
also the behavior, before upgrading to @angular/cli@6 (fc5af69).

This commit introduces a new configuration (`fast`), which is used by
`yarn start` and `yarn serve-and-sync` to restore the faster,
unoptimized builds.
Other commands, such as `ng serve` and `ng e2e`, remain unchanged (using
slower, optimized builds).

PR Close #23569
@hansl
Copy link
Contributor

hansl commented Apr 27, 2018

@IgorMinar environments in 1.7 was only about file replacement, while target was optimization level. Now that all flags are part of the build configuration, they’ve been replaced by configurations for both (and you can use values on the command line, like —optimization=true instead of —target=prod).

It seems to me that your default options should be non optimized and use a different configuration for different levels of optimization.

@gkalpak gkalpak deleted the build-aio-fast-serve branch April 27, 2018 14:40
@gkalpak
Copy link
Member Author

gkalpak commented Apr 27, 2018

I see two problems:

  1. It is not possible to share a configuration (that is different than the default) with several environments. For example, we hav three different production environments: stable (for the currently stable version; e.g. 5.x), next (for the @next version; e.g. 6.x/master), and archive (for older versions; 3.x, 4.x, etc.). We could repeat the options in each one, but this is tedious and can easily get out-of-sync.

  2. AFAICT, the flags only apply to build, not other commands, such as serve. So, if we want to be able to serve optimized/unoptimized versions for different purposes, we need to have two different configurations.

@hansl
Copy link
Contributor

hansl commented Apr 27, 2018 via email

@gkalpak
Copy link
Member Author

gkalpak commented Apr 27, 2018

Great to hear. Extending would be awesome indeed. Thx!

IgorMinar pushed a commit that referenced this pull request Apr 27, 2018
When running `yarn start` and `yarn serve-and-sync`, we are usually
more interested in faster re-build times than optimized builds. This was
also the behavior, before upgrading to @angular/cli@6 (fc5af69).

This commit introduces a new configuration (`fast`), which is used by
`yarn start` and `yarn serve-and-sync` to restore the faster,
unoptimized builds.
Other commands, such as `ng serve` and `ng e2e`, remain unchanged (using
slower, optimized builds).

PR Close #23569
@gkalpak gkalpak removed this from REVIEW in docs-infra Apr 30, 2018
@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 Sep 13, 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: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants