-
Notifications
You must be signed in to change notification settings - Fork 522
Reorganized sub-workspace dependencies #398
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6e9260c
Added .bazelignore for nested workspace output directories
UebelAndre df4a89f
Updated docs generation script
UebelAndre fb829ac
Split dependencies for docs and examples into their own .bzl files
UebelAndre bb8cf00
Fixed compiler warning
UebelAndre dbbc045
Fixed some buildifier warnings
UebelAndre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Docs | ||
| docs/bazel-bin | ||
| docs/bazel-docs | ||
| docs/bazel-out | ||
| docs/bazel-testlogs | ||
|
|
||
| # Examples | ||
| examples/bazel-bin | ||
| examples/bazel-examples | ||
| examples/bazel-out | ||
| examples/bazel-testlogs | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,9 @@ | ||
| workspace(name = "io_bazel_rules_rust_docs") | ||
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
|
||
| local_repository( | ||
| name = "io_bazel_rules_rust", | ||
| path = "..", | ||
| ) | ||
| load(":docs_repositories.bzl", "repositories") | ||
|
|
||
| http_archive( | ||
| name = "bazel_skylib", | ||
| urls = [ | ||
| "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", | ||
| "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", | ||
| ], | ||
| sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", | ||
| ) | ||
| repositories() | ||
|
|
||
| load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") | ||
| bazel_skylib_workspace() | ||
| load(":docs_deps.bzl", "deps") | ||
|
|
||
| http_archive( | ||
| name = "io_bazel_stardoc", | ||
| urls = [ | ||
| "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.zip", | ||
| ], | ||
| sha256 = "5d7191bb0800434a9192d8ac80cba4909e96dbb087c5d51f168fedd7bde7b525", | ||
| strip_prefix = "stardoc-1ef781ced3b1443dca3ed05dec1989eca1a4e1cd", | ||
| ) | ||
|
|
||
| load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories") | ||
| load("@io_bazel_rules_rust//proto:repositories.bzl", "rust_proto_repositories") | ||
| load("@io_bazel_rules_rust//:workspace.bzl", "bazel_version") | ||
| load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") | ||
|
|
||
| rust_repositories() | ||
| rust_proto_repositories() | ||
| bazel_version(name = "bazel_version") | ||
| stardoc_repositories() | ||
|
|
||
| # Rules proto does not declare a bzl_library, we stub it there for now. | ||
| # TODO: Remove this hack if/when rules_proto adds a bzl_library. | ||
| local_repository( | ||
| name = "rules_proto", | ||
| path = "rules_proto_stub", | ||
| ) | ||
| deps() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| """Define dependencies for `rules_rust` docs""" | ||
|
|
||
| load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories") | ||
| load("@io_bazel_rules_rust//proto:repositories.bzl", "rust_proto_repositories") | ||
| load("@io_bazel_rules_rust//:workspace.bzl", "bazel_version") | ||
| load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") | ||
| load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
|
||
| def deps(is_top_level = False): | ||
| """Define dependencies for `rules_rust` docs | ||
|
|
||
| Args: | ||
| is_top_level (bool, optional): Indicates wheather or not this is being called | ||
| from the root WORKSPACE file of `rules_rust`. Defaults to False. | ||
| """ | ||
| rust_repositories() | ||
| rust_proto_repositories() | ||
| bazel_version(name = "bazel_version") | ||
| stardoc_repositories() | ||
|
|
||
| # Rules proto does not declare a bzl_library, we stub it there for now. | ||
| # TODO: Remove this hack if/when rules_proto adds a bzl_library. | ||
| if is_top_level: | ||
| maybe( | ||
| native.local_repository, | ||
| name = "rules_proto", | ||
| path = "docs/rules_proto_stub", | ||
| ) | ||
| else: | ||
| maybe( | ||
| native.local_repository, | ||
| name = "rules_proto", | ||
| path = "rules_proto_stub", | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| """Define repository dependencies for `rules_rust` docs""" | ||
|
|
||
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
| load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
|
||
| def repositories(is_top_level = False): | ||
| """Define repository dependencies for `rules_rust` docs | ||
|
|
||
| Args: | ||
| is_top_level (bool, optional): Indicates wheather or not this is being called | ||
| from the root WORKSPACE file of `rules_rust`. Defaults to False. | ||
| """ | ||
| maybe( | ||
| native.local_repository, | ||
| name = "io_bazel_rules_rust", | ||
| path = "..", | ||
| ) | ||
|
|
||
| maybe( | ||
| http_archive, | ||
| name = "bazel_skylib", | ||
| sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", | ||
| urls = [ | ||
| "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", | ||
| "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz", | ||
| ], | ||
| ) | ||
|
|
||
| maybe( | ||
| http_archive, | ||
| name = "io_bazel_stardoc", | ||
| urls = [ | ||
| "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.zip", | ||
| ], | ||
| sha256 = "5d7191bb0800434a9192d8ac80cba4909e96dbb087c5d51f168fedd7bde7b525", | ||
| strip_prefix = "stardoc-1ef781ced3b1443dca3ed05dec1989eca1a4e1cd", | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| #!/bin/bash | ||
|
|
||
| pushd ${0%/*} | ||
| bazel build //... && cp bazel-bin/*.md . && chmod 0644 *.md && git add *.md && git commit -m "Regenerate documentation" | ||
| # It's important to clean the workspace so we don't end up with unintended | ||
| # docs artifacts in the new commit. | ||
| bazel clean \ | ||
| && bazel build //... \ | ||
| && cp bazel-bin/*.md . \ | ||
| && chmod 0644 *.md \ | ||
| && git add *.md \ | ||
| && git commit -m "Regenerate documentation" | ||
| popd | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.