Repository navigation
Cleanup Ngc Api as preparation for watch mode - #18633
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 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 |
|
You can preview 4d8d0b5 at https://pr18633-4d8d0b5.ngbuilds.io/. |
There was a problem hiding this comment.
Since this doesn't merge the angular options and set genDir and basePath like readConfiguration does, this causes:
this.basePath = path.normalize(path.join(options.basePath !, '.')).replace(/\\/g, '/');
to fail in module_filename_resolver.ts. This code should compensate for the missing work done in readConfiguration or modify readConfiguration to allow the work to be shared.
|
You can preview fdaa7b5 at https://pr18633-fdaa7b5.ngbuilds.io/. |
|
You can preview 6b012a9 at https://pr18633-6b012a9.ngbuilds.io/. |
|
CLAs look good, thanks! |
|
You can preview e3d126a at https://pr18633-e3d126a.ngbuilds.io/. |
There was a problem hiding this comment.
we should use TS to parse the command line, so that it's possible to pass options that override or replace the tsconfig.json file
like tsc-wrapped does: https://github.com/angular/angular/blob/master/packages/tsc-wrapped/src/main.ts#L199
There was a problem hiding this comment.
are we able to remove this and move cli args fully into the tsconfig file yet?
There was a problem hiding this comment.
Yes, you can specify all i18n options in the config now. However we keep the command line options for backwards compatibility...
There was a problem hiding this comment.
we should not call process.exit, says @evmar - instead set process.exitCode and let the process terminate
There was a problem hiding this comment.
it's not necessary to copy from TypeScript; I moved this to a public API ts.formatDiagnostics
like here:
There was a problem hiding this comment.
I want to apply it to a single diagnostic, so that the diagnostics array can contain both, ts.Diagnostics and ng.Diagnostics. However, I think I can use that method for a single diagnostic as well.
There was a problem hiding this comment.
note, and FYI: this is duplicating code here
https://github.com/bazelbuild/rules_typescript/blob/master/internal/tsc_wrapped/tsconfig.ts#L99
but that's probably okay as it's not much, and we don't have a plan for sharing bazel libraries on npm yet
There was a problem hiding this comment.
passing basePath is a smell, it's not actually a free variable, it is required to be the absolute path to the directory containing tsconfig.json or else paths produced by TS moduleResolver won't match up
There was a problem hiding this comment.
Mmh, so how would I get it then if it was no passed in?
There was a problem hiding this comment.
nit: google TS style guide says to use Number(major) to coerce the type
There was a problem hiding this comment.
spelling: complier -> compiler
This is in preparation for watch mode.
|
You can preview 3c04703 at https://pr18633-3c04703.ngbuilds.io/. |
|
Travis was red because of a flake, rerunning now. |
|
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. |
Note: The first commit is from #18494