Skip to content

Signal migration stats are inaccurate in best effort mode #58657

Closed

Description

@cexbrayat

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

Considering a component with a query that can only be migrated in best effort mode:

  @ContentChildren('hello') options!: QueryList<HTMLDivElement>;

  ngAfterContentInit() {
    this.options.changes.subscribe();
  }

when running the migration in best effort mode, the query is migrated, but the stats say otherwise:

    Successfully migrated to signal queries 🎉
      -> Migrated 0/1 queries.
    To see why 1 queries couldn't be migrated
    consider re-running with "--insert-todos" or "--best-effort-mode".
    You ran with best effort mode. Manually verify all code works as intended, and fix where necessary.

To repro, open the following stackblitz and run:

ng g @angular/core:signals --migrations=queries --path=./ --best-effort-mode

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-kfek1q?file=src%2Fmain.ts

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.0.0-rc.1
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64

Angular: 19.0.0-rc.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.0-rc.1
@angular-devkit/build-angular   19.0.0-rc.1
@angular-devkit/core            19.0.0-rc.1
@angular-devkit/schematics      19.0.0-rc.1
@schematics/angular             19.0.0-rc.1
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10

Anything else?

No response

Activity

  1. added
    area: core
    on Nov 14, 2024
  2. added this to the needsTriage milestone on Nov 14, 2024
  3. added
    area: migrations
    and removed
    area: core
    on Nov 14, 2024
  4. self-assigned this
    on Nov 15, 2024
  5. devversion commented on Jan 12, 2025

    @devversion
    Member

    Should be fixed

  6. angular-automatic-lock-bot commented on Feb 12, 2025

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

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

Metadata

Metadata

Assignees

Labels

area: migrationsstate: has PR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions