Skip to content

Commit

Permalink
Disable existential any build setting (#312)
Browse files Browse the repository at this point in the history
Motivation:

On 5.8, if the experiment existential any setting is enabled and a
consuming package holds an existential of a type from swift-log without
an explicit 'any' then the build will fail.

Modifications:

- Disable the setting

Result:

Users of 5.8 aren't broken
  • Loading branch information
glbrntt committed Jun 24, 2024
1 parent b3a6373 commit 9cb4860
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
10 changes: 2 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@

import PackageDescription

let swiftSettings: [SwiftSetting] = [
.enableUpcomingFeature("ExistentialAny"),
]

let package = Package(
name: "swift-log",
products: [
Expand All @@ -27,13 +23,11 @@ let package = Package(
targets: [
.target(
name: "Logging",
dependencies: [],
swiftSettings: swiftSettings
dependencies: []
),
.testTarget(
name: "LoggingTests",
dependencies: ["Logging"],
swiftSettings: swiftSettings
dependencies: ["Logging"]
),
]
)
2 changes: 2 additions & 0 deletions docker/docker-compose.2204.510.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ services:
environment:
- WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors
#- SANITIZER_ARG=--sanitize=thread
# Generated test manifest uses existentials without 'any'.
#- EXISTENTIAL_ANY_ARG=-Xswiftc -enable-upcoming-feature -Xswiftc ExistentialAny

shell:
image: swift-log:22.04-5.10
1 change: 1 addition & 0 deletions docker/docker-compose.2204.59.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
image: swift-log:22.04-5.9
environment:
- WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors
- EXISTENTIAL_ANY_ARG=-Xswiftc -enable-upcoming-feature -Xswiftc ExistentialAny
#- SANITIZER_ARG=--sanitize=thread

shell:
Expand Down
2 changes: 2 additions & 0 deletions docker/docker-compose.2204.main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ services:
- IMPORT_CHECK_ARG=--explicit-target-dependency-import-check error
- EXPLICIT_SENDABLE_ARG=-Xswiftc -require-explicit-sendable
- STRICT_CONCURRENCY_ARG=-Xswiftc -strict-concurrency=complete
# Generated test manifest uses existentials without 'any'.
#- EXISTENTIAL_ANY_ARG=-Xswiftc -enable-upcoming-feature -Xswiftc ExistentialAny

shell:
image: swift-log:22.04-main
2 changes: 1 addition & 1 deletion docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:

test:
<<: *common
command: /bin/bash -xcl "swift test $${WARN_AS_ERROR_ARG-} $${SANITIZER_ARG-} $${IMPORT_CHECK_ARG-} $${EXPLICIT_SENDABLE_ARG-} $${STRICT_CONCURRENCY_ARG-}"
command: /bin/bash -xcl "swift test $${WARN_AS_ERROR_ARG-} $${SANITIZER_ARG-} $${IMPORT_CHECK_ARG-} $${EXPLICIT_SENDABLE_ARG-} $${STRICT_CONCURRENCY_ARG-} $${EXISTENTIAL_ANY_ARG-}"

# util

Expand Down

0 comments on commit 9cb4860

Please sign in to comment.