aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java
Commit message (Collapse)AuthorAge
* Fix Skydoc's following of imports to correctly process absolute labels.Gravatar cparsons2018-07-13
| | | | | | | Previously, any absolute label (starting with double slash) would be converted to an absolute path, instead of a path relative to the current workspace directory. RELNOTES: None. PiperOrigin-RevId: 204472080
* Change some core semantics of skydoc.Gravatar cparsons2018-07-11
| | | | | | | | - Change Skydoc to only document exported symbols in the target file, instead of all exported symbols in the transitive dependencies of the target file. This circumvents a prior error scenario where main.bzl could depend on dep.bzl, and both export a rule named ?my_rule?, which would result in a conflict. - Offer the option to specify whitelisted symbols for which to output documentation, allowing a user to only request documentation for a subset of rules defined in a given file. This allows more granular control of documentation layout. RELNOTES: None. PiperOrigin-RevId: 204161197
* Add attribute information to skydoc outputGravatar cparsons2018-07-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 204147228
* Bazel server, VFS: revert to using asByteSourceGravatar laszlocsomor2018-07-10
| | | | | | | | | | | | | | | | | | commit 59f17d6e0550bf63a0b6ef182e2d63474e058ede updated files to use try-with-resources when dealing with streams. The change also got rid of asByteSource, replacing it with throw-away ByteSource instances wrapping a try-with-resources-guarded InputStream. Doing so was unnecessary though, because all ByteSource methods (except for open[Buffered]InputStream) close the stream. Thanks to @jbduncan to point that out and explain in detail [1]. [1] see comment thread on https://github.com/bazelbuild/bazel/commit/59f17d6e0550bf63a0b6ef182e2d63474e058ede under `FilesetManifest.java` RELNOTES: none PiperOrigin-RevId: 203934830
* Simple Markdown rendering for skydocGravatar cparsons2018-07-09
| | | | | | | This uses apache velocity engine templates to create markdown-HTML. There are other alternatives, but there is already precedent for depending on this library from docgen. RELNOTES: None. PiperOrigin-RevId: 203795431
* Bazel server: ensure InputStreams are closedGravatar laszlocsomor2018-07-05
| | | | | | | | | | | | | | | | | | | Use try-with-resources to ensure InputStreams that we open via FileSystem.InputStream(path) are closed. Eagerly closing InputStreams avoids hanging on to file handles until the garbage collector finalizes the InputStream, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203338148
* Implement imports (via load()) in Skydoc.Gravatar cparsons2018-06-28
| | | | | | | Skydoc will generate documentation for all rule definitions in the transitive dependencies of the given input file. RELNOTES: None. PiperOrigin-RevId: 202553088
* Inspect post-evaluation exported variables to obtain rule names.Gravatar cparsons2018-06-27
| | | | | | | | | This is a much cleaner, more elegant approach than previous regex matching. This still leaves room for unknown-name rule definitions, in case, for example, a user namespaces their rule definition not at the top level. For example: "foo.bar = rule(...)" RELNOTES: None. PiperOrigin-RevId: 202380975
* Initial check-in of skydoc rewrite.Gravatar cparsons2018-06-26
This skydoc rewrite uses an actual skylark interpreter with a faked build API (implementing the actual build API that Bazel uses). There's a lot left to do here, this is a barebones start. For example, this does not yet handle: - load() statements - non-global build API elements (e.g. apple_common) - output of any rule information other than attribute names - markdown output format RELNOTES: None. PiperOrigin-RevId: 202187207