diff --git a/cmd/aspect/root/root.go b/cmd/aspect/root/root.go index 1f90641b7..c0d23a7e3 100644 --- a/cmd/aspect/root/root.go +++ b/cmd/aspect/root/root.go @@ -69,9 +69,14 @@ func NewRootCmd(streams ioutils.Streams, defaultInteractive bool) *cobra.Command // https://pkg.go.dev/github.com/spf13/cobra#Command.IsAdditionalHelpTopicCommand cmd.AddCommand(&cobra.Command{ Use: "target-syntax", - Short: "Documentation on Bazel's syntax for targets", + Short: "Explains the syntax for specifying targets.", Long: topics.Read("target-syntax"), }) + cmd.AddCommand(&cobra.Command{ + Use: "info-keys", + Short: "Displays a list of keys used by the info command.", + Long: topics.Read("info-keys"), + }) return cmd } diff --git a/docs/help/topics/BUILD.bazel b/docs/help/topics/BUILD.bazel index 51797f1e2..c83da5d06 100644 --- a/docs/help/topics/BUILD.bazel +++ b/docs/help/topics/BUILD.bazel @@ -3,7 +3,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "topics", srcs = ["main.go"], - data = ["target-syntax"], + data = [ + "info-keys", + "target-syntax", + ], importpath = "aspect.build/cli/docs/help/topics", visibility = ["//visibility:public"], deps = ["@io_bazel_rules_go//go/tools/bazel:go_default_library"], diff --git a/docs/help/topics/info-keys b/docs/help/topics/info-keys new file mode 100644 index 000000000..9f6260dbb --- /dev/null +++ b/docs/help/topics/info-keys @@ -0,0 +1,30 @@ +bazel-bin Configuration dependent directory for binaries. +bazel-genfiles Configuration dependent directory for generated files. +bazel-testlogs Configuration dependent directory for logs from a test run. +build-language A protobuffer with the build language structure +character-encoding Information about the character encoding used by the running JVM. +client-env The specifications that need to be added to the project-specific rc file to freeze the current client environment +command_log Location of the log containing the output from the build commands. +committed-heap-size The amount of memory in bytes that is committed for the Java virtual machine to use +default-package-path The default package path +defaults-package Obsolete. Retained for backwards compatibility. +execution_root A directory that makes all input and output files visible to the build. +gc-count Number of garbage collection runs. +gc-time The approximate accumulated time spend on garbage collection. +install_base The installation base directory. +java-home Location of the current Java runtime. +java-runtime Name and version of the current Java runtime environment. +java-vm Name and version of the current Java virtual machine. +max-heap-size The maximum amount of memory in bytes that can be used for memory management. +output_base A directory for shared bazel state as well as tool and strategy specific subdirectories. +output_path Output directory +package_path The search path for resolving package labels. +peak-heap-size The peak amount of used memory in bytes after any call to System.gc(). +release bazel release identifier +repository_cache The location of the repository download cache used +server_log bazel server log path +server_pid bazel process id +starlark-semantics The effective set of Starlark semantics option values. +used-heap-size The amount of used memory in bytes. Note that this is not a good indicator of the actual memory use, as it includes any remaining inaccessible memory. +used-heap-size-after-gc The amount of used memory in bytes after a call to System.gc(). +workspace The working directory of the server. diff --git a/integration_tests/help_test.sh b/integration_tests/help_test.sh index 693cbbef6..a7ac50654 100755 --- a/integration_tests/help_test.sh +++ b/integration_tests/help_test.sh @@ -22,3 +22,9 @@ help=$($ASPECT help target-syntax 2>/dev/null) || true echo "$help" exit 1 } +help=$($ASPECT help info-keys 2>/dev/null) || true +[[ "$help" =~ "bazel-bin" ]] || { + echo >&2 "Expected 'aspect help info-keys' stdout to contain 'bazel-bin' , but was" + echo "$help" + exit 1 +} \ No newline at end of file