Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve workflow for updating targets #49

Open
mattem opened this issue May 20, 2020 · 0 comments
Open

Improve workflow for updating targets #49

mattem opened this issue May 20, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mattem
Copy link
Contributor

mattem commented May 20, 2020

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.

@mattem mattem added the enhancement New feature or request label May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant