Skip to content
Merged
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
14 changes: 12 additions & 2 deletions _posts/2023-08-29-swift-5.9-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,21 @@ Following are some highlights from the changes introduced to the [Swift Package

- SwiftPM packages can now use `package` as a new access modifier, allowing accessing symbols in another target / module within the same package without making it public.

- New `swift experimental-sdk` experimental command is now available for managing Swift SDK bundles that follow the format described in [SE-0387](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md).
- Introducing `CompilerPluginSupport` module for defining macro targets. Macro targets allow authoring and distribution of custom Swift macros such as [expression macros](https://github.com/apple/swift-evolution/blob/main/proposals/0382-expression-macros.md).

- Introducing new `.embedInCode` resource rule for embedding the contents of the resource into the executable by generating a byte array, e.g.

```
struct PackageResources {
static let my_resource: [UInt8] = [104,101,108,108,111,32,119,111,114,108,100,10]
}
```

- `allowNetworkConnections(scope:reason:)` setting giving a command plugin permissions to access the network. Permissions can be scoped to Unix domain sockets in general or specifically for Docker, as well as local or remote IP connections which can be limited by port. For non-interactive use cases, there is also a `--allow-network-connections` commandline flag to allow network connections for a particular scope.

- SwiftPM can now publish to a registry following the publishing spec as defined in [SE-0391](https://github.com/apple/swift-evolution/blob/main/proposals/0391-package-registry-publish.md). SwiftPM also gains support for signed packages. Trust-on-first-use (TOFU) check which includes only fingerprints (e.g., checksums) previously has been extended to include signing identities, and it is enforced for source archives as well as package manifests.

- Add a new `CompilerPluginSupport` module which contains the definition for macro targets. Macro targets allow authoring and distribution of custom Swift macros such as [expression macros](https://github.com/apple/swift-evolution/blob/main/proposals/0382-expression-macros.md).
- New `swift experimental-sdk` experimental command is now available for managing Swift SDK bundles that follow the format described in [SE-0387](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md).

See the [Swift Package Manager changelog](https://github.com/apple/swift-package-manager/blob/main/CHANGELOG.md#swift-59) for the complete list of changes.

Expand Down