Skip to content

Commit a67efeb

Browse files
dschaefer2pmattosbkhouristmontgomerykateinoigakukun
authored
6.2 merge main (#8580)
Co-authored-by: Paulo Mattos <[email protected]> Co-authored-by: Bassam (Sam) Khouri <[email protected]> Co-authored-by: Stuart Montgomery <[email protected]> Co-authored-by: Yuta Saito <[email protected]> Co-authored-by: nate-chandler <[email protected]> Co-authored-by: Max Desiatov <[email protected]> Co-authored-by: 3405691582 <[email protected]> Co-authored-by: Chris McGee <[email protected]> Co-authored-by: Dave Inglis <[email protected]> Co-authored-by: Jonathan Grynspan <[email protected]> Co-authored-by: Jake Petroules <[email protected]> Co-authored-by: Shawn Hyam <[email protected]> Co-authored-by: Paul LeMarquand <[email protected]> Co-authored-by: Pavel Yaskevich <[email protected]> Co-authored-by: johnbute <[email protected]> Co-authored-by: John Bute <[email protected]> Co-authored-by: Joseph Heck <[email protected]> Co-authored-by: kcieplak <[email protected]>
1 parent 6f79e3f commit a67efeb

File tree

54 files changed

+783
-696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+783
-696
lines changed

Package.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,11 +815,17 @@ let package = Package(
815815
"Archiver/Inputs/invalid_archive.tar.gz",
816816
"Archiver/Inputs/invalid_archive.zip",
817817
"processInputs/long-stdout-stderr",
818+
"processInputs/long-stdout-stderr.bat",
818819
"processInputs/exit4",
820+
"processInputs/exit4.bat",
819821
"processInputs/simple-stdout-stderr",
822+
"processInputs/simple-stdout-stderr.bat",
820823
"processInputs/deadlock-if-blocking-io",
824+
"processInputs/deadlock-if-blocking-io.bat",
821825
"processInputs/echo",
826+
"processInputs/echo.bat",
822827
"processInputs/in-to-out",
828+
"processInputs/in-to-out.bat",
823829
]
824830
),
825831
.testTarget(

Sources/Basics/Concurrency/AsyncProcess.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,20 @@ package final class AsyncProcess {
387387
self.loggingHandler = loggingHandler ?? AsyncProcess.loggingHandler
388388
}
389389

390+
package convenience init(
391+
args: [String],
392+
environment: Environment = .current,
393+
outputRedirection: OutputRedirection = .collect,
394+
loggingHandler: LoggingHandler? = .none
395+
) {
396+
self.init(
397+
arguments: args,
398+
environment: environment,
399+
outputRedirection: outputRedirection,
400+
loggingHandler: loggingHandler
401+
)
402+
}
403+
390404
package convenience init(
391405
args: String...,
392406
environment: Environment = .current,

Sources/Commands/SwiftRunCommand.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ public struct SwiftRunCommand: AsyncSwiftCommand {
274274
// If the executable is implicit, search through root products.
275275
let rootExecutables = graph.rootPackages
276276
.flatMap { $0.products }
277-
.filter { $0.type == .executable || $0.type == .snippet }
277+
// The type checker slows down significantly when ProductTypes arent explicitly typed.
278+
.filter { $0.type == ProductType.executable || $0.type == ProductType.snippet }
278279
.map { $0.name }
279280

280281
// Error out if the package contains no executables.

Sources/PackageDescription/PackageDependency.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ extension Package.Dependency {
511511
/// ```
512512
///
513513
/// - Parameters:
514-
/// - name: The name of the package, or nil to deduce it from the URL.
515514
/// - url: The valid Git URL of the package.
516515
/// - range: The custom version range requirement.
517516
///
@@ -534,7 +533,6 @@ extension Package.Dependency {
534533
/// ```
535534
///
536535
/// - Parameters:
537-
/// - name: The name of the package, or nil to deduce it from the URL.
538536
/// - url: The valid Git URL of the package.
539537
/// - range: The custom version range requirement.
540538
/// - traits: The trait configuration of this dependency. Defaults to enabling the default traits.
@@ -585,7 +583,6 @@ extension Package.Dependency {
585583
/// ```
586584
///
587585
/// - Parameters:
588-
/// - name: The name of the package, or `nil` to deduce it from the URL.
589586
/// - url: The valid Git URL of the package.
590587
/// - range: The closed version range requirement.
591588
///
@@ -608,7 +605,6 @@ extension Package.Dependency {
608605
/// ```
609606
///
610607
/// - Parameters:
611-
/// - name: The name of the package, or `nil` to deduce it from the URL.
612608
/// - url: The valid Git URL of the package.
613609
/// - range: The closed version range requirement.
614610
/// - traits: The trait configuration of this dependency. Defaults to enabling the default traits.
@@ -788,7 +784,6 @@ extension Package.Dependency {
788784
/// Adds a remote package dependency given a version requirement.
789785
///
790786
/// - Parameters:
791-
/// - name: The name of the package, or nil to deduce it from the URL.
792787
/// - url: The valid Git URL of the package.
793788
/// - requirement: A dependency requirement. See static methods on `Package.Dependency.Requirement` for available options.
794789
///

Sources/PackageDescription/PackageDescription.docc/Curation/BuildSettingCondition.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66

77
- ``when(platforms:)``
88
- ``when(configuration:)``
9-
- ``when(platforms:configuration:)-2991l``
109
- ``when(platforms:configuration:)-475co``
10+
- ``when(platforms:configuration:traits:)``
11+
- ``when(platforms:configuration:)-2991l``

Sources/PackageDescription/PackageDescription.docc/Curation/Dependency.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,52 @@
55
### Creating a Package Dependency
66

77
- ``package(name:path:)``
8+
- ``package(name:path:traits:)``
9+
- ``package(path:)``
10+
- ``package(path:traits:)``
811
- ``package(url:from:)``
912
- ``package(url:_:)-2ys47``
1013
- ``package(url:_:)-1r6rc``
1114
- ``package(url:branch:)``
1215
- ``package(url:revision:)``
1316
- ``package(url:exact:)``
14-
- ``package(path:)``
17+
- ``package(url:exact:traits:)``
18+
- ``package(url:_:traits:)-(_,Range<Version>,_)``
19+
- ``package(url:_:traits:)-(_,ClosedRange<Version>,_)``
20+
- ``package(url:branch:traits:)``
21+
- ``package(url:from:traits:)``
22+
- ``package(url:revision:traits:)``
23+
- ``package(id:_:)-(_,Range<Version>)``
24+
- ``package(id:_:)-(_,ClosedRange<Version>)``
25+
- ``package(id:_:traits:)-(_,Range<Version>,_)``
26+
- ``package(id:_:traits:)-(_,ClosedRange<Version>,_)``
27+
- ``package(id:exact:)``
28+
- ``package(id:exact:traits:)``
29+
- ``package(id:from:)``
30+
- ``package(id:from:traits:)``
31+
- ``package(name:url:_:)-(String?,_,_)``
32+
- ``package(name:url:_:)-(_,_,Range<Version>)``
33+
- ``package(name:url:_:)-(_,_,ClosedRange<Version>)``
34+
- ``package(name:url:branch:)``
35+
- ``package(name:url:from:)``
36+
- ``package(name:url:revision:)``
37+
- ``package(url:_:)-(_,Package.Dependency.Requirement)``
38+
- ``name``
39+
- ``url``
1540

1641
### Declaring Requirements
1742

1843
- ``requirement-swift.property``
1944
- ``Requirement-swift.enum``
45+
- ``traits``
46+
- ``Trait``
47+
- ``RegistryRequirement``
48+
- ``SourceControlRequirement``
2049

2150
### Describing a Package Dependency
2251

52+
- ``name``
53+
- ``url``
2354
- ``kind-swift.property``
55+
- ``Kind``
2456
- ``Version``

Sources/PackageDescription/PackageDescription.docc/Curation/Extensions/CLanguageStandard-hash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

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

9-
- Parameter into: The hasher.
9+
- Parameter hasher: The hasher.

Sources/PackageDescription/PackageDescription.docc/Curation/Extensions/CXXLanguageStandard-hash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

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

9-
- Parameter into: The hasher.
9+
- Parameter hasher: The hasher.

Sources/PackageDescription/PackageDescription.docc/Curation/Extensions/LanguageTag-hash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

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

9-
- Parameter into: The hasher.
9+
- Parameter hasher: The hasher.

Sources/PackageDescription/PackageDescription.docc/Curation/Extensions/Library-LibraryType-hash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Implement this method to conform to the Hashable protocol. The components used f
1111
> Important:
1212
> Never call finalize() on hasher. Doing so may become a compile-time error in the future.
1313
14-
- Parameter into: The hasher to use when combining the components of this instance.
14+
- Parameter hasher: The hasher to use when combining the components of this instance.

0 commit comments

Comments
 (0)