audit
This document provides an overview of the commands and options available under buck2 audit
.
buck2 audit
Perform lower level queries
Usage: buck2 audit <COMMAND>
Subcommands:
cell
: Query information about the [cells] list in .buckconfig.classpath
: Prints out a target's classpaths if it has one. This command is deprecated and currently available for compatibility with buck1. We will replace this command with something that can audit the entireTemplatePlaceholderInfo
in the future.config
: buck audit configconfigurations
: prints the constraints for configuration IDsincludes
: list build file extensions imported at parse time.prelude
: print the interpreter prelude to stdoutproviders
: prints out the providers for a target patternsubtargets
: Print all subtargetsanalysis-queries
: buck audit analysis resolving query attrsexecution-platform-resolution
: prints out information about execution platform resolutionvisibility
: Verify the visibility for transitive deps of the specified target(s) on the unconfigured target graphstarlark
: Debug Starlark interpreterdep-files
: prints out the select files for a commanddeferred-materializer
: Access and interact with the deferred materializeroutput
: Query the action that produced the output artifact. Does not support BXL, test, scratch, or anon artifacts. If the configuration hash of the output path does not match the current platform configuration, the unconfigured target label will be returned.parse
: Parses the buck-out path into parts that may be useful (ex: config hash, file path to artifact).package-values
: Inspect package valuesperf
: Commands for checking buck2 performance
buck2 audit cell
Query information about the [cells] list in .buckconfig.
Usage: buck2 audit cell [OPTIONS] [CELL_ALIASES]...
Arguments:
<CELL_ALIASES>
Cell aliases to query. These aliases will be resolved in the working directory cell.
Options:
-
--json
Output in JSON format -
--paths-only
Don't include the cell name in the output -
--aliases
If enabled and no explicit aliases are passed, will query for all aliases in the working directory cell. -
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit classpath
Prints out a target's classpaths if it has one.
This command is deprecated and currently available for compatibility with buck1.
We will replace this command with something that can audit the entire TemplatePlaceholderInfo
in the future.
Usage: buck2 audit classpath [OPTIONS] [TARGET_PATTERNS]...
Arguments:
<TARGET_PATTERNS>
Target patterns to audit
Options:
-
--json
Output in JSON format -
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit config
buck audit config
Usage: buck2 audit config [OPTIONS] [SPECS]...
Arguments:
<SPECS>
config section/key specs of the formsection
orsection.key
. If any specs are provided, only values matching a spec will be printed (section headers will be printed only for sections with a key matching the spec)
Options:
-
--cell <CELL>
-
--all-cells
Produce information for all cells that Buck2 knows about -
--output-format <OUTPUT_FORMAT>
- Possible values:
simple
json
- Possible values:
-
--json
-
--location <LOCATION_STYLE>
- Default value:
none
- Possible values:
none
direct
extended
- Default value:
-
--value <VALUE_STYLE>
- Default value:
resolved
- Possible values:
resolved
raw
both
- Default value:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit configurations
prints the constraints for configuration IDs
Usage: buck2 audit configurations [OPTIONS] [configurations]...
Arguments:
<configurations>
configurations to audit (example:cell//package:target-105fe3389fc7e436
). If none provided, will print information about all known configurations.
Options:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit includes
list build file extensions imported at parse time.
Usage: buck2 audit includes [OPTIONS] [BUILD_FILES]...
Arguments:
<BUILD_FILES>
Build files to audit. These are expected to be relative paths from the working dir cell.
Options:
-
--json
Print json representation of outputs -
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit prelude
print the interpreter prelude to stdout
Usage: buck2 audit prelude [OPTIONS]
Options:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit providers
prints out the providers for a target pattern
Usage: buck2 audit providers [OPTIONS] <TARGET_PATTERNS>...
Arguments:
<TARGET_PATTERNS>
Patterns to analyze
Options:
-
--quiet
-
-l, --list
List the available providers -
--print-debug
Print the providers using debug format (very verbose) -
-u, --target-universe <TARGET_UNIVERSE>
Comma separated list of targets to construct a configured target universe.When the option is specified, command targets are be resolved in this universe. Additionally,
--target-platforms=
and--modifier=
flags are be used to configure the universe targets, not the command targets.This argument is particularly recommended on most non-trivial cqueries. In the absence of this argument, buck2 will use the target literals in your cquery expression as the value for this argument, which may not be what you want.
-
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit subtargets
Print all subtargets
Usage: buck2 audit subtargets [OPTIONS] <TARGET_PATTERNS>...
Arguments:
<TARGET_PATTERNS>
Patterns to analyze
Options:
-
--shallow
Do not recursively print all nested subtargets; print only the first level. This is set to false by default -
--json
Print subtargets as JSON -
-u, --target-universe <TARGET_UNIVERSE>
Comma separated list of targets to construct a configured target universe.When the option is specified, command targets are be resolved in this universe. Additionally,
--target-platforms=
and--modifier=
flags are be used to configure the universe targets, not the command targets.This argument is particularly recommended on most non-trivial cqueries. In the absence of this argument, buck2 will use the target literals in your cquery expression as the value for this argument, which may not be what you want.
-
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit analysis-queries
buck audit analysis resolving query attrs
Usage: buck2 audit analysis-queries [OPTIONS] [TARGET_PATTERNS]...
Arguments:
<TARGET_PATTERNS>
Patterns to evaluate. The query attributes for targets matching these patterns will be evaluated
Options:
-
--include-outputs
Enable to print the outputs for the targets in the resolved queries -
-u, --target-universe <TARGET_UNIVERSE>
Comma separated list of targets to construct a configured target universe.When the option is specified, command targets are be resolved in this universe. Additionally,
--target-platforms=
and--modifier=
flags are be used to configure the universe targets, not the command targets.This argument is particularly recommended on most non-trivial cqueries. In the absence of this argument, buck2 will use the target literals in your cquery expression as the value for this argument, which may not be what you want.
-
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit execution-platform-resolution
prints out information about execution platform resolution
Usage: buck2 audit execution-platform-resolution [OPTIONS] [TARGET_PATTERNS]...
Arguments:
<TARGET_PATTERNS>
Patterns to analyze
Options:
-
-u, --target-universe <TARGET_UNIVERSE>
Comma separated list of targets to construct a configured target universe.When the option is specified, command targets are be resolved in this universe. Additionally,
--target-platforms=
and--modifier=
flags are be used to configure the universe targets, not the command targets.This argument is particularly recommended on most non-trivial cqueries. In the absence of this argument, buck2 will use the target literals in your cquery expression as the value for this argument, which may not be what you want.
-
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit visibility
Verify the visibility for transitive deps of the specified target(s) on the unconfigured target graph
Usage: buck2 audit visibility [OPTIONS] [TARGET_PATTERNS]...
Arguments:
<TARGET_PATTERNS>
Target pattern(s) to analyze.
Options:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit starlark
Debug Starlark interpreter
Usage: buck2 audit starlark <COMMAND>
Subcommands:
module
: Inspect Starlark module by fully qualified import string like foo//bar:baz.bzlpackage-deps
: Inspect Starlark package file all bzl dependencies by package name like foo//bar/baz
buck2 audit starlark module
Inspect Starlark module by fully qualified import string like foo//bar:baz.bzl
Usage: buck2 audit starlark module [OPTIONS] <IMPORT_PATH>
Arguments:
<IMPORT_PATH>
Module import path
Options:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit starlark package-deps
Inspect Starlark package file all bzl dependencies by package name like foo//bar/baz
Usage: buck2 audit starlark package-deps [OPTIONS] <PACKAGE>
Arguments:
<PACKAGE>
Package
Options:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit dep-files
prints out the select files for a command
Usage: buck2 audit dep-files [OPTIONS] <PATTERN> <CATEGORY> [IDENTIFIER]
Arguments:
-
<PATTERN>
Target to query dep files for -
<CATEGORY>
Action category -
<IDENTIFIER>
Action identifier
Options:
-
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit deferred-materializer
Access and interact with the deferred materializer
Usage: buck2 audit deferred-materializer [OPTIONS] <COMMAND>
Subcommands:
list
list-subscriptions
fsck
refresh
get-refresh-log
: Get the log for TTL refreshestest-iter
flush-access-times
Options:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit deferred-materializer list
Usage: buck2 audit deferred-materializer list
buck2 audit deferred-materializer list-subscriptions
Usage: buck2 audit deferred-materializer list-subscriptions
buck2 audit deferred-materializer fsck
Usage: buck2 audit deferred-materializer fsck
buck2 audit deferred-materializer refresh
Usage: buck2 audit deferred-materializer refresh <MIN_TTL>
Arguments:
<MIN_TTL>
Minimum TTL to require for actions
buck2 audit deferred-materializer get-refresh-log
Get the log for TTL refreshes
Usage: buck2 audit deferred-materializer get-refresh-log
buck2 audit deferred-materializer test-iter
Usage: buck2 audit deferred-materializer test-iter [OPTIONS]
Options:
-
--count <COUNT>
- Default value:
1
- Default value:
buck2 audit deferred-materializer flush-access-times
Usage: buck2 audit deferred-materializer flush-access-times
buck2 audit output
Query the action that produced the output artifact. Does not support BXL, test, scratch, or anon artifacts. If the configuration hash of the output path does not match the current platform configuration, the unconfigured target label will be returned.
Usage: buck2 audit output [OPTIONS] <OUTPUT_PATH>
Arguments:
<OUTPUT_PATH>
The buck-out path to the build artifact, starting withbuck-out
and including the configuration platform.
Options:
-
--json
-
-A, --output-all-attributes
Output all attributes, equivalent of --output-attribute ''.Avoid using this flag in automation because it may be expensive to produce certain attributes, and because it makes harder to track which special attributes are used.
-
-B, --output-basic-attributes
Output basic attributes, namely those the user can supply, plus rule type and package name -
-a, --output-attribute <ATTRIBUTE>
Regular expressions to match attributes. Regular expressions are used in "search" mode, so for example empty string matches all attributes including special attributes.When using in automation, please specify the regular expression to match the attribute precisely, for example
--output-attribute '^headers$'
to make it easier to track which special attributes are used. -
--output-attributes <ATTRIBUTE>
Deprecated: Use--output-attribute
instead.List of space-separated attributes to output, --output-attributes attr1 attr2.
-
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit parse
Parses the buck-out path into parts that may be useful (ex: config hash, file path to artifact).
Usage: buck2 audit parse [OPTIONS] <OUTPUT_PATH>
Arguments:
<OUTPUT_PATH>
The buck-out path to the build artifact, starting withbuck-out
and including the configuration platform.
Options:
-
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag -
-m, --modifier <VALUE>
This option is not used -
--json
-
--output-attribute <OUTPUT_ATTRIBUTE>
buck2 audit package-values
Inspect package values.
Package values is the thing set with write_package_value
function from PACKAGE
files.
Usage: buck2 audit package-values [OPTIONS] [PACKAGES]...
Arguments:
<PACKAGES>
Package names to inspect (like//foo/bar
, no trailing colon)
Options:
-
-m, --modifier <VALUE>
This option is not used -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag
buck2 audit perf
Commands for checking buck2 performance
Usage: buck2 audit perf <COMMAND>
Subcommands:
configured-graph-size
: utility to measure performance of configured graph size computation
buck2 audit perf configured-graph-size
utility to measure performance of configured graph size computation
Usage: buck2 audit perf configured-graph-size [OPTIONS] [TARGET_PATTERNS]...
Arguments:
<TARGET_PATTERNS>
Target patterns to audit
Options:
-
--json
-
--sketch
whether to compute sketch or not -
-u, --target-universe <TARGET_UNIVERSE>
Comma separated list of targets to construct a configured target universe.When the option is specified, command targets are be resolved in this universe. Additionally,
--target-platforms=
and--modifier=
flags are be used to configure the universe targets, not the command targets.This argument is particularly recommended on most non-trivial cqueries. In the absence of this argument, buck2 will use the target literals in your cquery expression as the value for this argument, which may not be what you want.
-
--target-platforms <PLATFORM>
Configuration target (one) to use to configure targets -
-m, --modifier <VALUE>
A configuration modifier to configure all targets on the command line. This may be a constraint value target. -
-c, --config <SECTION.OPTION=VALUE>
List of config options -
--config-file <PATH>
List of config file paths -
--fake-host <HOST>
- Possible values:
default
linux
macos
windows
- Possible values:
-
--fake-arch <ARCH>
- Possible values:
default
aarch64
x8664
- Possible values:
-
--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b) -
--reuse-current-config
Re-uses any--config
values (inline or via modefiles) if there's a previous command, otherwise the flag is ignored.If there is a previous command and
--reuse-current-config
is set, then the old config is used, ignoring any overrides.If there is no previous command but the flag was set, then the flag is ignored, the command behaves as if the flag was not set at all.
-
--exit-when-different-state
Used for exiting a concurrent command when a different state is detected -
--preemptible <PREEMPTIBLE>
Used to configure when this command could be preempted by another command for the same isolation dir.Normally, when you run two commands - from different terminals, say - buck2 will attempt to run them in parallel. However, if the two commands are based on different state, that is they either have different configs or different filesystem states, buck2 cannot run them in parallel. The default behavior in this case is to block the second command until the first completes.
- Possible values:
never
: (default) When another command starts that cannot run in parallel with this one, block that commandalways
: When another command starts, interrupt this command, even if they could run in parallel. There is no good reason to use this other than that it provides slightly nicer superconsole outputondifferentstate
: When another command starts that cannot run in parallel with this one, interrupt this command
- Possible values:
-
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.This option is not stable, and can be used only locally to diagnose evaluation performance problems.
-
--stack
Record or show target call stacks.Starlark call stacks will be included in duplicate targets error.
If a command outputs targets (like
targets
command), starlark call stacks will be printed after the targets. -
--console <super|simple|...>
Which console to use for this command- Default value:
auto
- Possible values:
auto
none
simple
simplenotty
simpletty
super
- Default value:
-
--ui <UI>
Configure additional superconsole ui components.Accepts a comma-separated list of superconsole components to add. Possible values are:
dice - shows information about evaluated dice nodes debugevents - shows information about the flow of events from buckd
These components can be turned on/off interactively. Press 'h' for help when superconsole is active.
- Possible values:
dice
debugevents
io
: I/O panelre
: RE panel
- Possible values:
-
--no-interactive-console
Disable console interactions -
--event-log <PATH>
Write events to this log file -
--write-build-id <PATH>
Write command invocation id into this file -
--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made regarding the stability of the format -
--command-report-path <PATH>
Write the command report to this path. A command report is always written tobuck-out/v2/<uuid>/command_report
even without this flag