{"record":{"id":"e0c4f11766211aea","repo":"angular/components","slug":"filepath-lineandcharacter-message","errorCode":null,"errorMessage":"${filePath}${lineAndCharacter} - ${message}","messagePattern":"\\$\\{filePath\\}\\$\\{lineAndCharacter\\} - \\$\\{message\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/cdk/schematics/update-tool/index.ts","lineNumber":159,"sourceCode":"          }\n        }\n      });\n    }\n\n    // Call the \"postAnalysis\" method for each migration.\n    migrations.forEach(r => r.postAnalysis());\n\n    // Collect all failures reported by individual migrations.\n    const failures = migrations.reduce(\n      (res, m) => res.concat(m.failures),\n      [] as MigrationFailure[],\n    );\n\n    // In case there are failures, print these to the CLI logger as warnings.\n    if (failures.length) {\n      failures.forEach(({filePath, message, position}) => {\n        const lineAndCharacter = position ? `@${position.line + 1}:${position.character + 1}` : '';\n        this._logger.warn(`${filePath}${lineAndCharacter} - ${message}`);\n      });\n    }\n\n    return {\n      hasFailures: !!failures.length,\n    };\n  }\n\n  /**\n   * Creates instances of the given migrations with the specified target\n   * version and data.\n   */\n  private _createMigrations<Data>(\n    types: MigrationCtor<Data, Context>[],\n    target: TargetVersion | null,\n    data: Data,\n  ): Migration<Data, Context>[] {\n    const result: Migration<Data, Context>[] = [];","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/angular/components/blob/0411926e7d8ae06b32236ec1048a888cfad5abf2/src/cdk/schematics/update-tool/index.ts#L141-L177","documentation":"The CDK update tool (`migrate` in UpdateTool) reports each migration failure as a CLI warning formatted as `<filePath>@line:col - <message>`. The migration result ends with `hasFailures: !!failures.length`, so consumers know the migration did not fully succeed. Each printed item is one spot the automated migration could not handle.","triggerScenarios":"Calling the update-tool's `migrate()` (or running `ng update` which invokes it) where the migration returned a `failures` array; each failure with a `position` is printed as `file@line:col - message`, without a position as `file - message`.","commonSituations":"Large upgrade across multiple CDK/Material major versions, code generated or formatted in ways the AST tools cannot match, or files failing to type-check before the migration runs.","solutions":["Read each `<filePath>@line:col - message` warning and apply the described change manually.","Fix compile errors in the project first, then re-run the migration so the AST analysis succeeds.","If a failure is a tooling false positive, file an issue and apply the equivalent change by hand."],"exampleFix":"// warning: src/app/list.component.html@4:7 - Could not migrate template API\n<!-- before -->\n<div mat-line *cdkTreeNodeDef></div>\n\n<!-- after: manually migrate per the message -->\n<ng-template cdkTreeNodeDef let-node><div mat-line></div></ng-template>","handlingStrategy":"validation","validationCode":"const result = await tool.migrate();\nif (result.hasFailures) {\n  console.error('Migration incomplete; fix logged warnings before building.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure the project type-checks before running migrations.","Update one major version at a time so the AST migrations apply cleanly.","Keep code formatted consistently so pattern-based migrations match."],"tags":["angular","schematics","migration","cli","update-tool"],"backgroundTag":"ng-update-migration-failures","analyzedSha":"0411926e7d8ae06b32236ec1048a888cfad5abf2","analyzedAt":"2026-08-31T11:58:23.400Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}