Skip to content

Commit

Permalink
chore: manual fixups post-copybara
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Aug 31, 2023
1 parent 8f92aea commit 072e903
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 26 deletions.
2 changes: 1 addition & 1 deletion cmd/aspect/root/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ go_library(
"//cmd/aspect/sync",
"//cmd/aspect/test",
"//cmd/aspect/version",
"//docs/help/topics",
"//pkg/aspect/root/flags",
"//pkg/ioutils",
"//pkg/plugin/system",
"//docs/versioned/cli/help",
"@com_github_fatih_color//:color",
"@com_github_mattn_go_isatty//:go-isatty",
"@com_github_spf13_cobra//:cobra",
Expand Down
2 changes: 1 addition & 1 deletion cmd/aspect/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ import (
"aspect.build/cli/cmd/aspect/sync"
"aspect.build/cli/cmd/aspect/test"
"aspect.build/cli/cmd/aspect/version"
help_docs "aspect.build/cli/docs/help/topics"
"aspect.build/cli/pkg/aspect/root/flags"
"aspect.build/cli/pkg/ioutils"
"aspect.build/cli/pkg/plugin/system"
help_docs "github.com/aspect-build/silo/docs/versioned/cli/help"
)

var (
Expand Down
57 changes: 33 additions & 24 deletions docs/aspect_outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,48 @@ Print paths to declared output files

### Synopsis

Queries for the outputs declared by actions generated by the given target.
Queries for the outputs declared by actions generated by the given target or the target(s) in the given query expression.

Prints each output file on a line, with the mnemonic of the action that produces it,
followed by a path to the file, relative to the workspace root.
You can optionally provide an extra argument, which is a filter on the mnemonic.
'ExecutableHash' is a special value for the mnemonic. This combines the ExecutableSymlink and
SourceSymlinkManifest mnemonics, then hashes the outputs of these two. This provides a good hash
for an executable target to determine if it has changed.
Prints each output file on a line, with the mnemonic of the action that produces it,
followed by a path to the file, relative to the workspace root.

You can optionally provide an extra argument, which is a filter on the mnemonic.

'ExecutableHash' is a special value for the mnemonic. This combines the ExecutableSymlink and
SourceSymlinkManifest mnemonics, then hashes the outputs of these two. This provides a good hash
for an executable target to determine if it has changed.

```
aspect outputs <target> [mnemonic] [flags]
aspect outputs <expression> [mnemonic] [flags]
```

### Examples

```
# Show all outputs of the //cli/pro target, which is a go_binary:
% aspect outputs //cli/pro
GoCompilePkg bazel-out/k8-fastbuild/bin/cli/pro/pro.a
GoCompilePkg bazel-out/k8-fastbuild/bin/cli/pro/pro.x
GoLink bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro
SourceSymlinkManifest bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro.runfiles_manifest
SymlinkTree bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro.runfiles/MANIFEST
Middleman bazel-out/k8-fastbuild/internal/_middlemen/cli_Spro_Spro_U_Spro-runfiles
# Show just the output of the GoLink action, which is the executable produced by a go_binary:
% aspect outputs //cli/pro GoLink
bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro
% aspect outputs //cli/pro
GoCompilePkg bazel-out/k8-fastbuild/bin/cli/pro/pro.a
GoCompilePkg bazel-out/k8-fastbuild/bin/cli/pro/pro.x
GoLink bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro
SourceSymlinkManifest bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro.runfiles_manifest
SymlinkTree bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro.runfiles/MANIFEST
Middleman bazel-out/k8-fastbuild/internal/_middlemen/cli_Spro_Spro_U_Spro-runfiles
# Show just the output of the GoLink action, which is the executable produced by a go_binary:
% aspect outputs //cli/pro GoLink
bazel-out/k8-fastbuild/bin/cli/pro/pro_/pro
# Show the outputs of all targets that contain the 'deliverable' tag
% aspect outputs 'attr("tags", "\bdeliverable\b", //...)'
ExecutableSymlink bazel-out/darwin-fastbuild/bin/cli/release
SourceSymlinkManifest bazel-out/darwin-fastbuild/bin/cli/release.runfiles_manifest
SymlinkTree bazel-out/darwin-fastbuild/bin/cli/release.runfiles/MANIFEST
Middleman bazel-out/darwin-fastbuild/internal/_middlemen/cli_Srelease-runfiles
```

### Options
Expand Down

0 comments on commit 072e903

Please sign in to comment.