Skip to content

[Bug]: bazel configure adds generated files to ts_project() deps #782

@walkerburgin

Description

@walkerburgin

What happened?

Running bazel configure adds generated files to ts_project()'s deps, which then fails to compile with an error like this:

ERROR: /Users/walkerburgin/Repositories/walkerburgin/configure-genrule-repro/pkgs/foo-lib/BUILD.bazel:19:11: in deps attribute of ts_project rule //pkgs/foo-lib:typescript: generated file '//pkgs/foo-lib:r1.ts' is misplaced here (expected no files). Since this rule was created by the macro 'ts_project', the error might have been caused by the macro implementation
ERROR: /Users/walkerburgin/Repositories/walkerburgin/configure-genrule-repro/pkgs/foo-lib/BUILD.bazel:19:11: in deps attribute of ts_project rule //pkgs/foo-lib:typescript: generated file '//pkgs/foo-lib:r2.d.ts' is misplaced here (expected no files). Since this rule was created by the macro 'ts_project', the error might have been caused by the macro implementation
ERROR: /Users/walkerburgin/Repositories/walkerburgin/configure-genrule-repro/pkgs/foo-lib/BUILD.bazel:19:11: Analysis of target '//pkgs/foo-lib:typescript' failed

Version

Development (host) and target OS/architectures:

Output of bazel --version: aspect 2024.46.33-399d18a70

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

bazel_dep(name = "aspect_rules_js", version = "2.1.1")
bazel_dep(name = "aspect_rules_ts", version = "3.3.1")

Language(s) and/or frameworks involved: TypeScript

How to reproduce

Any other information?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions