Skip to content

template strategy & usage strategy need more definition #30224

Closed

Description

@StephenFluin

🐞 bug report

Affected Package

@angular/core

Is this a regression?

no

Description

Upon using ng update to move to 8.0.0-rc.2 (or later), I get the following prompt:

------ Static Query migration ------
            In preparation for Ivy, developers can now explicitly specify the
            timing of their queries. Read more about this here:
            https://github.com/angular/angular/pull/28810
            
            There are two available migration strategies that can be selected:
              • Template strategy  -  migration tool (short-term gains, rare corrections)
              • Usage strategy  -  best practices (long-term gains, manual corrections)
            For an easy migration, the template strategy is recommended. The usage
            strategy can be used for best practices and a code base that will be more
            flexible to changes going forward.
? What migration strategy do you want to use?

This prompt doesn't include enough information for me to decide, and the linked PR doesn't talk about these strategies. It's unclear what the differences are or what changes will be made.

🌍 Your Environment

Angular Version:


Angular CLI: 8.0.0-rc.2
Node: 12.1.0
OS: linux x64
Angular: 8.0.0-rc.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-rc.2
@angular-devkit/build-angular     0.800.0-rc.2
@angular-devkit/build-optimizer   0.800.0-rc.2
@angular-devkit/build-webpack     0.800.0-rc.2
@angular-devkit/core              8.0.0-rc.2
@angular-devkit/schematics        8.0.0-rc.2
@angular/cdk                      8.0.0-rc.0
@angular/material                 8.0.0-rc.0
@ngtools/webpack                  8.0.0-rc.2
@schematics/angular               8.0.0-rc.2
@schematics/update                0.800.0-rc.2
rxjs                              6.5.1
typescript                        3.4.5
webpack                           4.30.0

Activity

  1. StephenFluin commented on May 1, 2019

    @StephenFluin
    ContributorAuthor

    Additionally, in an ideal world this would only prompt the user if we detect that they are using these queries.

  2. kara commented on May 1, 2019

    @kara
    Contributor

    Agree, we need to expand the messaging.

    Note that we should only be prompting if users have ViewChild/ContentChild queries.

  3. added
    area: coreIssues related to the framework runtime
    on May 1, 2019
  4. added this to the needsTriage milestone on May 1, 2019
  5. devversion commented on May 1, 2019

    @devversion
    Member

    Agreed that the current prompt misses a lot of context that is necessary to make a proper decision. I don't think we can actually provide enough context within the terminal anyway, and it's probably best to have a dedicated document that provides context.

    Also agreed on not prompting if there aren't any ViewChild or ContentChild queries that need to be migrated. I'll take care of this as soon as possible.

  6. Splaktar commented on May 15, 2019

    @Splaktar
    Contributor

    Is the plan to document this in the release notes or the Deprecation Guide? The documentation should have code examples for the two strategies.

    Should this be marked as a release blocker?

  7. DeborahK commented on May 15, 2019

    @DeborahK
    Contributor

    For ngupdate, in addition to only prompting if no queries are used, the text should minimally be modified to:

    • Add an adjective to 'query' such as 'ViewChild/ContentChild queries' because 'query' it too general.
    • Change the link to the dedicated document outlining the two choices and their impact.
  8. devversion commented on May 15, 2019

    @devversion
    Member

    The documentation should have code examples for the two strategies.

    👍 Examples are definitely a good idea.

    Should this be marked as a release blocker?

    I'd say so. We want to make the upgrade as easy as possible.. and a confusing prompt with not much context doesn't help with that 😄

  9. modified the milestones: needsTriage, Backlog on May 16, 2019
  10. kara commented on May 24, 2019

    @kara
    Contributor

    Closed by #30644

  11. angular-automatic-lock-bot commented on Sep 15, 2019

    @angular-automatic-lock-bot

    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.

  12. locked and limited conversation to collaborators on Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions