Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 40 additions & 7 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,62 @@ concurrency:
cancel-in-progress: true

jobs:
tests:
name: Test
tests-using-native:
needs: [soundness]
strategy:
fail-fast: false
matrix:
buildSystem: ["native", "swiftbuild"]
linuxSwiftVersion: ['["nightly-main", "nightly-6.2"]', '["nightly-main"]']
enable_windows_checks: [true]
exclude:
- buildSystem: "swiftbuild"
linuxSwiftVersion: '["nightly-main", "nightly-6.2"]'
- buildSystem: "swiftbuild"
enable_windows_checks: true
- buildSystem: "native"
linuxSwiftVersion: '["nightly-main"]'
name: Test (${{ matrix.buildSystem }})
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.1
with:
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]'
linux_swift_versions: ${{ matrix.linuxSwiftVersion }}
linux_pre_build_command: ./.github/scripts/prebuild.sh
linux_build_command: 'swift run swift-build --build-tests --build-system ${{ matrix.buildSystem}}'
windows_swift_versions: '["nightly-main"]'
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_build_command: 'Invoke-Program swift run swift-build --build-tests --build-system ${{ matrix.buildSystem}}'
enable_windows_checks: ${{ matrix.enable_windows_checks }}
enable_ios_checks: true
enable_macos_checks: true
macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.3\"}, {\"xcode_version\": \"16.4\"}]"
macos_build_command: 'swift run swift-build --build-tests --build-system ${{ matrix.buildSystem}}'

tests-using-swiftbuild:
name: Test (all SwiftBuild)
needs: [soundness]
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.1
with:
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]'
linux_swift_versions: '["nightly-main"]'
linux_pre_build_command: ./.github/scripts/prebuild.sh
linux_build_command: 'swift build'
linux_build_command: 'swift run --build-system swiftbuild swift-build --build-tests --build-system swiftbuild'
enable_windows_checks: false
windows_swift_versions: '["nightly-main"]'
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_build_command: 'Invoke-Program swift build'
windows_build_command: 'Invoke-Program swift run --build-system swiftbuild swift-build --build-tests --build-system swiftbuild'
enable_ios_checks: true
enable_macos_checks: true
macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.3\"}, {\"xcode_version\": \"16.4\"}]"
macos_build_command: 'swift build'
macos_build_command: 'swift run --build-system swiftbuild swift-build --build-tests --build-system swiftbuild'

soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.1
with:
license_header_check_project_name: "Swift"
license_header_check_enabled: false
unacceptable_language_check_enabled: false
license_header_check_enabled: true
unacceptable_language_check_enabled: true
api_breakage_check_enabled: false
format_check_enabled: false
shell_check_enabled: false
19 changes: 19 additions & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,24 @@
.dir-locals.el
.editorconfig
.swift-version
.swiftformat
.pep8
.mailmap
.mailfilter
CODEOWNERS
Package.swift
Fixtures/**/*.*
**/*.pc
**/*.cer
**/*.zip
**/*.tar
**/*.tgz
**/*.gz
**/*.svg
**/*.bat
**/*.xctestplan
**/processInputs/**
Utilities/bootstrap
Utilities/build-using-self
Utilities/new-bootstrap
Utilities/test-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift open source project
//
// Copyright (c) 2024 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_spi(DontAdoptOutsideOfSwiftPMExposedForBenchmarksAndTestsOnly)
import Basics
import Benchmark
Expand Down Expand Up @@ -103,18 +115,18 @@ let benchmarks = {
)
) { benchmark in
try syntheticModulesGraph(
benchmark,
modulesGraphDepth: modulesGraphDepth,
benchmark,
modulesGraphDepth: modulesGraphDepth,
modulesGraphWidth: modulesGraphWidth,
includeMacros: true
)
}
}

func syntheticModulesGraph(
_ benchmark: Benchmark,
modulesGraphDepth: Int,
modulesGraphWidth: Int,
_ benchmark: Benchmark,
modulesGraphDepth: Int,
modulesGraphWidth: Int,
includeMacros: Bool = false
) throws {
// If macros are included, modules are split in three parts:
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

There are several types of contributions one can make. Bug fixes, documentation and enhancements that do not materially change the user facing semantics of Swift Package Manager should be submitted directly as PR.

Larger changes that do materially change the semantics of Swift Package Manager (e.g. changes to the manifest format or behavior) are required to go through [Swift Evolution Process](https://github.com/swiftlang/swift-evolution/blob/master/process.md).
Larger changes that do materially change the semantics of Swift Package Manager (e.g. changes to the manifest format or behavior) are required to go through [Swift Evolution Process](https://github.com/swiftlang/swift-evolution/blob/main/process.md).

To see how previous evolution decisions for SwiftPM have been made and have some direction for the development of future features please check out the [Community Proposals](https://forums.swift.org/tag/packagemanager).

Expand All @@ -16,7 +16,7 @@ Fill the following fields:

* `Title`: A one line summary of the problem you're facing.
* `Description`: The complete description of the problem. Be specific.
* `Expected behavior`: How you expect SwiftPM to behave.
* `Expected behavior`: How you expect SwiftPM to behave.
* `Actual behavior` : What actually happens.
* `Steps to reproduce`: Be specific, provide steps to reproduce the bug.
* `Swift Package Manager version/commit hash` : With which version are you testing.
Expand Down Expand Up @@ -510,5 +510,5 @@ Make sure to update your TSC (Tools Support Core):
```bash
$> swift package update
```
Alternatively, if you are using Xcode, you can update to the latest version of all packages:
Alternatively, if you are using Xcode, you can update to the latest version of all packages:
**Xcode App** > *File* > *Swift Packages* > *Update to Latest Package Versions*
2 changes: 1 addition & 1 deletion Documentation/Design/EvolutionIdeas.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you're interested in participating in a particular evolution idea, please
familiarize yourself with the existing discussion on that topic and start
participating in the discussion thread of that idea. If a thread doesn't exist
for that idea, please start one with a [draft
proposal](https://github.com/swiftlang/swift-evolution/blob/master/proposal-templates/0000-swiftpm-template.md)
proposal](https://github.com/swiftlang/swift-evolution/blob/main/proposal-templates/0000-swiftpm-template.md)
that can be used as a starting point.

**Important Note**: This list is not in any particular order. I plan to keep
Expand Down
78 changes: 39 additions & 39 deletions Documentation/PackageRegistry/Registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ Valid `Accept` header field values are described by the following rules:
```

A server MUST set the `Content-Type` header field
with the corresponding content type of the response.
with the corresponding content type of the response.

A server MUST set the `Content-Version` header field
with the API version number of the response, unless
explicitly stated otherwise.
with the API version number of the response, unless
explicitly stated otherwise.

```http
HTTP/1.1 200 OK
Expand Down Expand Up @@ -523,11 +523,11 @@ with a given combination of `name` and `type` values.

#### 4.2.2. Package release metadata standards

[Appendix B](#appendix-b---package-release-metadata-json-schema)
[Appendix B](#appendix-b---package-release-metadata-json-schema)
defines the JSON schema for package release metadata that
gets submitted as part of the ["create a package release"](#endpoint-6)
request. A server MAY allow and/or populate additional metadata by
expanding the schema. The `metadata` key in the
request. A server MAY allow and/or populate additional metadata by
expanding the schema. The `metadata` key in the
["fetch information about a package release "](#endpoint-2) API response
will hold the user-provided as well as the server populated metadata.

Expand Down Expand Up @@ -717,7 +717,7 @@ It is RECOMMENDED for clients and servers to support
range requests as described by [RFC 7233]
and caching as described by [RFC 7234].

If a release is signed, a server MUST include
If a release is signed, a server MUST include
`X-Swift-Package-Signature-Format` and `X-Swift-Package-Signature`
headers in the response.

Expand Down Expand Up @@ -777,7 +777,7 @@ Digest: sha-256=a2ac54cf25fbc1ad0028f03f0aa4b96833b83bb05a14e510892bb27dea4dc812

A client MUST validate the signature of a signed archive
according to the signature format and configuration. Signing
information can alternatively be found in the associated
information can alternatively be found in the associated
`source-archive` resource in the response to `GET /{scope}/{name}/{version}`,
as described in [4.2.1](#421-package-release-resources).

Expand Down Expand Up @@ -830,12 +830,12 @@ caching as described by [RFC 7234].
#### 4.5.1 URL to package identifier mappings

As part of the [package release metadata](#422-package-release-metadata-standards)
JSON object, the `repositoryURLs` array can be used to specify
URLs associated with a package identifier. This is one way
through which a server can obtain URL to package identifier
mappings for this API.
JSON object, the `repositoryURLs` array can be used to specify
URLs associated with a package identifier. This is one way
through which a server can obtain URL to package identifier
mappings for this API.

A server MAY choose other mechanism(s) for package authors
A server MAY choose other mechanism(s) for package authors
to specify these mappings.

A server SHOULD validate the package author's ownership claim
Expand All @@ -859,19 +859,19 @@ with the following sections:
| `metadata` | `application/json` | Additional information about the release. | OPTIONAL |
| `metadata-signature` | `application/octet-stream` | The signature of the metadata. | OPTIONAL |

A client MUST set a `Content-Type` header with the value
A client MUST set a `Content-Type` header with the value
`multipart/form-data`. `boundary` can be any string.

A client MAY use any valid value (e.g., `binary`) for the
`Content-Transfer-Encoding` header.

A client SHOULD set the `Content-Length` header with
A client SHOULD set the `Content-Length` header with
the total size of the body in bytes.

A client SHOULD set the `Accept` header with the value
`application/vnd.swift.registry.v1+json`.

A client MUST set a `X-Swift-Package-Signature-Format` header
A client MUST set a `X-Swift-Package-Signature-Format` header
with the signature format if the source archive is signed.

```http
Expand Down Expand Up @@ -1079,7 +1079,7 @@ Content-Language: en
{
"detail": "invalid JSON provided for release metadata"
}
```
```

#### 4.6.3. Synchronous and asynchronous publication

Expand Down Expand Up @@ -1262,13 +1262,13 @@ See [registry.openapi.yaml](./registry.openapi.yaml).

## Appendix B - Package Release Metadata JSON Schema

The `metadata` section of the [create package release request](#46-create-a-package-release)
The `metadata` section of the [create package release request](#46-create-a-package-release)
must be a JSON object of type [`PackageRelease`](#packagerelease-type), as defined in the
JSON schema below.

<details>

<summary>Expand to view <a href="https://json-schema.org/specification.html">JSON schema</a></summary>
<summary>Expand to view <a href="https://json-schema.org/specification.html">JSON schema</a></summary>

```json
{
Expand All @@ -1282,52 +1282,52 @@ JSON schema below.
"type": "object",
"properties": {
"name": {
"type": "string",
"type": "string",
"description": "Name of the author."
},
},
"email": {
"type": "string",
"format": "email",
"description": "Email address of the author."
},
},
"description": {
"type": "string",
"type": "string",
"description": "A description of the author."
},
"organization": {
"type": "object",
"properties": {
"name": {
"type": "string",
"type": "string",
"description": "Name of the organization."
},
},
"email": {
"type": "string",
"format": "email",
"format": "email",
"description": "Email address of the organization."
},
},
"description": {
"type": "string",
"type": "string",
"description": "A description of the organization."
},
},
"url": {
"type": "string",
"format": "uri",
"format": "uri",
"description": "URL of the organization."
},
},
},
"required": ["name"]
},
},
"url": {
"type": "string",
"format": "uri",
"type": "string",
"format": "uri",
"description": "URL of the author."
},
},
},
"required": ["name"]
},
"description": {
"type": "string",
"type": "string",
"description": "A description of the package release."
},
"licenseURL": {
Expand All @@ -1342,7 +1342,7 @@ JSON schema below.
},
"readmeURL": {
"type": "string",
"format": "uri",
"format": "uri",
"description": "URL of the README specifically for the package release or broadly for the package."
},
"repositoryURLs": {
Expand All @@ -1351,7 +1351,7 @@ JSON schema below.
"items": {
"type": "string",
"description": "Code repository URL."
}
}
}
}
}
Expand Down Expand Up @@ -1427,6 +1427,6 @@ JSON schema below.
[thundering herd effect]: https://en.wikipedia.org/wiki/Thundering_herd_problem "Thundering herd problem"
[offline cache]: https://yarnpkg.com/features/offline-cache "Offline Cache | Yarn - Package Manager"
[XCFramework]: https://developer.apple.com/videos/play/wwdc2019/416/ "WWDC 2019 Session 416: Binary Frameworks in Swift"
[SE-0272]: https://github.com/swiftlang/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md "Package Manager Binary Dependencies"
[SE-0272]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0272-swiftpm-binary-dependencies.md "Package Manager Binary Dependencies"
[Swift tools version]: https://github.com/swiftlang/swift-package-manager/blob/9b9bed7eaf0f38eeccd0d8ca06ae08f6689d1c3f/Documentation/Usage.md#swift-tools-version-specification "Swift Tools Version Specification"
[ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html "ISO 8601 Date and Time Format"
2 changes: 1 addition & 1 deletion Documentation/libSwiftPM.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A subset of `libSwiftPM` that includes only the data model (without SwiftPM's
build system) is available as `libSwiftPMDataModel`. Any one client should
depend on one or the other, but not both.

The SwiftPM repository contains an [example](https://github.com/swiftlang/swift-package-manager/tree/master/Examples/package-info) that demonstrates the use of
The SwiftPM repository contains an [example](https://github.com/swiftlang/swift-package-manager/tree/main/Examples/package-info) that demonstrates the use of
`libSwiftPM` in a Swift package. Use the following commands to run the example
package:

Expand Down
Loading