Skip to content

Commit 156c16e

Browse files
glbrnttMrLotU
andauthored
Update minimum required Swift version to 5.2 (#51)
Motivation: - SwiftNIO will soon raise it's minimum supported version of Swift from 5.0 to 5.2 (see: apple/swift-nio#1860) - Swift 5.0 and 5.1 users will not be able to use future versions of NIO (most likely from version 2.30.0). - Since Prometheus depends on NIO and NIO is so pervasive in the ecosystem it makes sense to follow NIOs lead in terms of supported Swift versions. Modifications: - Update Package.swift to change the tools version to 5.2 - Use the newer syntax for specifying target dependencies - Remove Package.resolved since it has little value for libraries - Update circle.yml to update CI jobs - Update Swift version badge in README.md Co-authored-by: Jari (LotU) <[email protected]>
1 parent 1478fd9 commit 156c16e

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

Package.swift

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.2
1+
// swift-tools-version:5.2
22

33
import PackageDescription
44

@@ -19,12 +19,19 @@ let package = Package(
1919
targets: [
2020
.target(
2121
name: "Prometheus",
22-
dependencies: ["CoreMetrics", "NIOConcurrencyHelpers", "NIO"]),
22+
dependencies: [
23+
.product(name: "CoreMetrics", package: "swift-metrics"),
24+
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
25+
.product(name: "NIO", package: "swift-nio"),
26+
]),
2327
.target(
2428
name: "PrometheusExample",
25-
dependencies: ["Prometheus", "Metrics"]),
29+
dependencies: [
30+
.target(name: "Prometheus"),
31+
.product(name: "Metrics", package: "swift-metrics"),
32+
]),
2633
.testTarget(
2734
name: "SwiftPrometheusTests",
28-
dependencies: ["Prometheus"]),
35+
dependencies: [.target(name: "Prometheus")]),
2936
]
3037
)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![CircleCI](https://circleci.com/gh/MrLotU/SwiftPrometheus.svg?style=svg)](https://circleci.com/gh/MrLotU/SwiftPrometheus)[![Swift 5.0](https://img.shields.io/badge/swift-5.0-orange.svg?style=flat)](http://swift.org)
1+
[![CircleCI](https://circleci.com/gh/MrLotU/SwiftPrometheus.svg?style=svg)](https://circleci.com/gh/MrLotU/SwiftPrometheus)[![Swift 5.2](https://img.shields.io/badge/swift-5.2-orange.svg?style=flat)](http://swift.org)
22

33
# SwiftPrometheus, Prometheus client for Swift
44

circle.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ version: 2
33
jobs:
44
swift5:
55
docker:
6-
- image: swift:5.0
6+
- image: swift:5.2
77
steps:
88
- checkout
99
- run: apt-get update; apt-get install -y libssl-dev zlib1g-dev
1010
- run: swift build
1111
- run: swift test
1212
bionic:
1313
docker:
14-
- image: vapor/swift:5.1-bionic
14+
- image: vapor/swift:5.2-bionic
1515
steps:
1616
- checkout
1717
- run: apt-get update; apt-get install -y libssl-dev zlib1g-dev
1818
- run: swift build
1919
- run: swift test
2020
bionic-release:
2121
docker:
22-
- image: vapor/swift:5.1-bionic
22+
- image: vapor/swift:5.2-bionic
2323
steps:
2424
- checkout
2525
- run: apt-get update; apt-get install -y libssl-dev zlib1g-dev

0 commit comments

Comments
 (0)