Skip to content

Commit 0840562

Browse files
committed
Rename "future feature" to "upcoming feature" per SE-0362.
1 parent 066ab07 commit 0840562

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

Sources/PackageDescription/BuildSettings.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -297,47 +297,47 @@ public struct SwiftSetting: Encodable {
297297
return SwiftSetting(name: "unsafeFlags", value: flags, condition: condition)
298298
}
299299

300-
/// Enable an future feature with the given name.
300+
/// Enable an upcoming feature with the given name.
301301
///
302-
/// A future feature is one that has been accepted into Swift as of a
302+
/// An upcoming feature is one that has been accepted into Swift as of a
303303
/// certain language version, but is not available by default in prior
304304
/// language modes because it has some impact on source compatibility.
305305
///
306-
/// Multiple future features can be added to a given target, and can
306+
/// Multiple upcoming features can be added to a given target, and can
307307
/// be used in a target without affecting its dependencies. An unknown
308-
/// future feature will be ignored by the implementation.
308+
/// upcoming feature will be ignored by the implementation.
309309
///
310-
/// - Since: First available in PackageDescription 5.7.
310+
/// - Since: First available in PackageDescription 5.8.
311311
///
312312
/// - Parameters:
313-
/// - name: The name of the future feature, e.g., ConciseMagicFile.
313+
/// - name: The name of the upcoming feature, e.g., ConciseMagicFile.
314314
/// - condition: A condition that restricts the application of the build
315315
/// setting.
316-
@available(_PackageDescription, introduced: 5.7)
317-
public static func enableFutureFeature(
316+
@available(_PackageDescription, introduced: 5.8)
317+
public static func enableUpcomingFeature(
318318
_ name: String,
319319
_ condition: BuildSettingCondition? = nil
320320
) -> SwiftSetting {
321321
return SwiftSetting(
322-
name: "futureFeatures", value: [name], condition: condition)
322+
name: "upcomingFeatures", value: [name], condition: condition)
323323
}
324324

325325
/// Enable an experimental feature with the given name.
326326
///
327-
/// An experimental feature is one that has is in development, but
327+
/// An experimental feature is one that is in development, but
328328
/// has not been accepted into Swift as a language feature.
329329
///
330330
/// Multiple experimental features can be added to a given target, and can
331331
/// be used in a target without affecting its dependencies. An unknown
332332
/// experimental feature will be ignored by the implementation.
333333
///
334-
/// - Since: First available in PackageDescription 5.7.
334+
/// - Since: First available in PackageDescription 5.8.
335335
///
336336
/// - Parameters:
337337
/// - name: The name of the experimental feature, e.g., VariadicGenerics.
338338
/// - condition: A condition that restricts the application of the build
339339
/// setting.
340-
@available(_PackageDescription, introduced: 5.7)
340+
@available(_PackageDescription, introduced: 5.8)
341341
public static func enableExperimentalFeature(
342342
_ name: String,
343343
_ condition: BuildSettingCondition? = nil

Sources/PackageLoading/ManifestJSONParser.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ enum ManifestJSONParser {
425425
kind = .linkedFramework(value)
426426
case "unsafeFlags":
427427
kind = .unsafeFlags(values)
428-
case "futureFeatures":
429-
kind = .futureFeatures(values)
428+
case "upcomingFeatures":
429+
kind = .upcomingFeatures(values)
430430
case "experimentalFeatures":
431431
kind = .experimentalFeatures(values)
432432
default:

Sources/PackageLoading/PackageBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ public final class PackageBuilder {
978978
decl = .OTHER_LDFLAGS
979979
}
980980

981-
case .futureFeatures(let _values):
981+
case .upcomingFeatures(let _values):
982982
switch setting.tool {
983983
case .c, .cxx, .linker:
984984
throw InternalError("only Swift supports future features")

Sources/PackageModel/Manifest/TargetBuildSettingDescription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public enum TargetBuildSettingDescription {
2929
case linkedFramework(String)
3030

3131
case unsafeFlags([String])
32-
case futureFeatures([String])
32+
case upcomingFeatures([String])
3333
case experimentalFeatures([String])
3434
}
3535

Sources/PackageModel/ManifestSourceGeneration.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ fileprivate extension SourceCodeFragment {
487487
params.append(SourceCodeFragment(from: condition))
488488
}
489489
self.init(enum: setting.kind.name, subnodes: params)
490-
case .unsafeFlags(let values), .futureFeatures(let values), .experimentalFeatures(let values):
490+
case .unsafeFlags(let values), .upcomingFeatures(let values), .experimentalFeatures(let values):
491491
params.append(SourceCodeFragment(strings: values))
492492
if let condition = setting.condition {
493493
params.append(SourceCodeFragment(from: condition))
@@ -639,8 +639,8 @@ extension TargetBuildSettingDescription.Kind {
639639
return "linkedFramework"
640640
case .unsafeFlags:
641641
return "unsafeFlags"
642-
case .futureFeatures:
643-
return "futureFeatures"
642+
case .upcomingFeatures:
643+
return "upcomingFeatures"
644644
case .experimentalFeatures:
645645
return "experimentalFeatures"
646646
}

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3219,8 +3219,8 @@ final class BuildPlanTests: XCTestCase {
32193219
.init(tool: .swift, kind: .define("RLINUX"), condition: .init(platformNames: ["linux"], config: "release")),
32203220
.init(tool: .swift, kind: .define("DMACOS"), condition: .init(platformNames: ["macos"], config: "debug")),
32213221
.init(tool: .swift, kind: .unsafeFlags(["-Isfoo", "-L", "sbar"])),
3222-
.init(tool: .swift, kind: .futureFeatures(["BestFeature"])),
3223-
.init(tool: .swift, kind: .futureFeatures(["WorstFeature"]), condition: .init(platformNames: ["macos"], config: "debug"))
3222+
.init(tool: .swift, kind: .upcomingFeatures(["BestFeature"])),
3223+
.init(tool: .swift, kind: .upcomingFeatures(["WorstFeature"]), condition: .init(platformNames: ["macos"], config: "debug"))
32243224
]
32253225
),
32263226
try TargetDescription(

0 commit comments

Comments
 (0)