-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
featureA feature request or implementationA feature request or implementationruntimeThe Swift RuntimeThe Swift Runtimestandard libraryArea: Standard library umbrellaArea: Standard library umbrellatriage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Motivation
Swift Testing needs to be able to report the full Swift version (as reported by swift --version
) for diagnostic purposes, e.g. when reading logs produced by a CI job or another engineer or in a different configuration. This version information is immensely useful when filing bug reports because it allows us to immediately see "oh, it was the [e.g.] August 9th nightly main-branch toolchain where the bug occurred" and so on.
Proposed solution
I'd like to propose we add API to the Swift standard library that vends a "human-readable" string equivalent to the aforementioned one. Something like this would be sufficient:
/// The human-readable version of the standard library.
///
/// Rabble rabble details details nuances nuances.
public var standardLibraryVersion: String { get }
Alternatives considered
- An internal-only, C/C++, or SPI function could also work, but as it wouldn't be API, developers not working on the Swift project wouldn't be able to use it.
- A more complex interface with configuration options is probably overkill.
Additional information
No response
hassila and MahdiBM
Metadata
Metadata
Assignees
Labels
featureA feature request or implementationA feature request or implementationruntimeThe Swift RuntimeThe Swift Runtimestandard libraryArea: Standard library umbrellaArea: Standard library umbrellatriage neededThis issue needs more specific labelsThis issue needs more specific labels