Repository navigation
build(bazel): allow a user to control a subset of angularCompilerOption in their tsconfig file when using ng_module - #28995
gregmagolan wants to merge 2 commits into
Conversation
…on in their tsconfig file when using ng_module
| // Allow Bazel users to control some of the bazel options. | ||
| // Since TypeScript's "extends" mechanism applies only to "compilerOptions" | ||
| // we have to repeat some of their logic to get the user's "angularCompilerOptions". | ||
| if (config['extends']) { |
There was a problem hiding this comment.
extends can be available at multiple levels.
See: https://github.com/bazelbuild/rules_typescript/pull/265/files#diff-8c2aa63f0643c2daf20032369cf0a48fR286 & https://github.com/bazelbuild/rules_typescript/pull/265/files#diff-052e72d7fea048c0c20120cdda7337bdR61
There was a problem hiding this comment.
yeah in my case with this code it gets: /home/ocombe/.cache/bazel/_bazel_ocombe/df516b31b5c55b244dfb17f03a952d3d/execroot/angular/packages/tsconfig-build.json but it doesn't read the local tsconfig file that I defined in my bundle test folder
|
|
||
| // All user angularCompilerOptions values that a user has control | ||
| // over should be collected here | ||
| if (userConfig.angularCompilerOptions) { |
There was a problem hiding this comment.
Can't you make a loop that gets all properties of userConfig? We wouldn't need to maintain this when we add new compiler config options. And worst case scenario it would set an option that wouldn't be used
There was a problem hiding this comment.
there are some properties which bazel needs to control, I think flatModuleId is an example.
ngc-wrapped is planned to be deprecated with Ivy so we don't need to put that much care here about maintainability
|
@benlesh I don't think it was ready for merge, @alan-agius4 seems to have a legitimate comment, and the PR doesn't seem to fix my issue (which was the goal) |
@ocombe I tried the failure target with this change and it fixed it locally. Are you still failing on the same issue? |
|
Sorry to hop in, but couldn't this also include I got some issues when building my project regarding and I understand that these options could fix that issue. |
|
@eachirei Have you looked at #23609? |
|
I'll give it another shot and try the method described in latest comment on that issue. |
|
Thing is the modules that are causing this problem are from external libraries, so I'll try to wrap them up with that method. I do not know the real cause of this, but I don't think this approach is feasible though. |
|
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. |
Unblocks #28689 which requires the use of