Repository navigation
Conversation
|
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 or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok 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 |
|
You can preview 275069d at https://pr27697-275069d.ngbuilds.io/. |
275069d to
9211cb1
Compare
|
You can preview 9211cb1 at https://pr27697-9211cb1.ngbuilds.io/. |
9211cb1 to
2ac4ecc
Compare
|
You can preview 2ac4ecc at https://pr27697-2ac4ecc.ngbuilds.io/. |
|
You can preview 045885b at https://pr27697-045885b.ngbuilds.io/. |
|
You can preview bff43e9 at https://pr27697-bff43e9.ngbuilds.io/. |
bff43e9 to
cf559d2
Compare
|
You can preview cf559d2 at https://pr27697-cf559d2.ngbuilds.io/. |
ngtscngtsc
ngtscngtsc
|
You can preview bed15e5 at https://pr27697-bed15e5.ngbuilds.io/. |
bed15e5 to
ccabee3
Compare
|
You can preview ccabee3 at https://pr27697-ccabee3.ngbuilds.io/. |
ngtscngtsc
petebacondarwin
left a comment
There was a problem hiding this comment.
I couldn't find anything wrong with the code.
I feel that analyzer is a bit of an overloaded term; is it sensible to use it here? Do other handlers have analyzer services?
I wonder if we should get ngtsc and ngcc to use shared code for module resolution? Or perhaps their structures are enough different.
I think the code would hugely benefit from some documentation comments and even some unit tests.
Otherwise LGTM!!
There was a problem hiding this comment.
Can we document this enum and its members?
There was a problem hiding this comment.
You could simplify a lot of the code below if you made this class DynamicValue<R = {}>, right?
There was a problem hiding this comment.
Can we document this class? Who uses it and why is it needed?
Also should be using it elsewhere in ngtsc/ngcc? There is definitely module resolution going on in ngcc...
There was a problem hiding this comment.
Added some docs. Looked at reusing this in ngcc and it doesnt seem to be a good fit (at least without a non-trivial refactoring, which feels out-of-scope for this PR).
There was a problem hiding this comment.
Do we care if the identifier has more than one #?
There was a problem hiding this comment.
Since this is only called with values of Route#loadChildren properties (for which having multiple # would be invalid), I think it is fine.
There was a problem hiding this comment.
What FFR stands for is not documented - I am guessing it is Foreign Function Reference?
There was a problem hiding this comment.
Close 😃
It is foreign function resolver, which can be used to statically resolve a call expression.
I'll add a comment and try to type it more explicitly 😃
There was a problem hiding this comment.
This feels more like a register... than a resolve... method??
There was a problem hiding this comment.
Or at least this method is actually doing two things, it is resolving the RouterEntryPoint and registering it so that it can be subsequently accessed via fromNgModule.
There was a problem hiding this comment.
Yes, it will register it if it is not already registered (but it feels like a side effect).
Open to name suggestions 😁
alxhub
left a comment
There was a problem hiding this comment.
LGTM, pending Pete's comments :)
There was a problem hiding this comment.
Please add a comment with the name of the argument for which null is being passed here.
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
…propriate This makes the types (and intentions) more explicit and clear.
This commit introduces the NgModuleRouteAnalyzer & friends, which given metadata about the NgModules in a program can extract the list of lazy routes in the same format that the ngtools API uses.
This commit introduces a new mode for the NgtscTestEnvironment which builds the NgtscProgram and then asks for the list of lazy routes, instead of running the TS emit phase.
This commit uses the NgModuleRouteAnalyzer introduced previously to implement listLazyRoutes() for NgtscProgram. Currently this implementation is limited to listing routes globally and cannot list routes for a given lazy module. Testing seems to indicate that the CLI uses the global form, but this should be verified. Jira issue: FW-629
… @angular/cli@7.2.1
|
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 or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok 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 |
|
merge-assistance:
|
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
This commit introduces the NgModuleRouteAnalyzer & friends, which given metadata about the NgModules in a program can extract the list of lazy routes in the same format that the ngtools API uses. PR Close #27697
|
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. |


PR Checklist
Please check if your PR fulfills the following requirements:
Docs have been added / updated (for bug fixes / features)PR Type
What is the current behavior?
ngtscdoes not supportlistLazyRoutes(), which the cli uses to split code into bundles.Jira issue: FW-629
What is the new behavior?
ngtscdoes support listing all lazy routes. It still does not support listing routes for a specific entry point (but I am not sure if it is necessary with Ivy - see "More information" below).Does this PR introduce a breaking change?
More information
Listing lazy routes for specific entry points is not needed atm (but will probably be needed in the future). Created FW-860 to track that.