Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Migrating to v8 changes ViewChild to VViewChild #30713
@alan-agius4 Is this is actually an issue from the schematic? My impression is that this is related to the update recorder from the CLI that every migration schematic leverages.
That's why similar issues appear for the lazy route syntax migration. I think we should have a more generic issue for this on the CLI repository as it seems to affect all migration schematics. Also the ones in the CLI.
As discussed offline, the problem/feature is indeed in the CLI because the
The main reason for this is that when a developer is writing a schematic they shouldn't need to compute the offset based if a file has a BOM or not and is handled out of the box.
However this is unfortunate in the case if a ts SourceFile is used and one uses
referenced this issue
May 29, 2019
Just to add to that: I see the point of doing that, but it is simply resulting in magic behavior as schematic indices are not determined by just looking at the visible rendered characters but rather by parsed source-files where the BOM is a valid invisible character that still adds to the amount characters.
Ideally the magic differentation between BOM and non-BOM files would have not happened at all, but for now the easiest way to fix this in a backwards-compatible way (where older CLI versions are used) is to strip the BOM when parsing the TypeScript source-files.
We need to find a proper solution for this in the future though. It adds unnecessary bloat and confusion to schematic authors as they need to know about different behavior with BOM / and need to handle BOM characters in a special way for now.