aspect-build/rules_ts

Request for project-references examples (if supported)

rc-glean opened this issue · 2 comments

It's unclear to me whether https://www.typescriptlang.org/docs/handbook/project-references.html (incremental builds) are supported by just looking at the examples https://github.com/aspect-build/rules_ts/tree/d5842963bae0c1f0e83a77dabee595784418917b/examples.

I would have expected an example with multiple tsconfig.json's, with some tsconfig.json's referring to other tsconfig.json's via the references config (https://www.typescriptlang.org/tsconfig#references)

My main goal is to get yarn workspaces working with typescript and bazel

Edit: TLDR, my question is whether aspect ts rules support project-references

This is part of #23 - we should copy over https://github.com/bazelbuild/rules_nodejs/tree/stable/packages/typescript/test/ts_project/c which shows project references.

I reproduced that error you mentioned in microsoft/TypeScript#37378 (comment)

The cause is that in a refactoring we lost these two lines
https://github.com/bazelbuild/rules_nodejs/blob/stable/nodejs/private/ts_project.bzl#L87-L88
which were the way that the tsconfig.json file of a referenced composite project was being provided as an input to tsc.