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: re-enable error when no outputs configured #84

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/transpiler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ write_file(
ts_project(
name = "babel",
srcs = ["big.ts"],
declaration = True,
out_dir = "build-babel",
source_map = True,
transpiler = babel,
)
4 changes: 2 additions & 2 deletions ts/private/ts_project.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _ts_project_impl(ctx):
declaration_dir = "."
arguments.add_all([
"--declarationDir",
declaration_dir,
declaration_dir,
])

# When users report problems, we can ask them to re-build with
Expand Down Expand Up @@ -126,7 +126,7 @@ def _ts_project_impl(ctx):
runtime_outputs = json_outs + js_outs + map_outs
typings_outputs = typings_outs + typing_maps_outs + [s for s in ctx.files.srcs if s.path.endswith(".d.ts")]

if not js_outs and not typings_outputs and not ctx.attr.deps:
if len(js_outs) + len(typings_outputs) < 1:
label = "//{}:{}".format(ctx.label.package, ctx.label.name)
if ctx.attr.transpile:
no_outs_msg = """ts_project target %s is configured to produce no outputs.
Expand Down