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 bazel build #189

Merged
merged 3 commits into from
May 23, 2016
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
4 changes: 3 additions & 1 deletion core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ cc_library(
":lexer",
"//stdlib:std",
],
includes = [".", "../include"],
)

cc_test(
Expand Down Expand Up @@ -80,7 +81,7 @@ cc_library(
"//include:libjsonnet",
],
linkopts = ["-lm"],
includes = ["."],
includes = [".", "../include"],
)

cc_library(
Expand All @@ -90,6 +91,7 @@ cc_library(
":jsonnet-common",
"//include:libjsonnet",
],
includes = [".", "../include"],
)

cc_test(
Expand Down
12 changes: 6 additions & 6 deletions cpp/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ jsonnet_to_json_test(
name = "example_test",
src = "example.jsonnet",
golden = "example_golden.json",
jsonnet = "//:jsonnet",
std = "//:std",
jsonnet = "//cmd:jsonnet",
std = "//stdlib",
)

jsonnet_to_json_test(
name = "importing_test",
src = "importing.jsonnet",
golden = "importing_golden.json",
imports = ["."],
jsonnet = "//:jsonnet",
std = "//:std",
jsonnet = "//cmd:jsonnet",
std = "//stdlib",
)

jsonnet_to_json_test(
name = "invalid_test",
src = "invalid.jsonnet",
golden = "invalid.out",
error = 1,
jsonnet = "//:jsonnet",
std = "//:std",
jsonnet = "//cmd:jsonnet",
std = "//stdlib",
Copy link
Contributor

Choose a reason for hiding this comment

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

Come to think of it, I think we can remove the std attribute since the stdlib is baked into the jsonnet binary. @sparkprime is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You may be right that it's unnecessary, but the jsonnet_to_json_test rule defined in the bazel repo has a default value for std, which is simply wrong for these targets.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think David's right but we can fix it some other time

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. I will remove the std attribute from the Bazel Jsonnet rules in a separate change.

)

filegroup(
Expand Down
5 changes: 5 additions & 0 deletions stdlib/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "stdlib",
srcs = ["std.jsonnet"],
)

cc_library(
name = "std",
hdrs = ["std.jsonnet.h"],
Expand Down