Skip to content

Signal migrations executing multiple times #61337

Closed

Description

@bmayen

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

core

Is this a regression?

No

Description

When I run ng generate @angular/core:signal-input-migration on a brand new CLI-generated v19 project containing a decorator-syntax @input "foo", the migration analyzes tsconfig.app.json and tsconfig.spec.json and runs the migration for each of the tsconfigs. This results in template file having foo()() instead of foo(). If I delete tsconfig.spec.json, the migration only analyses tsconfig.app.json and runs once, resulting in foo() as expected.
This same behavior happens with the signal-query migration.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw


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

Angular CLI: 19.2.11
Node: 22.15.0
Package Manager: npm 10.9.2
OS: darwin arm64

Angular: 19.2.10
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1902.11
@angular-devkit/build-angular   19.2.11
@angular-devkit/core            19.2.11
@angular-devkit/schematics      19.2.11
@angular/cli                    19.2.11
@schematics/angular             19.2.11
rxjs                            7.8.2
typescript                      5.7.3
zone.js                         0.15.0

Anything else?

Have tried specifying analysis-dir option as well but get the same result.

Activity

  1. self-assigned this
    on May 14, 2025
  2. added
    needs reproduction
    area: migrations
    and removed
    needs reproduction
    on May 14, 2025
  3. added this to the needsTriage milestone on May 14, 2025
  4. bmayen commented on May 15, 2025

    @bmayen
    Author

    Any thoughts on a workaround in the meantime? We have dozens of large Angular projects we need to migrate so manually fixing this in all of these files is a huge task.

  5. devversion commented on May 15, 2025

    @devversion
    Member

    @bmayen Aside from removing either one tsconfig temporarily, I don't know of a workaround. Surprisingly this started recently because we didn't see this before in our manual tests

    I will try to look into this tomorrow and hopefully have a fix soon.

  6. bmayen commented on May 15, 2025

    @bmayen
    Author

    Much appreciated

  7. devversion commented on May 16, 2025

    @devversion
    Member

    Right, it's related, but with my note above I've referred to the fact that we never saw this on the signal migrations— which were tested extensively in various open source projects. Not sure what changed.

  8. devversion commented on May 16, 2025

    @devversion
    Member

    FYI: A PR is pending that should fix this. I'll add some tests in a follow-up trying to cover the specific scenario of this issue.

  9. angular-automatic-lock-bot commented on Jun 21, 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.

  10. locked and limited conversation to collaborators on Jun 21, 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