Skip to content

Improve workflow for updating targets #49

@mattem

Description

@mattem

Currently bzlgen expects a file or folder path to generate or update a build target.

tsc_wrapped has a reference to the target being built when it emits diagnostics. In ev, TS2307 is augmented to add additional information to help the developer add deps to ts_library, but no bzlgen command is given, as it's tricky to work backwards from the target to either the file or folder to regenerate the rule.

bzlgen could accept a target as an input, infer the srcs and rule type and run the appropriate generator for updating the target.

Even generating the buildozer command from TS2307 is tricky, as you get a reference to the module specifier, so we'd need to run the same logic as bzlgens ts_lib rule to resolve the import to a label.

Alternatively, expose the resolution API of module specifier to label as a command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions