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

Commit

Permalink
Pass --workspace_name to Stardoc (#176)
Browse files Browse the repository at this point in the history
* Pass --workspace_name to Stardoc

Stardoc will thus avoid looking for dependencies in the current workspace name within external/.
For example, if the current workspace is "io_bazel", then, when a file loads "@io_bazel//foo:bar.bzl", Stardoc will look to foo/bar.bzl instead of external/io_bazel/foo/bar.bzl

* update self_doc_golden with formatting changes since last cut
  • Loading branch information
c-parsons authored Mar 19, 2019
1 parent 45ae581 commit 4b067c7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ git_repository(
git_repository(
name = "io_bazel",
remote = "https://github.com/bazelbuild/bazel.git",
commit = "49107ad79ef08811db22636928dfd113a9acf902", # Mar 08, 2019
commit = "c689bf93917ad0efa8100b3a0fe1b43f1f1a1cdf", # Mar 19, 2019
)
1 change: 1 addition & 0 deletions stardoc/stardoc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def _stardoc_impl(ctx):
args = ctx.actions.args()
args.add("--input=" + str(ctx.file.input.owner))
args.add("--output=" + ctx.outputs.out.path)
args.add("--workspace_name=" + ctx.workspace_name)
args.add_all(
ctx.attr.symbol_names,
format_each = "--symbols=%s",
Expand Down
Binary file modified stardoc/stardoc_binary.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions test/self_doc_golden.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<!-- Generated with Stardoc: http://skydoc.bazel.build -->

<a name="#stardoc"></a>

## stardoc

<pre>
Expand Down Expand Up @@ -93,6 +96,8 @@ documentation for all exported rule definitions will be generated.
</table>


<a name="#_stardoc_impl"></a>

## _stardoc_impl

<pre>
Expand Down

0 comments on commit 4b067c7

Please sign in to comment.