<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div class="">Now that the `package` subcommand has been implemented (see <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0085-package-manager-command-name.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0085-package-manager-command-name.md</a>), some of the options have ended up with awkward syntax. For example, the old `--init` option took an optional package type parameter, and after the command renaming, the syntax has become somewhat awkward: `package init=library`.</div><div class=""><br class=""></div><div class="">In order to clean this up, we have added some flags for the newly introduced subcommands, and I wanted to run them by the list to get any feedback before making the change.</div><div class=""><br class=""></div><div class="">The command line interface vended by the new `package` subcommand introduced by SE-0085 is shown in its help text:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">OVERVIEW: Perform operations on Swift packages</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">USAGE: swift package [command] [options]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">COMMANDS:</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> init [--type <type>] Initialize a new package (executable|library)</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> fetch Fetch package dependencies</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> update Update package dependencies</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> generate-xcodeproj [--output <path>] Generates an Xcode project</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> show-dependencies [--format <format>] Print dependency graph (text|dot|json)</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> dump-package [--output <path>] Print Package.swift as JSON</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">OPTIONS:</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --chdir <path> Change working directory before any command [-C]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --color <mode> Specify color mode (auto|always|never)</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --verbose Increase verbosity of informational output [-v]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -Xcc <flag> Pass flag through to all C compiler instantiations</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -Xlinker <flag> Pass flag through to all linker instantiations</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -Xswiftc <flag> Pass flag through to all Swift compiler instantiations</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">NOTE: Use `swift build` to build packages, and `swift test` to test packages</span></font></div></blockquote><div class=""><br class=""></div><div class="">The changes are to introduce new flags for the parameters that were previously passed to the subcommand names themselves. The last three flags listed (-Xcc, -Xlinker, and -Xswiftc) are unchanged to maintain compatibility with the swift compiler — this will likely be revisited at a later time.</div><div class=""><br class=""></div><div class="">As described in SE-0085, the `build` subcommand stays. It how has this interface:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">OVERVIEW: Build sources into binary products</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">USAGE: swift build [mode] [options]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">MODES:</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --configuration <value> Build with configuration (debug|release)</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --clean [<mode>] Delete artifacts (build|dist)</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">OPTIONS:</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --chdir <path> Change working directory before any other operation [-C]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --build-path <path> Specify build directory</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --color <mode> Specify color mode (auto|always|never)</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --verbose Increase verbosity of informational output [-v]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -Xcc <flag> Pass flag through to all C compiler instantiations</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -Xlinker <flag> Pass flag through to all linker instantiations</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -Xswiftc <flag> Pass flag through to all Swift compiler instantiations</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">NOTE: Use `swift package` to perform other functions on packages</span></font></div></blockquote><div class=""><br class=""></div><div class="">Finally, the `test` subcommand remains largely unmodified, with this interface:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">OVERVIEW: Build and run tests</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">USAGE: swift test [specifier] [options]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">SPECIFIER:</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -s TestModule.TestCase Run a test case subclass</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> -s TestModule.TestCase/test1 Run a specific test method</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">OPTIONS:</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --chdir Change working directory before any other operation [-C]</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""> --build-path <path> Specify build directory</span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier" class=""><span style="font-size: 12px;" class="">NOTE: Use `swift package` to perform other functions on packages</span></font></div></blockquote><div class=""><br class=""></div><div class="">Questions / comments / concerns?</div><div class=""><br class=""></div><div class="">Anders</div><div class=""><br class=""></div></body></html>