Skip to content

Commit 5921ae6

Browse files
authored
Merge branch 'main' into fix-inout-parameter-docs
2 parents 4703e79 + fb9f489 commit 5921ae6

30 files changed

+1659
-530
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

.github/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
changelog:
2+
categories:
3+
- title: SemVer Major
4+
labels:
5+
- ⚠️ semver/major
6+
- title: SemVer Minor
7+
labels:
8+
- 🆕 semver/minor
9+
- title: SemVer Patch
10+
labels:
11+
- 🔨 semver/patch
12+
- title: Other Changes
13+
labels:
14+
- semver/none

.github/workflows/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: "0 8,20 * * *"
8+
9+
jobs:
10+
unit-tests:
11+
name: Unit tests
12+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
13+
with:
14+
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
15+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
16+
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
17+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
18+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
19+
20+
release-builds:
21+
name: Release builds
22+
uses: apple/swift-nio/.github/workflows/release_builds.yml@main

.github/workflows/pull_request.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
soundness:
9+
name: Soundness
10+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
11+
12+
unit-tests:
13+
name: Unit tests
14+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
15+
with:
16+
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
17+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
18+
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
19+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
20+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
21+
22+
cxx-interop:
23+
name: Cxx interop
24+
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
25+
26+
release-builds:
27+
name: Release builds
28+
uses: apple/swift-nio/.github/workflows/release_builds.yml@main
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, reopened, synchronize]
6+
7+
jobs:
8+
semver-label-check:
9+
name: Semantic version label check
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 1
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
17+
- name: Check for Semantic Version label
18+
uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main

.license_header_template

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@@===----------------------------------------------------------------------===@@
2+
@@
3+
@@ This source file is part of the SwiftPrometheus open source project
4+
@@
5+
@@ Copyright (c) YEARS SwiftPrometheus project authors
6+
@@ Licensed under Apache License v2.0
7+
@@
8+
@@ See LICENSE.txt for license information
9+
@@ See CONTRIBUTORS.txt for the list of SwiftPrometheus project authors
10+
@@
11+
@@ SPDX-License-Identifier: Apache-2.0
12+
@@
13+
@@===----------------------------------------------------------------------===@@

.licenseignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.gitignore
2+
**/.gitignore
3+
.licenseignore
4+
.gitattributes
5+
.git-blame-ignore-revs
6+
.mailfilter
7+
.mailmap
8+
.spi.yml
9+
.swift-format
10+
.swiftformatignore
11+
.editorconfig
12+
.github/*
13+
*.md
14+
*.txt
15+
*.yml
16+
*.yaml
17+
*.json
18+
Package.swift
19+
**/Package.swift
20+
Package@-*.swift
21+
**/Package@-*.swift
22+
Package.resolved
23+
**/Package.resolved
24+
Makefile
25+
*.modulemap
26+
**/*.modulemap
27+
**/*.docc/*
28+
*.xcprivacy
29+
**/*.xcprivacy
30+
*.symlink
31+
**/*.symlink
32+
Dockerfile
33+
**/Dockerfile
34+
Snippets/*
35+
dev/git.commit.template
36+
.unacceptablelanguageignore

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
## Legal
2+
3+
By submitting a pull request, you represent that you have the right to license
4+
your contribution to Apple and the community, and agree by submitting the patch
5+
that your contributions are licensed under the Apache 2.0 license (see
6+
`LICENSE.txt`).
7+
8+
## How to submit a bug report
9+
10+
Please ensure to specify the following:
11+
12+
* swift-prometheus commit hash
13+
* Contextual information (e.g. what you were trying to achieve with swift-prometheus)
14+
* Simplest possible steps to reproduce
15+
* More complex the steps are, lower the priority will be.
16+
* A pull request with failing test case is preferred, but it's just fine to paste the test case into the issue description.
17+
* Anything that might be relevant in your opinion, such as:
18+
* Swift version or the output of `swift --version`
19+
* OS version and the output of `uname -a`
20+
* Network configuration
21+
22+
23+
### Example
24+
25+
```
26+
swift-prometheus commit hash: 22ec043dc9d24bb011b47ece4f9ee97ee5be2757
27+
28+
Context:
29+
While load testing my program written with swift-prometheus, I noticed
30+
that one file descriptor is leaked per request.
31+
32+
Steps to reproduce:
33+
1. ...
34+
2. ...
35+
3. ...
36+
4. ...
37+
38+
$ swift --version
39+
Swift version 4.0.2 (swift-4.0.2-RELEASE)
40+
Target: x86_64-unknown-linux-gnu
41+
42+
Operating system: Ubuntu Linux 16.04 64-bit
43+
44+
$ uname -a
45+
Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
46+
47+
My system has IPv6 disabled.
48+
```
49+
50+
## Writing a Patch
51+
52+
A good swift-prometheus patch is:
53+
54+
1. Concise, and contains as few changes as needed to achieve the end result.
55+
2. Tested, ensuring that any tests provided failed before the patch and pass after it.
56+
3. Documented, adding API documentation as needed to cover new functions and properties.
57+
4. Accompanied by a great commit message, using our commit message template.
58+
59+
### Run CI checks locally
60+
61+
You can run the GitHub Actions workflows locally using [act](https://github.com/nektos/act). For detailed steps on how to do this please see [https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally](https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally).
62+
63+
## How to contribute your work
64+
65+
Please open a pull request at https://github.com/swift-server/swift-prometheus. Make sure the CI passes, and then wait for code review.
File renamed without changes.

Package.swift

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// swift-tools-version:5.7
1+
// swift-tools-version:5.9
22
//===----------------------------------------------------------------------===//
33
//
44
// This source file is part of the SwiftPrometheus open source project
55
//
6-
// Copyright (c) 2018-2023 SwiftPrometheus project authors
6+
// Copyright (c) 2018-2025 SwiftPrometheus project authors
77
// Licensed under Apache License v2.0
88
//
99
// See LICENSE.txt for license information
@@ -22,14 +22,11 @@ let package = Package(
2222
.library(
2323
name: "Prometheus",
2424
targets: ["Prometheus"]
25-
),
25+
)
2626
],
2727
dependencies: [
2828
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"),
2929
.package(url: "https://github.com/apple/swift-metrics.git", from: "2.4.1"),
30-
31-
// ~~~ SwiftPM Plugins ~~~
32-
.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.3.0"),
3330
],
3431
targets: [
3532
.target(
@@ -42,8 +39,14 @@ let package = Package(
4239
.testTarget(
4340
name: "PrometheusTests",
4441
dependencies: [
45-
"Prometheus",
42+
"Prometheus"
4643
]
4744
),
4845
]
4946
)
47+
48+
for target in package.targets {
49+
var settings = target.swiftSettings ?? []
50+
settings.append(.enableExperimentalFeature("StrictConcurrency=complete"))
51+
target.swiftSettings = settings
52+
}

0 commit comments

Comments
 (0)