Skip to content

Commit

Permalink
fix: restore default outputs of jsonnet_to_json (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasquinn authored Oct 7, 2024
1 parent 2a5c036 commit 035eb9c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,19 @@ jsonnet_to_json_test(
deps = ["//imports:a"],
)

jsonnet_library(
name = "imports_default_output",
srcs = [":imports_build"],
)

jsonnet_to_json_test(
name = "imports_default_output_test",
src = "imports_default_output.jsonnet",
golden = "imports_golden.json",
imports = ["imports"],
deps = [":imports_default_output"],
)

jsonnet_to_json_test(
name = "strings_test",
src = "strings.jsonnet",
Expand Down
1 change: 1 addition & 0 deletions examples/imports_default_output.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'imports.json'
4 changes: 2 additions & 2 deletions jsonnet/jsonnet.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ def _jsonnet_to_json_impl(ctx):
)]

return [DefaultInfo(
files = depset([]),
runfiles = ctx.runfiles(files = []),
files = depset(outputs),
runfiles = ctx.runfiles(files = outputs),
)]

_EXIT_CODE_COMPARE_COMMAND = """
Expand Down

0 comments on commit 035eb9c

Please sign in to comment.