Skip to content

[Bug]: Dependents of modules that use aspect_rules_ts cannot use aspect_rules_ts themselves #843

@sbarfurth

Description

@sbarfurth

What happened?

When a module that uses aspect_rules_ts depends on a module that also uses it, builds result in the following error:

Error in repository_rule: A repo named npm_typescript is already generated by this module extension at ...

Version

Development (host) and target OS/architectures: Linux

Output of bazel --version: 8.3.1

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

Language(s) and/or frameworks involved: Bazel

How to reproduce

git clone https://github.com/sbarfurth/aspect_rules_ts_issues.git
cd aspect_rules_ts_issues/module_b
bazel build //:consumer

Check https://github.com/sbarfurth/aspect_rules_ts_issues for more details.

Any other information?

When a module depends on a module that uses aspect_rules_ts, the depending module cannot themselves depend on aspect_rules_ts. This is because the repository rule used by aspect_rules_ts cannot be called more than once in the module dependency tree with the same name. The rules in aspect_rules_ts depend on the default name and therefore changing it is cumbersome.

This was previously filed as #483.

Metadata

Metadata

Assignees

No one assigned

    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