Skip to content

6.2 merge main #8580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
a0fbf35
Minor Codable conformance improvements in SwiftBuildSupport (#8449)
pmattos Apr 4, 2025
c8d439a
Switch to ProjectModel API in the new SwiftBuildSupport PIF builder (…
pmattos Apr 5, 2025
60976ee
Tests: Enabled SourceControlTests on Windows (#8453)
bkhouri Apr 8, 2025
d4368fe
Clarify documented behavior of versioned manifest files in usage docs…
stmontgomery Apr 8, 2025
4511962
Tests: Enable some WorkspaceTests on Windows (#8463)
bkhouri Apr 9, 2025
cc0b1a5
Tests: Enable tests on Windows (#8466)
bkhouri Apr 9, 2025
21e3336
SwiftSDK: Remove hardcoded WASI sysroot path derivation (#8468)
kateinoigakukun Apr 9, 2025
e303b89
Copy helpers internally (#8467)
bkhouri Apr 9, 2025
cd5d9dd
Revert "Copy helpers internally" (#8474)
nate-chandler Apr 9, 2025
a0d1600
Fix duplicate modulemap errors with macro and plugin deps (#8472)
dschaefer2 Apr 10, 2025
1d48e0a
Copy helpers internally (#8476)
bkhouri Apr 11, 2025
6dfb613
Fix `SwiftBuildSupport/README.md` (#8483)
MaxDesiatov Apr 12, 2025
57a67b4
Fix bootstrapping on OpenBSD (#8451)
3405691582 Apr 14, 2025
3d063d0
Link test command test failures on Linux to issue (#8459)
cmcgee1024 Apr 14, 2025
49e69c7
Revert "Copy helpers internally" again (#8494)
pmattos Apr 14, 2025
453e6d3
Tests: Split SerializedJSONTests (#8496)
bkhouri Apr 15, 2025
b69b792
Mark skipped test with a GitHub issue (#8502)
bkhouri Apr 15, 2025
dec1ded
Improve Swift Build error formatting (#8493)
pmattos Apr 15, 2025
1befa52
Docs: Refer to swiftly in CONTRIBUTING.md (#8504)
bkhouri Apr 16, 2025
8432220
Test: Enable ConcurrencyHelpersTests on Windows (#8506)
bkhouri Apr 16, 2025
6245fa9
Really fix duplicate module maps this time. (#8498)
dschaefer2 Apr 16, 2025
e842b0e
Implement --enable-parseable-module-interfaces for swift-build builds…
daveinglis Apr 16, 2025
861a871
Add `swift test --attachments-path`. (#8492)
grynspan Apr 16, 2025
0b23073
Tests: Ensure we get clean test fixtures (#8507)
pmattos Apr 17, 2025
f673bf6
Revert "Really fix duplicate module maps this time." (#8517)
dschaefer2 Apr 17, 2025
393a8f3
Adopt new PIF builder in SwiftBuildSupport (#8454)
pmattos Apr 17, 2025
2c4c785
Tests: Fix 22 warning in BuildCommandTests (#8509)
pmattos Apr 17, 2025
9fb4efb
Add an .editorconfig file
jakepetroules Apr 17, 2025
95ce2a3
Make sure the workspace state is saved after adding/removing artifact…
shawnhyam Apr 18, 2025
b938328
build-using-self use a self build of swift-test instead (#8548)
dschaefer2 Apr 23, 2025
2bc3390
Disable failing SwiftBuild test on AmazonLinux 2 (#8546)
bkhouri Apr 23, 2025
ffdc0c0
Tests: Run packageInitExecutable test on all platforms for native bui…
pmattos Apr 23, 2025
6b256f3
Adopt MemberImportVisibility (#8525)
plemarquand Apr 23, 2025
7cf86c6
Add support for testable executables on Windows
jakepetroules Apr 17, 2025
6973cf5
Add FreeBSD support to SwiftBuild PIF builder (#8550)
pmattos Apr 23, 2025
387c4e0
Skip failing test in `TestCommandTests.swift` (#8553)
MaxDesiatov Apr 24, 2025
b021cef
[Build] Enable diagnostic serialization by default for swift modules …
xedin Apr 24, 2025
bc074bd
[Commands] Initial implementation of `swift package add-setting` comm…
xedin Apr 24, 2025
e952244
[Commands] Initial implementation of `swift package add-setting` comm…
xedin Apr 24, 2025
b842488
Output Swift Build PIF JSON for Graphviz visualization (#8539)
pmattos Apr 24, 2025
5da13be
Enable more plugin related tests for non-macOS platforms (#8477)
cmcgee1024 Apr 24, 2025
2b659da
Revert "Enable more plugin related tests for non-macOS platforms" (#8…
MaxDesiatov Apr 25, 2025
5b2118b
Prevent non-targets from depending on test targets (#8513)
johnbute Apr 25, 2025
ed30461
Adds DocC catalog to host SwiftPM documentation (#8487)
heckj Apr 25, 2025
d026b3f
Closes #8520 - Fix up test execution for IntegrationTests (#8538)
kcieplak Apr 25, 2025
a16474a
Re-enable more plugin related tests for non-macOS platforms (#8558)
cmcgee1024 Apr 25, 2025
2d48848
Re-enable tests in Windows CI (#8562)
dschaefer2 Apr 28, 2025
553f135
Tests: enable a test and update skip reason (#8542)
bkhouri Apr 28, 2025
f161b02
Test: Enable most AsyncProcessTests (#8500)
bkhouri Apr 28, 2025
68d55b1
Fix a number of minor curated documentation issues
jakepetroules Apr 25, 2025
f808b9f
Use `GENERATE_PRELINK_OBJECT_FILE` in `PackagePIFProjectBuilder` (#8570)
MaxDesiatov Apr 29, 2025
6965245
Avoid building targets that are conditional on platform when building…
cmcgee1024 Apr 29, 2025
e0afabb
Factor the working directory skip into a common function (#8561)
jakepetroules Apr 29, 2025
ed31e6e
Tests: Enable more WorkspaceTests on Windows (#8457)
bkhouri Apr 29, 2025
02436ea
Refactor slow to type check expression (#8565)
plemarquand Apr 30, 2025
244f99c
Use correct FileSystem in the PIF builder for Swift Build (#8574)
pmattos Apr 30, 2025
5b6b613
Merge branch 'main' into 6.2-merge-main
dschaefer2 Apr 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -815,11 +815,17 @@ let package = Package(
"Archiver/Inputs/invalid_archive.tar.gz",
"Archiver/Inputs/invalid_archive.zip",
"processInputs/long-stdout-stderr",
"processInputs/long-stdout-stderr.bat",
"processInputs/exit4",
"processInputs/exit4.bat",
"processInputs/simple-stdout-stderr",
"processInputs/simple-stdout-stderr.bat",
"processInputs/deadlock-if-blocking-io",
"processInputs/deadlock-if-blocking-io.bat",
"processInputs/echo",
"processInputs/echo.bat",
"processInputs/in-to-out",
"processInputs/in-to-out.bat",
]
),
.testTarget(
Expand Down
14 changes: 14 additions & 0 deletions Sources/Basics/Concurrency/AsyncProcess.swift
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,20 @@ package final class AsyncProcess {
self.loggingHandler = loggingHandler ?? AsyncProcess.loggingHandler
}

package convenience init(
args: [String],
environment: Environment = .current,
outputRedirection: OutputRedirection = .collect,
loggingHandler: LoggingHandler? = .none
) {
self.init(
arguments: args,
environment: environment,
outputRedirection: outputRedirection,
loggingHandler: loggingHandler
)
}

package convenience init(
args: String...,
environment: Environment = .current,
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/SwiftRunCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ public struct SwiftRunCommand: AsyncSwiftCommand {
// If the executable is implicit, search through root products.
let rootExecutables = graph.rootPackages
.flatMap { $0.products }
.filter { $0.type == .executable || $0.type == .snippet }
// The type checker slows down significantly when ProductTypes arent explicitly typed.
.filter { $0.type == ProductType.executable || $0.type == ProductType.snippet }
.map { $0.name }

// Error out if the package contains no executables.
Expand Down
5 changes: 0 additions & 5 deletions Sources/PackageDescription/PackageDependency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ extension Package.Dependency {
/// ```
///
/// - Parameters:
/// - name: The name of the package, or nil to deduce it from the URL.
/// - url: The valid Git URL of the package.
/// - range: The custom version range requirement.
///
Expand All @@ -534,7 +533,6 @@ extension Package.Dependency {
/// ```
///
/// - Parameters:
/// - name: The name of the package, or nil to deduce it from the URL.
/// - url: The valid Git URL of the package.
/// - range: The custom version range requirement.
/// - traits: The trait configuration of this dependency. Defaults to enabling the default traits.
Expand Down Expand Up @@ -585,7 +583,6 @@ extension Package.Dependency {
/// ```
///
/// - Parameters:
/// - name: The name of the package, or `nil` to deduce it from the URL.
/// - url: The valid Git URL of the package.
/// - range: The closed version range requirement.
///
Expand All @@ -608,7 +605,6 @@ extension Package.Dependency {
/// ```
///
/// - Parameters:
/// - name: The name of the package, or `nil` to deduce it from the URL.
/// - url: The valid Git URL of the package.
/// - range: The closed version range requirement.
/// - traits: The trait configuration of this dependency. Defaults to enabling the default traits.
Expand Down Expand Up @@ -788,7 +784,6 @@ extension Package.Dependency {
/// Adds a remote package dependency given a version requirement.
///
/// - Parameters:
/// - name: The name of the package, or nil to deduce it from the URL.
/// - url: The valid Git URL of the package.
/// - requirement: A dependency requirement. See static methods on `Package.Dependency.Requirement` for available options.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@

- ``when(platforms:)``
- ``when(configuration:)``
- ``when(platforms:configuration:)-2991l``
- ``when(platforms:configuration:)-475co``
- ``when(platforms:configuration:traits:)``
- ``when(platforms:configuration:)-2991l``
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,52 @@
### Creating a Package Dependency

- ``package(name:path:)``
- ``package(name:path:traits:)``
- ``package(path:)``
- ``package(path:traits:)``
- ``package(url:from:)``
- ``package(url:_:)-2ys47``
- ``package(url:_:)-1r6rc``
- ``package(url:branch:)``
- ``package(url:revision:)``
- ``package(url:exact:)``
- ``package(path:)``
- ``package(url:exact:traits:)``
- ``package(url:_:traits:)-(_,Range<Version>,_)``
- ``package(url:_:traits:)-(_,ClosedRange<Version>,_)``
- ``package(url:branch:traits:)``
- ``package(url:from:traits:)``
- ``package(url:revision:traits:)``
- ``package(id:_:)-(_,Range<Version>)``
- ``package(id:_:)-(_,ClosedRange<Version>)``
- ``package(id:_:traits:)-(_,Range<Version>,_)``
- ``package(id:_:traits:)-(_,ClosedRange<Version>,_)``
- ``package(id:exact:)``
- ``package(id:exact:traits:)``
- ``package(id:from:)``
- ``package(id:from:traits:)``
- ``package(name:url:_:)-(String?,_,_)``
- ``package(name:url:_:)-(_,_,Range<Version>)``
- ``package(name:url:_:)-(_,_,ClosedRange<Version>)``
- ``package(name:url:branch:)``
- ``package(name:url:from:)``
- ``package(name:url:revision:)``
- ``package(url:_:)-(_,Package.Dependency.Requirement)``
- ``name``
- ``url``

### Declaring Requirements

- ``requirement-swift.property``
- ``Requirement-swift.enum``
- ``traits``
- ``Trait``
- ``RegistryRequirement``
- ``SourceControlRequirement``

### Describing a Package Dependency

- ``name``
- ``url``
- ``kind-swift.property``
- ``Kind``
- ``Version``
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

Hashes the C language standard by feeding the item into the given hasher.

- Parameter into: The hasher.
- Parameter hasher: The hasher.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

Hashes the C++ language standard by feeding the item into the given hasher.

- Parameter into: The hasher.
- Parameter hasher: The hasher.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

Hashes the language tag by feeding the item into the given hasher.

- Parameter into: The hasher.
- Parameter hasher: The hasher.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Implement this method to conform to the Hashable protocol. The components used f
> Important:
> Never call finalize() on hasher. Doing so may become a compile-time error in the future.

- Parameter into: The hasher to use when combining the components of this instance.
- Parameter hasher: The hasher to use when combining the components of this instance.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

Hashes the localization by feeding the item into the given hasher.

- Parameter into: The hasher.
- Parameter hasher: The hasher.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

Hashes the target type by feeding the item into the given hasher.

- Parameter into: The hasher.
- Parameter hasher: The hasher.


Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

### Creating a Language Tag

- ``init(_:)``
- <doc:/documentation/PackageDescription/LanguageTag/init(extendedGraphemeClusterLiteral:)-36buv>
- ``init(stringLiteral:)``
- <doc:/documentation/PackageDescription/LanguageTag/init(unicodeScalarLiteral:)-1j41k>
Expand All @@ -13,7 +12,6 @@

### Describing a Language Tag

- ``tag``
- ``description``

### Hashing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

### Creating a Package

- ``Package/init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)``
- ``Package/init(name:defaultLocalization:platforms:pkgConfig:providers:products:traits:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)``
- ``Package/init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)``
- ``Package/init(name:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)``
- ``Package/init(name:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)-(_,_,_,_,_,_,[Int]?,_,_)``
- ``Package/init(name:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)-(_,_,_,_,_,_,[SwiftVersion]?,_,_)``


### Naming the Package

Expand Down Expand Up @@ -37,16 +43,23 @@
- ``Package/pkgConfig``
- ``Package/providers``

### Configuring Traits

- ``Package/traits``
- ``Trait``

### Declaring Package Dependencies

- ``Package/dependencies``
- ``Package/Dependency``

### Declaring Supported Languages

- ``SwiftLanguageMode``
- ``SwiftVersion``
- ``CLanguageStandard``
- ``CXXLanguageStandard``
- ``Package/swiftLanguageModes``
- ``Package/swiftLanguageVersions``
- ``Package/cLanguageStandard``
- ``Package/cxxLanguageStandard``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
- ``macOS``
- ``tvOS``
- ``watchOS``
- ``visionOS``
- ``macCatalyst``
- ``driverKit``
- ``android``
- ``linux``
- ``freebsd``
- ``openbsd``
- ``wasi``
- ``windows``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
- ``process(_:localization:)``
- ``Localization``
- ``copy(_:)``
- ``embedInCode(_:)``
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,10 @@
- <doc:/documentation/PackageDescription/Platform/driverKit>
- ``DriverKitVersion``

### Supporting Linux

- <doc:/documentation/PackageDescription/Platform/linux>

### Type methods
### Supporting Custom Platforms

- ``custom(_:versionString:)``

### Operator Functions

- ``!=(_:_:)``
- ``==(_:_:)``

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,14 @@

### Creating a Target Dependency

- ``product(name:package:moduleAliases:condition:)``
- ``product(name:package:condition:)``
- ``product(name:package:)-fp0j``
- ``product(name:package:)-2nako``
- ``product(name:package:moduleAliases:)``
- ``product(name:package:moduleAliases:condition:)``
- ``productItem(name:package:condition:)``
- ``target(name:condition:)``
- ``target(name:)``
- ``byName(name:condition:)``
- ``byName(name:)``
- ``TargetDependencyCondition``
- ``init(stringLiteral:)``
- ``init(extendedGraphemeClusterLiteral:)``
- ``init(unicodeScalarLiteral:)``

### Identifying related types

- ``ExtendedGraphemeClusterLiteralType``
- ``StringLiteralType``
- ``UnicodeScalarLiteralType``
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
### Creating a Dependency Condition

- ``when(platforms:)-5bxhc``
- ``when(traits:)``
- ``when(platforms:traits:)``
- ``when(platforms:)-4djh6``
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,29 @@

### Creating an Executable Target

- ``executableTarget(name:dependencies:path:exclude:sources:resources:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:)``
- ``executableTarget(name:dependencies:path:exclude:sources:resources:publicHeadersPath:packageAccess:cSettings:cxxSettings:swiftSettings:linkerSettings:plugins:)``
- ``executableTarget(name:dependencies:path:exclude:sources:resources:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:plugins:)``
- ``executableTarget(name:dependencies:path:exclude:sources:resources:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:)``

### Creating a Regular Target

- ``target(name:dependencies:path:exclude:sources:resources:publicHeadersPath:packageAccess:cSettings:cxxSettings:swiftSettings:linkerSettings:plugins:)``
- ``target(name:dependencies:path:exclude:sources:resources:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:plugins:)``
- ``target(name:dependencies:path:exclude:sources:resources:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:)``
- ``target(name:dependencies:path:exclude:sources:publicHeadersPath:cSettings:cxxSettings:swiftSettings:linkerSettings:)``
- ``target(name:dependencies:path:exclude:sources:publicHeadersPath:)``

### Creating a Test Target

- ``testTarget(name:dependencies:path:exclude:sources:resources:packageAccess:cSettings:cxxSettings:swiftSettings:linkerSettings:plugins:)``
- ``testTarget(name:dependencies:path:exclude:sources:resources:cSettings:cxxSettings:swiftSettings:linkerSettings:plugins:)``
- ``testTarget(name:dependencies:path:exclude:sources:resources:cSettings:cxxSettings:swiftSettings:linkerSettings:)``
- ``testTarget(name:dependencies:path:exclude:sources:cSettings:cxxSettings:swiftSettings:linkerSettings:)``
- ``testTarget(name:dependencies:path:exclude:sources:)``

### Creating a Plugin Target

- ``plugin(name:capability:dependencies:path:exclude:sources:packageAccess:)``
- ``plugin(name:capability:dependencies:path:exclude:sources:)``
- ``pluginCapability-swift.property``
- ``PluginCapability-swift.enum``
Expand All @@ -61,6 +79,7 @@
- ``SwiftSetting``
- ``LinkerSetting``
- ``PluginUsage``
- ``packageAccess``

### Describing the Target Type

Expand Down
2 changes: 2 additions & 0 deletions Sources/PackageDescription/PackageDescription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public final class Package {
/// - pkgConfig: The name to use for C modules. If present, the Swift
/// Package Manager searches for a `<name>.pc` file to get the
/// additional flags required for a system target.
/// - providers: The system package providers that this package uses.
/// - products: The list of products that this package makes available for clients to use.
/// - dependencies: The list of package dependencies.
/// - targets: The list of targets that are part of this package.
Expand Down Expand Up @@ -211,6 +212,7 @@ public final class Package {
/// - pkgConfig: The name to use for C modules. If present, the Swift
/// Package Manager searches for a `<name>.pc` file to get the
/// additional flags required for a system target.
/// - providers: The system package providers that this package uses.
/// - products: The list of products that this package makes available for clients to use.
/// - dependencies: The list of package dependencies.
/// - targets: The list of targets that are part of this package.
Expand Down
Loading