Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upexternalSchematic('@schematics/update', 'update') doesn't respect order in chain() for migration #17317
Comments
|
Potentially I have the same problem with a custom schematic (not a migration). Please let me know if this should be a separate issue. In my example I have the following code:
With |
Command (mark with an
x)Is this a regression?
Only tested with ^0.900.0
Description
For given snippet:
Both functions are invoked almost immediately, as provided in the screenshot below. If I understand correctly, chain() method containing externalSchematics with @schematics/update should respect the order and finish migration and then invoke another function in order. Tried approach with translating tree to observable in the second function, however, the outcome is the same. Looks like @schematics/update performs this asynchronously, causing the next functions to be invoked immediately. I haven't noticed this behavior for other migrations or schematics from Angular collections (like creating an app, component, service etc.).
Create simple migration containing externalSchematic('@schematics/update', 'update') for any given library.
The red highlighted area is separate function that should be invoked after @schematics/update for the library has been completed.
Anything else relevant?