Skip to content

swift run --quiet is not quiet #8844

Open
@simonbates

Description

@simonbates

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

swift run --quiet outputs build messaging in addition to the output from the specified program.

I have created a minimal project to reproduce: https://github.com/simonbates/SwiftRunQuietExample

Expected behavior

% swift run --quiet hello
hello, world

Actual behavior

% swift run --quiet hello
Building for debugging...
[8/8] Applying hello
Build of product 'hello' complete! (0.60s)
hello, world

Additionally, I have noticed that the build messaging varies slightly depending if it's the first, second, or third time running:

% swift run --quiet hello
Building for debugging...
[8/8] Applying hello
Build of product 'hello' complete! (0.60s)
hello, world

% swift run --quiet hello
[1/1] Planning build
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'hello' complete! (0.12s)
hello, world

% swift run --quiet hello
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'hello' complete! (0.12s)
hello, world

Steps to reproduce

  1. Clone the example repository: https://github.com/simonbates/SwiftRunQuietExample
  2. Run swift run --quiet hello

Swift Package Manager version/commit hash

Swift Package Manager - Swift 6.1.0

Swift & OS version (output of swift --version ; uname -a)

% swift --version
swift-driver version: 1.120.5 Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
Target: arm64-apple-macosx15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions