I was poking around in Swift Package Manager and noted the relatively undocumented command _format
in the output. It looks like it was added back in 2020 by Nate Cook (@nnnnnnnn) as a pass-through sort of command to invoking swift-format
, but it stands out in that 1) there's no one-liner about what it is or does and 2) has the _
prefix which makes me think it's experimental, with the exception that it's been there for a number of releases now.
It feels really awkward to see _format
in the output when you're exploring:
swift package
:
SUBCOMMANDS:
clean Delete build artifacts
purge-cache Purge the global repository cache.
reset Reset the complete cache/build directory
update Update package dependencies
describe Describe the current package
init Initialize a new package
_format
diagnose-api-breaking-changes
Diagnose API-breaking changes to Swift modules in a
package
dump-symbol-graph Dump Symbol Graph
dump-pif
dump-package Print parsed Package.swift as JSON
edit Put a package in editable mode
unedit Remove a package from editable mode
config Manipulate configuration of the package
resolve Resolve package dependencies
show-dependencies Print the resolved dependency graph
tools-version Manipulate tools version of the current package
compute-checksum Compute the checksum for a binary artifact.
archive-source Create a source archive for the package
completion-tool Completion tool (for shell completions)
plugin Invoke a command plugin or perform other actions on
command plugins
I wanted to see what the current thinking was on this. Would a PR be welcome to make it just format
(removing the _
prefix) and adding a one-liner describing what it is and does? Or is this still experimental in some form, in which case - what's the end-game of this experiment and what's it waiting on?