Skip to content

Commit aa6f358

Browse files
authored
Rearrangement in preparation for 5.9 branching (#6309)
- `embedInCode` should be marked as part of 5.9 - `-package-name` hasn't been accepted by evolution, yet, so should be using `vNext` - support for macros also stays intentionally behind 999.0 tools-version since it hasn't been accepted by evolution yet - Update `CHANGELOG`
1 parent e02a8b5 commit aa6f358

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

CHANGELOG.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,21 @@ Note: This is in reverse chronological order, so newer entries are added to the
33
Swift Next
44
-----------
55

6-
* [#5966]
7-
8-
Plugin compilation can be influenced by using `-Xbuild-tools-swiftc` arguments in the SwiftPM command line. This is similar to the existing mechanism for influencing the manifest compilation using `-Xmanifest` arguments. Manifest compilation will also be influenced by `-Xbuild-tools-swiftc`, but only if no other `-Xmanifest` arguments are provided. Using `-Xmanifest` will show a deprecation message. `-Xmanifest` will be removed in the future.
9-
106
* [#5728]
117

128
In packages that specify resources using a future tools version, the generated resource bundle accessor will import `Foundation.Bundle` for its own implementation only. _Clients_ of such packages therefore no longer silently import `Foundation`, preventing inadvertent use of Foundation extensions to standard library APIs, which helps to avoid unexpected code size increases.
139

10+
* [#6185], [#6200]
11+
12+
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).
13+
14+
Swift 5.9
15+
-----------
16+
17+
* [#5966]
18+
19+
Plugin compilation can be influenced by using `-Xbuild-tools-swiftc` arguments in the SwiftPM command line. This is similar to the existing mechanism for influencing the manifest compilation using `-Xmanifest` arguments. Manifest compilation will also be influenced by `-Xbuild-tools-swiftc`, but only if no other `-Xmanifest` arguments are provided. Using `-Xmanifest` will show a deprecation message. `-Xmanifest` will be removed in the future.
20+
1421
* [#6067]
1522

1623
Basic support for a new `.embedInCode` resource rule which allows embedding the contents of the resource into the executable code by generating a byte array, e.g.
@@ -21,9 +28,6 @@ Swift Next
2128
}
2229
```
2330

24-
Swift 5.9
25-
-----------
26-
2731
* [#6294]
2832

2933
When a package contains a single target, sources may be distributed anywhere within the `./Sources` directory. If sources are placed in a subdirectory under `./Sources/<target>`, or there is more than one target, the existing expectation for sources apply.

Fixtures/Miscellaneous/PackageNameFlag/appPkg/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.9
1+
// swift-tools-version:999.0
22
import PackageDescription
33

44
let package = Package(

Fixtures/Miscellaneous/PackageNameFlag/fooPkg/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.9
1+
// swift-tools-version:999.0
22
import PackageDescription
33

44
let package = Package(

Fixtures/Resources/EmbedInCodeSimple/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 999.0
1+
// swift-tools-version: 5.9
22

33
import PackageDescription
44

Sources/PackageDescription/Resource.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public struct Resource {
9797
}
9898

9999
/// Applies the embed rule to a resource at the given path.
100-
@available(_PackageDescription, introduced: 999.0)
100+
@available(_PackageDescription, introduced: 5.9)
101101
public static func embedInCode(_ path: String) -> Resource {
102102
return Resource(rule: "embedInCode", path: path, localization: nil)
103103
}

Sources/PackageModel/PackageModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ extension Manifest {
126126
return self.toolsVersion >= .v5_8
127127
}
128128
public var usePackageNameFlag: Bool {
129-
return self.toolsVersion >= .v5_9
129+
return self.toolsVersion >= .vNext
130130
}
131131
}
132132

0 commit comments

Comments
 (0)