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

fix: give better error when ts_project should be js_library #86

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

alexeagle
Copy link
Member

Fixes #72

@alexeagle alexeagle requested a review from thesayyn July 11, 2022 14:28
label = "//{}:{}".format(ctx.label.package, ctx.label.name)
if ctx.attr.transpile:
if len(typings_srcs) > 0:
no_outs_msg = """ts_project target {target} has no outputs, but it has typings in srcs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes me wonder whether tsc is supposed to type check .d.ts sources as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could - but it doesn't produce any outputs in that case, so it would have to be run as a Bazel "validation action" whose outputs aren't required in the dep graph. I'll note that in #85 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah cool. I'd expect tsc to at least type check and copy it over if instructed. At least that is what I'd expect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add that to the message here.

@alexeagle alexeagle merged commit cfeefbb into main Jul 11, 2022
@alexeagle alexeagle deleted the fix_79 branch July 11, 2022 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot depend on ts_project that only contains declaration files
2 participants