You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ts_project tsconfig attr should be able to take ts_config labels #1931
ts_project has a tsconfig attribute which expects a json file name, and for the transitive set of parent config files to be provided via the extends attribute. Meanwhile, if the tsconfig attribute accepted a ts_config definition, which already contains the transitive set of parent configs, then the extends attribute would be unnecessary.
Describe the solution you'd like
Take advantage of the pre-existing ts_config rule (and TsConfigInfo provider) so we don't need to manage our own list of transitive deps in the extends attribute.
Describe alternatives you've considered
For the given set of rules, no, as I don't think this requires any new rules. I will say that there might be a reason this doesn't exist to begin with, but I don't have that knowledge myself.
Yeah I think this makes sense. IIRC I didn't do it this way originally just to keep ts_project simple, and because there's no generated tsconfig.json file involved. But this would be an optional way to supply a list of tsconfig files through that provider you point to. Maybe a wrinkle here is we need to know which one to pass to tsc with -p flag, so I think the TsConfigInfo might need to change to have a direct project and then a depset of transitive ones.
Not a problem to know which one to pass with -p since it has a DefaultInfo with just the relevant top-level tsconfig we can use ctx.file.tsconfig to get it.
Activity
alexeagle commentedon Jun 4, 2020
Yeah I think this makes sense. IIRC I didn't do it this way originally just to keep ts_project simple, and because there's no generated tsconfig.json file involved. But this would be an optional way to supply a list of tsconfig files through that provider you point to. Maybe a wrinkle here is we need to know which one to pass to tsc with
-pflag, so I think the TsConfigInfo might need to change to have a direct project and then a depset of transitive ones.refactor(typescript): remove private _TsConfigInfo in ts_project
refactor(typescript): remove private _TsConfigInfo in ts_project
alexeagle commentedon Aug 24, 2020
Not a problem to know which one to pass with
-psince it has a DefaultInfo with just the relevant top-level tsconfig we can usectx.file.tsconfigto get it.refactor(typescript): remove private _TsConfigInfo in ts_project (baz…
fix: test file pattern (bazel-contrib#2089)