Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Add @rules_java repository to skydoc. (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
iirina authored and laurentlb committed Jul 11, 2019
1 parent dc7260a commit 9283f6a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/.classpath
/.factorypath
/.idea/
/.ijwb/
/.project
/.settings
/WORKSPACE.user.bzl
Expand Down
30 changes: 28 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
workspace(name = "io_bazel_skydoc")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load(":setup.bzl", "skydoc_repositories")

skydoc_repositories()

load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies")

rules_sass_dependencies()

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")

node_repositories()

load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")

sass_repositories()

#######################################################################
Expand All @@ -21,13 +26,34 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# this in their WORKSPACE only if they need skydoc.
git_repository(
name = "com_google_protobuf",
remote = "https://github.com/protocolbuffers/protobuf.git",
commit = "7b28271a61a3da0a37f6fda399b0c4c86464e5b3", # 2018-11-16
remote = "https://github.com/protocolbuffers/protobuf.git",
)

# Needed for generating the Stardoc release binary.
git_repository(
name = "io_bazel",
remote = "https://github.com/bazelbuild/bazel.git",
commit = "ee0e62e239fee2853fec4b0deb794f3e464b6f93", # Jul 02, 2019
remote = "https://github.com/bazelbuild/bazel.git",
)

http_archive(
name = "rules_java",
sha256 = "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
strip_prefix = "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
"https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
],
)

# Needed only because of java_tools.
http_archive(
name = "rules_cc",
sha256 = "36fa66d4d49debd71d05fba55c1353b522e8caef4a20f8080a3d17cdda001d89",
strip_prefix = "rules_cc-0d5f3f2768c6ca2faca0079a997a97ce22997a0c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip",
"https://github.com/bazelbuild/rules_cc/archive/0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip",
],
)
1 change: 1 addition & 0 deletions stardoc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package(default_visibility = ["//visibility:public"])

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//stardoc:stardoc.bzl", "stardoc")
load("@rules_java//java:defs.bzl", "java_binary", "java_import")

filegroup(
name = "test_deps",
Expand Down

3 comments on commit 9283f6a

@alexeagle
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to break downstream usage:

ERROR: /usr/local/google/home/alexeagle/Projects/rules_nodejs/docs/BUILD.bazel:17:1: every rule of type stardoc implicitly depends upon the target '@io_bazel_skydoc//stardoc:templates/header.vm', but this target could not be found because of: error loading package '@io_bazel_skydoc//stardoc': Unable to find package for @rules_java//java:defs.bzl: The repository '@rules_java' could not be resolved.

is there a snapshot build of skydoc that doesn't leak the transitive dev dependencies?

@c-parsons
Copy link
Contributor

Choose a reason for hiding this comment

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

@laurentlb
Copy link
Contributor

Choose a reason for hiding this comment

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

If we need Java, I think we should add it to skydoc_repositories: https://github.com/bazelbuild/skydoc/blob/master/setup.bzl#L63

Please sign in to comment.