bazelbuild/rules_typescript

is neither a TypeScript nor a JS producing rule.

clanstyles opened this issue ยท 3 comments

๐Ÿž bug report

Affected Rule

The issue is caused by the rule: ts_library

Is this a regression?

Yes, the previous version in which this bug was not present was: unsure

Description

A clear and concise description of the problem:

We're using https://github.com/stackb/rules_proto to generate protobuf clients. When we use commonjs_grpc_compile to generate our gRPC code, your library says the output isn't going to be JS

๐Ÿ”ฌ Minimal Reproduction

๐Ÿ”ฅ Exception or Error





๐ŸŒ Your Environment

Operating System:

  

  

Output of bazel version:

  

  

Rules version (SHA):

  

  

Anything else relevant?

pcj commented

@clanstyles hard to say without more information. One thing to recall is that the commonjs_grpc_compile rule will generate source files, so the rule providing should be named in the ts_library.srcs attribute, not the ts_library.deps attribute.

I'm trying to generate with commojs_* from the stackb/ and I'm getting that.

Edit: Sorry for the lack of clarification, I was on a mobile device.

This repository has their own ts_library, but the new "official" protobuf repository is using ts-protoc-gen. I think this is causing the conflict above, where the name of the function is actually commonjs_* instead of js_* and the codebase for rules_typescript is looking for the "js" string in the name. I'm getting this information from: https://github.com/bazelbuild/rules_typescript/issues/116#issuecomment-357717078

let's roll it into #116