rules_ts icon indicating copy to clipboard operation
rules_ts copied to clipboard

[Bug]: aspect configure doesn't pick up tsconfig.json files

Open bgdnvk opened this issue 2 years ago • 4 comments

What happened?

I'm using aspect configure to make my build files, it picks up dependencies fine but doesn't include a ts_config anywhere.

My project is fairly complex: a monorepo with several frontends with microfrontends (React and Webpack) and backend services in Go. Go build works fine with Gazelle.

Version

Development (host) and target OS/architectures: Ubuntu 22.04 LTS

Output of bazel --version: 7.0.0

Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file: Module

Language(s) and/or frameworks involved: TS, React, Webpack, Monorepo and Microfrontends

How to reproduce

No response

Any other information?

I've tried to check different examples, blog posts and there wasn't no luck in slack.

No response

bgdnvk avatar Dec 19 '23 16:12 bgdnvk

Can you provide more detail on how to reproduce, and how the generated BUILD file differs from what you expect? As I pointed out on slack, we have a bunch of test coverage for tsconfig handling.

alexeagle avatar Dec 19 '23 21:12 alexeagle

I will try to give more examples later but the BUILD file doesn't add the ts_config rules (maybe I worded my question wrong), another answer from slack providing: # gazelle:js_tsconfig enabled generated it for some files. The build fails if you don't have a ts_config rule with a tsconfig path so I was wondering if this is a bug because adding it manually to every file doesn't seem like the right approach.

bgdnvk avatar Dec 21 '23 08:12 bgdnvk

Sorry, this is still not enough detail on how to reproduce, what you see and what you expect.

alexeagle avatar Jan 24 '24 03:01 alexeagle

@bgdnvk is it the generation of ts_config rules or ts_project(tsconfig) attributes that you are not getting? Note that anything tsconfig related is still in an initial trial and will be enhanced more in the future. I believe today it only discovers tsconfig.json (no other filenames like tsconfig.tests.json etc).

The ts_project(tsconfig) attribute will now be generated though, within the supported use cases at least. See https://github.com/aspect-build/aspect-cli/issues/633

jbedard avatar Feb 27 '24 09:02 jbedard