feat: add JsInfo provider to ts_config rule #315
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #271 although it looks like there is additional speed bump that
tsc
doesn't follow the symlinked to the virtual store location of itsextends
so transitive npm deps of anextends
can't be resolved. I suspect this is easily reproducible outside of Bazel whenhoist = False
in.npmrc
.See comment left in
examples/linked_tsconfig_consumer/tsconfig.json
for more info:There are other way this could be worked around including manually propagating the dependency to downstream ts_project targets but the hacky virtual store path work-around above seems the simplest; here we just abandon the standard node_modules resolution algorithm that would incorrectly resolve to
node_modules/@lib/tsconfig/tsconfig.json
from where transitive npm deps of@lib/tsconfig
would not be resolvable unless they were elsewhere on the node_modules resolution path such asnode_modules/my_transitive_dep
. The downside of this work-around is that would not work outside of Bazel with the same tsconfig file since under pnpm the virtual store path would be different.@Toxaris There is a follow-up task here of reproducing the issue with tsc outside of Bazel and filing an issue to the typescript repo but I've got too many other things on my plate atm so I'm going to punt on that. If you wanted to make the repro and file an issue upstream I bet the fix is a relatively straight forward one in typescript.