Add JIT support for AngularCompilerPlugin#7684
Conversation
|
Followup to #7512 |
fbb49b6 to
9ce70c4
Compare
| private _tsFilenames: string[]; | ||
| // Should be Program from @angular/compiler-cli instead of any. | ||
| private _program: any; | ||
| private _program: ts.Program & any; |
There was a problem hiding this comment.
I'm not sure & any is even something... Wouldn't that be any? Any reason you cannot put ts.Program there?
There was a problem hiding this comment.
When the interface is available in a stable manner, we should be doing ts.Program & Program. Meanwhile I wanted to leave a marker there that indicated it's not just ts.Program.
For some of these we should be able to not have the & any but for others that won't be possible since methods/props are being used that don't exist on ts.Program.
| let modulePath: string, moduleKey: string; | ||
|
|
||
| if (factoryKey in this._lazyRoutes) { | ||
| if (factoryPath === null) { |
There was a problem hiding this comment.
You removed this part, which removed lazy routes that were deleted during a rebuild. Did you want to keep a check to remove lazy routes ?
There was a problem hiding this comment.
I checked earlier today and this actually doesn't do anything, as far as I could tell. When a lazy route goes away the discovered routes for this module is an empty object, so there's nothing to remove. There's a TODO just above to actually add this functionality.
| // and uses CustomTransformers. | ||
| // Should be Program and CustomTransformers from @angular/compiler-cli instead of any. | ||
| private _emit(program: any, customTransformers: any) { | ||
| private _emit(program: ts.Program & any, customTransformers: ts.CustomTransformers & any) { |
There was a problem hiding this comment.
It seems to me those & any are wrong. You probably want a declare type Program = ... and declare type CustomTransformers = ... at the top of the file to remove those weird typings in arguments.
| private _basePath: string; | ||
| private _transformMap: Map<string, TransformOperation[]> = new Map(); | ||
| private _platform: PLATFORM; | ||
| private _JITMode = false; |
There was a problem hiding this comment.
We capitalize acronyms and initialisms as if they were words. _JitMode.
106ddb6 to
67077c3
Compare
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
67077c3 to
36bd774
Compare
|
CLAs look good, thanks! |
36bd774 to
094bc3d
Compare
|
Blocked by #7702. |
a69dda5 to
3ee989d
Compare
e7c1ec7 to
f822fd4
Compare
| `; | ||
| const output = stripIndent` | ||
| import __locale_fr__ from "@angular/common/locales/fr"; | ||
| import { registerLocaleData as registerLocaleData } from "@angular/common"; |
There was a problem hiding this comment.
should be import { registerLocaleData } from "@angular/common";, I probably did something wrong in my transformer (not really wrong but useless)
0934f13 to
657beef
Compare
657beef to
2b3f311
Compare
2b3f311 to
662709a
Compare
2b862aa to
97ce26b
Compare
97ce26b to
2c2f3d2
Compare
2c2f3d2 to
6c4d309
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fix #2034
Fix #7623