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

forms: typed forms migration does not run on lazy-loaded modules #44524

Closed
cexbrayat opened this issue Dec 17, 2021 · 2 comments
Closed

forms: typed forms migration does not run on lazy-loaded modules #44524

cexbrayat opened this issue Dec 17, 2021 · 2 comments
Assignees
Labels
area: forms area: migrations Issues related to `ng update` migrations
Milestone

Comments

@cexbrayat
Copy link
Member

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

forms

Is this a regression?

No

Description

The migration available in v13.2.0-next.1 fails to pick up forms in lazy-loaded modules in a CLI app.

The repo provided as reproduction is a simple CLI app, with a lazy-loaded module containing a component with a FormControl (added in the second commit).

steps:

git clone https://github.com/cexbrayat/typed-forms.git
npm i
ng update @angular/core --migrate-only migration-v14-typed-forms

Please provide a link to a minimal reproduction of the bug

https://github.com/cexbrayat/typed-forms

Please provide the exception or error you saw

❯ ng update @angular/core --migrate-only migration-v14-typed-forms
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 13.1.2 to perform the update.
✔ Package successfully installed.
Using package manager: 'npm'
Collecting installed dependencies...
Found 23 dependencies.
** Executing 'migration-v14-typed-forms' of package '@angular/core' **

❯ Experimental migration that adds <any>s for Typed Forms.
  Migration completed.

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

Angular CLI: 13.2.0-next.1
Node: 16.13.1
Package Manager: npm 6.14.14
OS: darwin x64

Angular: 13.2.0-next.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1302.0-next.1
@angular-devkit/build-angular   13.2.0-next.1
@angular-devkit/core            13.2.0-next.1
@angular-devkit/schematics      13.2.0-next.1
@schematics/angular             13.2.0-next.1
rxjs                            7.4.0
typescript                      4.5.4

Anything else?

This happened in every application I tried to run the migration. I think it even sometimes doesn't find components in modules, but I struggled to reproduce in a bare application.

@dylhunn dylhunn self-assigned this Dec 18, 2021
@ngbot ngbot bot added this to the needsTriage milestone Dec 18, 2021
@dylhunn dylhunn added the area: migrations Issues related to `ng update` migrations label Dec 18, 2021
@AndrewKushnir AndrewKushnir self-assigned this Jan 24, 2022
@dylhunn
Copy link
Contributor

dylhunn commented Jan 28, 2022

Thank you for this great reproduction @cexbrayat, we really appreciate it! This only affected external migrations (not google3 migrations), so we might not have caught it in time. This will be fixed in #44881.

@dylhunn dylhunn closed this as completed Jan 28, 2022
@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 Feb 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: forms area: migrations Issues related to `ng update` migrations
Projects
None yet
Development

No branches or pull requests

3 participants