mitra and Vladimir Kukushkin
e83726cb15
Add CMake support for Swift targets and test configurations ( #485 )
...
Add CMake build support to the project to enable toolchain integration
and bootstrapping compatibility.
### Motivation:
Currently, swift-log does not support building with CMake. This addition
resolves issue #484 , allowing swift-log to be resolved and compiled
within CMake-based environments (like the repos swift-certificates and
swift-argument-parser which aer mentioned in the issue).
### Modifications:
1. **Project Root Config:** Added
[CMakeLists.txt](file:///Users/adityamitra/Developer/swift-log/CMakeLists.txt)
configuring the CMake project with Swift 6 and C, alongside setting up
compiler flags for MSVC runtime library on Windows.
2. **Helper Modules:** Added the `cmake/` folder:
- `SwiftSupport.cmake`: dylib/module installations and triple detection
helper.
- `SwiftLogConfig.cmake.in`: package config export templates.
3. **Target CMake Configurations:** Created
[Sources/Logging/CMakeLists.txt](file:///Users/adityamitra/Developer/swift-log/Sources/Logging/CMakeLists.txt)
&
[Sources/InMemoryLogging/CMakeLists.txt](file:///Users/adityamitra/Developer/swift-log/Sources/InMemoryLogging/CMakeLists.txt)
to define the library targets. Included generator expressions pointing
`INTERFACE_INCLUDE_DIRECTORIES` to target output directories for Xcode
generator support.
4. **SwiftPM Exclusions:** Excluded the new CMake files from target
targets inside
[Package.swift](file:///Users/adityamitra/Developer/swift-log/Package.swift)
and
[Package@swift-6.1.swift](file:///Users/adityamitra/Developer/swift-log/Package@swift-6.1.swift)
to keep SwiftPM targets warning-free.
5. **Compile Options Variable:** Consolidates compile options under a
single global definition `SWIFT_LOG_COMMON_COMPILE_OPTIONS` in the root
configuration, enabling Swift 6 compiler features (`ExistentialAny`,
`MemberImportVisibility`, `InternalImportsByDefault`,
`NonisolatedNonsendingByDefault`, and explicit Sendable checks) across
all targets.
6. **CI Integration & Workflow:** Integrated CMake CI validation in
`.github/workflows/pull_request.yml` using the shared workflow from
`apple/swift-nio/.github/workflows/cmake_tests.yml@main` running in a
`swift:6.1-jammy` container. This job compiles the core libraries and
verifies the validity of the CMake files.
7. **License Header Compliance:** Cleaned up license headers across all
CMake files
### Result:
* **SwiftPM:** All 164 unit tests compile and pass successfully under
`swift test` with no warnings.
* **CMake:** Successfully compiles (`** BUILD SUCCEEDED **`) under Xcode
generator (`cmake -B build -G Xcode && cmake --build build`).
### Issue Tracking:
Fixes #484
---------
Co-authored-by: Vladimir Kukushkin <kukushechkin@apple.com >
2026-07-22 17:25:43 +01:00
dependabot[bot]
8056dbfb08
Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.12 to 0.0.13 ( #486 )
2026-07-14 17:36:30 +00:00
dependabot[bot]
1032aed8a5
Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.11 to 0.0.12 ( #480 )
...
Bumps
[swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows )
from 0.0.11 to 0.0.12.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases ">swiftlang/github-workflows/.github/workflows/soundness.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.12</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump gregsdennis/dependencies-action from 1.4.1 to 1.4.2 by <a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/266 ">swiftlang/github-workflows#266</a></li>
<li>extract PR Dependency Check for github-workflows into its own file
by <a
href="https://github.com/justice-adams-apple "><code>@justice-adams-apple</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/270 ">swiftlang/github-workflows#270</a></li>
<li>Remove workaround for bug triggered by Android environment variable
by <a href="https://github.com/finagolfin "><code>@finagolfin</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/246 ">swiftlang/github-workflows#246</a></li>
<li>Change default Android SDK build command by <a
href="https://github.com/jakepetroules "><code>@jakepetroules</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/269 ">swiftlang/github-workflows#269</a></li>
<li>[static sdk] build with sdk triple by <a
href="https://github.com/justice-adams-apple "><code>@justice-adams-apple</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/274 ">swiftlang/github-workflows#274</a></li>
<li>[freebsd] cd into the proper dir to run package test by <a
href="https://github.com/justice-adams-apple "><code>@justice-adams-apple</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/275 ">swiftlang/github-workflows#275</a></li>
<li>Update Wasm build command in workflow by <a
href="https://github.com/jakepetroules "><code>@jakepetroules</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/272 ">swiftlang/github-workflows#272</a></li>
<li>Android: Add support for .bundle files in emulator tests by <a
href="https://github.com/jakepetroules "><code>@jakepetroules</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/276 ">swiftlang/github-workflows#276</a></li>
<li>Update Swift nightly to 6.4.x in workflow file by <a
href="https://github.com/shahmishal "><code>@shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/278 ">swiftlang/github-workflows#278</a></li>
<li>Parametrize swift format binary by <a
href="https://github.com/rnro "><code>@rnro</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/285 ">swiftlang/github-workflows#285</a></li>
<li>Extend ignore list in flake8 config by <a
href="https://github.com/snprajwal "><code>@snprajwal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/279 ">swiftlang/github-workflows#279</a></li>
<li>Fix Android build for non-default NDKs with new swift-build build
system, by updating ANDROID_NDK_ROOT too by <a
href="https://github.com/finagolfin "><code>@finagolfin</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/280 ">swiftlang/github-workflows#280</a></li>
<li>docs: add missing closing backtick in error message by <a
href="https://github.com/Avicennasis "><code>@Avicennasis</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/286 ">swiftlang/github-workflows#286</a></li>
<li>Add retry when retrieving PR information by <a
href="https://github.com/bkhouri "><code>@bkhouri</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/284 ">swiftlang/github-workflows#284</a></li>
<li>Docs: provide option to skip analysis in doc-check by <a
href="https://github.com/bkhouri "><code>@bkhouri</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/282 ">swiftlang/github-workflows#282</a></li>
<li>Add proposal validation workflow and documentation by <a
href="https://github.com/dempseyatgithub "><code>@dempseyatgithub</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/288 ">swiftlang/github-workflows#288</a></li>
<li>Update dock check syntax issue by <a
href="https://github.com/bkhouri "><code>@bkhouri</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/290 ">swiftlang/github-workflows#290</a></li>
<li>Update actions/checkout to v7 by <a
href="https://github.com/shahmishal "><code>@shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/294 ">swiftlang/github-workflows#294</a></li>
<li>Update default Xcode versions in workflow to Xcode 27 Beta 2 by <a
href="https://github.com/shahmishal "><code>@shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/293 ">swiftlang/github-workflows#293</a></li>
<li>Add GITHUB_TOKEN env variable for use by extraction tool by <a
href="https://github.com/dempseyatgithub "><code>@dempseyatgithub</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/295 ">swiftlang/github-workflows#295</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
made their first contribution in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/266 ">swiftlang/github-workflows#266</a></li>
<li><a href="https://github.com/snprajwal "><code>@snprajwal</code></a>
made their first contribution in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/279 ">swiftlang/github-workflows#279</a></li>
<li><a
href="https://github.com/Avicennasis "><code>@Avicennasis</code></a>
made their first contribution in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/286 ">swiftlang/github-workflows#286</a></li>
<li><a
href="https://github.com/dempseyatgithub "><code>@dempseyatgithub</code></a>
made their first contribution in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/288 ">swiftlang/github-workflows#288</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.11...0.0.12 ">https://github.com/swiftlang/github-workflows/compare/0.0.11...0.0.12 </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/07936268efedce0a6650c75a00150b820f53f384 "><code>0793626</code></a>
Add GITHUB_TOKEN env variable for use by extraction tool (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/295 ">#295</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/1ec62c90c3b8a07150ec8233eb4cb170aeee7eab "><code>1ec62c9</code></a>
Update default Xcode versions in workflow to Xcode 27 Beta 2 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/293 ">#293</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/fda56f671cbba58575549aedd1f07ff75a28949b "><code>fda56f6</code></a>
Update actions/checkout to v7 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/294 ">#294</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/60789377b41faf8c0f0aa6e42948b5fa3131a4d9 "><code>6078937</code></a>
Update dock check syntax issue (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/290 ">#290</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/d65527ae024104f80c3c9a204e2255ff6e6dbf24 "><code>d65527a</code></a>
Add proposal validation workflow and documentation (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/288 ">#288</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/b080ab5eaa2d71849e212ec6ffed6e2757791c3d "><code>b080ab5</code></a>
Docs: provide option to skip analysis in doc-check (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/282 ">#282</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/9abcbf258bca0c8d2157b1bdad4193381f97a866 "><code>9abcbf2</code></a>
Add retry when retrieving PR information (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/284 ">#284</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/8a9e053779acdc244e72dc947fa17c620f671235 "><code>8a9e053</code></a>
docs: add missing closing backtick in error message (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/286 ">#286</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/0a4e35d4b3892988d1b6a24c1fb4281800e5a6d4 "><code>0a4e35d</code></a>
Fix Android build for non-default NDKs with new swift-build build
system, by ...</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/cad6f2b75ecfb5813ed8210678c12d307090d930 "><code>cad6f2b</code></a>
Extend ignore list in flake8 config (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/279 ">#279</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.11...0.0.12 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 11:31:35 +02:00
Vladimir Kukushkin
e3b5d65fc9
Enable Xcode tests ( #473 )
...
Simulators seem to have stabilized in CI, we can enabled the tests.
### Motivation:
`swift-log` is expected to be used on various platforms, we should run
tests against them.
### Modifications:
- Run tests on various tests in simulators in PRs and nightly.
- Fix tests to actually compile there.
### Result:
Tests are now running in simulators. Supersedes #431 .
2026-06-24 13:42:03 +02:00
Rick Newton-Rogers
a012e0ad8a
Adopt multi-package macOS benchmarks workflow ( #466 )
...
### Motivation
* The two-invocation pattern for `macos-benchmarks` and
`macos-benchmarks-MaxLogLevelWarningBenchmarks-trait` allocates one
self-hosted macOS runner per (Swift version x package), incurring
duplicate runner-recycling cost.
* The recent change on main adds a `benchmark_package_paths` input
letting a single invocation run all packages serially on each runner.
### Modifications
* Replace the two macOS benchmark jobs in `main.yml` and
`pull_request.yml` with a single consolidated job that passes both
packages via `benchmark_package_paths: '["Benchmarks/NoTraits",
"Benchmarks/MaxLogLevelWarning"]'`.
* Drop Swift 6.2 from the matrix; only Swift 6.3 is shared between the
two packages (`MaxLogLevelWarning` has no `Thresholds/Xcode swift
6.2/`).
### Result
* One macOS runner allocation per Swift version instead of one per
(version x package).
* `NoTraits` loses Swift 6.2 coverage
2026-05-21 14:21:31 +00:00
Rick Newton-Rogers
1069d31898
Skip handler dispatch for setters under MaxLogLevelNone ( #465 )
...
Skip handler dispatch for setters under `MaxLogLevelNone`
### Motivation
* When `MaxLogLevelNone` is enabled every
`Logger.trace`/`debug`/.../`critical` method and `Logger.log(level:)`
compiles down to an empty body, so no log statement can ever observe
what the underlying `LogHandler` sees.
* Despite this, the `subscript(metadataKey:)` and `logLevel` setters
still went through the handler. Code like `logger[metadataKey:
"user-id"] = "\(id)"` would CoW the logger storage and call into the
handler even though nothing could read the metadata back out via a log
statement.
### Modifications
* Wrap the bodies of `Logger.subscript(metadataKey:) { set }` and
`Logger.logLevel { set }` in `#if !MaxLogLevelNone`, mirroring the
existing guards on the level-specific log methods.
* Note this behaviour in `DisableLogLevelsDuringCompilation.md` so
callers know reads still go through the handler but writes do not.
* Add a new benchmark which ensures that the operations don't allocate.
* Update some missed swift-tools-version bumps.
* Loosen p90 instruction threshold to 10%. The same source produces
results that swing by up to ~8% between back-to-back runs.
### Result
* `logger[metadataKey:] = ...` and `logger.logLevel = ...` compile to
empty bodies when `MaxLogLevelNone` is set, matching the
zero-runtime-overhead guarantee the trait already provides for log
emission.
* Resolves https://github.com/apple/swift-log/issues/462
2026-05-21 13:55:40 +01:00
Vladimir Kukushkin
3061a62b6d
Shared workflows changed from Xcode XX.X to Xcode swift X.X ( #461 )
...
Benchmark thresholds should now be at a different path after switching
to `MACOS_SWIFT_6_1_ENABLED` and `MACOS_SWIFT_6_2_ENABLED`.
2026-05-19 13:40:04 +02:00
Rick Newton-Rogers
184c73762f
Migrate macOS CI to Swift version inputs ( #457 )
...
### Motivation
* The shared `macos_tests.yml` and `macos_benchmarks.yml` workflows
support requesting Xcodes by Swift version with symlinks on the runners
owning the mapping. This more directly expresses the library support
window.
* Older Xcodes (26.1 and below) are being removed from the runners.
### Modifications
* Replace `macos_xcode_16_4_enabled` and `macos_xcode_26_1_enabled` with
`macos_swift_6_1_enabled` and `macos_swift_6_2_enabled` in benchmark
jobs.
* Remove now-redundant explicit `xcode_*_enabled: false` and
`swift_*_enabled: true` overrides from the `macos-tests` job in
`main.yml` (these now match the workflow defaults).
### Result
* macOS CI requests toolchains by Swift version, decoupling the
workflows from specific Xcode release names.
2026-05-15 10:42:48 +01:00
Vladimir Kukushkin
ac3646e5e0
Disable nightly 6.3 WASM builds ( #454 )
...
Disable nightly WASM builds because 6.3 images are no longer available.
Enable back when 6.4 builds are available.
2026-05-01 14:04:06 +01:00
dependabot[bot]
41592e45e1
Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.9 to 0.0.11 ( #447 )
...
Bumps
[swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows )
from 0.0.9 to 0.0.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases ">swiftlang/github-workflows/.github/workflows/soundness.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.11</h2>
<h2>What's Changed</h2>
<ul>
<li>Update all Swift package test defaults to 6.3 by <a
href="https://github.com/finagolfin "><code>@finagolfin</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/253 ">swiftlang/github-workflows#253</a></li>
<li>Android 6.3 support by <a
href="https://github.com/marcprux "><code>@marcprux</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/251 ">swiftlang/github-workflows#251</a></li>
<li>Add PR Dependency check workflow by <a
href="https://github.com/bkhouri "><code>@bkhouri</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/233 ">swiftlang/github-workflows#233</a></li>
<li>update NDK version by <a
href="https://github.com/justice-adams-apple "><code>@justice-adams-apple</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/262 ">swiftlang/github-workflows#262</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.10...0.0.11 ">https://github.com/swiftlang/github-workflows/compare/0.0.10...0.0.11 </a></p>
<h2>0.0.10</h2>
<h2>What's Changed</h2>
<ul>
<li>Windows: Ensure Docker engine is running by <a
href="https://github.com/bkhouri "><code>@bkhouri</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/259 ">swiftlang/github-workflows#259</a></li>
<li>Add FreeBSD build job to swift_package_test workflow by <a
href="https://github.com/jakepetroules "><code>@jakepetroules</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/257 ">swiftlang/github-workflows#257</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.9...0.0.10 ">https://github.com/swiftlang/github-workflows/compare/0.0.9...0.0.10 </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/a487d5014a30e7e0a75f39a4d65dc7655a1855ad "><code>a487d50</code></a>
update NDK version (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/262 ">#262</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/f45407ca96925df11076921c153f0e59d7d30e7f "><code>f45407c</code></a>
Add PR Dependency check workflow (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/233 ">#233</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/42768536f44a0fd3ca41624752698844cd8493c2 "><code>4276853</code></a>
Android 6.3 support (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/251 ">#251</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/531b7917e71e8c3b405045a13bf1dd3556b0a451 "><code>531b791</code></a>
Update all Swift package test defaults to 6.3 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/253 ">#253</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/3b5576d74703a6e4e30b49e2d2311313638c82e4 "><code>3b5576d</code></a>
Add FreeBSD build job to swift_package_test workflow (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/257 ">#257</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/b337c7f02f4b38cbc2ce4de399ae417050ccd3e9 "><code>b337c7f</code></a>
Windows: Ensure Docker engine is running (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/259 ">#259</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.9...0.0.11 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 10:36:35 +00:00
dependabot[bot] and Vladimir Kukushkin
6f3fbace66
Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.8 to 0.0.9 ( #437 )
...
Bumps
[swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows )
from 0.0.8 to 0.0.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases ">swiftlang/github-workflows/.github/workflows/soundness.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.9</h2>
<h2>What's Changed</h2>
<ul>
<li>When splitting lines for the cross-PR checkout also split on \r\n by
<a href="https://github.com/ahoppen "><code>@ahoppen</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/249 ">swiftlang/github-workflows#249</a></li>
<li>Fix template injection by <a
href="https://github.com/justice-adams-apple "><code>@justice-adams-apple</code></a>
in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/247 ">swiftlang/github-workflows#247</a></li>
<li>Remove tailing comma in matrix JSON by <a
href="https://github.com/plemarquand "><code>@plemarquand</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/254 ">swiftlang/github-workflows#254</a></li>
<li>Update default Xcode versions in workflow to 16.4, 26.3, and 26.4 by
<a href="https://github.com/shahmishal "><code>@shahmishal</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/255 ">swiftlang/github-workflows#255</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.8...0.0.9 ">https://github.com/swiftlang/github-workflows/compare/0.0.8...0.0.9 </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/f84da042883848ad67aadd051dc322eec18660d3 "><code>f84da04</code></a>
Update default Xcode versions in workflow to 16.4, 26.3, and 26.4 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/255 ">#255</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/47c9717a9218ab60fe9fc6e957980d55fe949f1d "><code>47c9717</code></a>
Remove tailing comma in matrix JSON (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/254 ">#254</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/8e529b937e15ba0a65af9b492393704fe3f16bdf "><code>8e529b9</code></a>
Fix template injection (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/247 ">#247</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/58677410ce8ef88844850c908bcd830ad108c812 "><code>5867741</code></a>
When splitting lines for the cross-PR checkout also split on \r\n (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/249 ">#249</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.8...0.0.9 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vladimir Kukushkin <kukushechkin@mac.com >
2026-04-13 14:50:09 +01:00
Rick Newton-Rogers
bffceaf778
Drop Swift 6.0 ( #436 )
...
Motivation:
Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.
Modifications:
* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml
Result:
Code reflects our support window.
2026-04-08 14:52:39 +01:00
Rick Newton-Rogers
7c04f86fba
Enable Swift 6.3 jobs in CI ( #435 )
...
Motivation:
Swift 6.3 has been released, we should add it to our CI coverage.
Modifications:
Add additional Swift 6.3 jobs where appropriate in main.yml,
pull_request.yml
Result:
Improved test coverage.
2026-04-01 14:18:23 +01:00
dependabot[bot]
154acdf7d4
Bump swiftlang/github-workflows/.github/workflows/soundness.yml from 0.0.7 to 0.0.8 ( #428 )
...
Bumps
[swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows )
from 0.0.7 to 0.0.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases ">swiftlang/github-workflows/.github/workflows/soundness.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.8</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix build warnings in the workflow for iOS by <a
href="https://github.com/kkebo "><code>@kkebo</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/173 ">swiftlang/github-workflows#173</a></li>
<li>Check if the locally installed Android NDK matches the wanted NDK
version by <a
href="https://github.com/finagolfin "><code>@finagolfin</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/235 ">swiftlang/github-workflows#235</a></li>
<li>Update installed version of static linux SDK to 0.1.0 when using
released toolchains by <a
href="https://github.com/owenv "><code>@owenv</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/241 ">swiftlang/github-workflows#241</a></li>
<li>Update the Xcode versions - 26.3 and 26.4b2 by <a
href="https://github.com/shahmishal "><code>@shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/245 ">swiftlang/github-workflows#245</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/kkebo "><code>@kkebo</code></a> made
their first contribution in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/173 ">swiftlang/github-workflows#173</a></li>
<li><a
href="https://github.com/finagolfin "><code>@finagolfin</code></a> made
their first contribution in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/235 ">swiftlang/github-workflows#235</a></li>
<li><a href="https://github.com/owenv "><code>@owenv</code></a> made
their first contribution in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/241 ">swiftlang/github-workflows#241</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.7...0.0.8 ">https://github.com/swiftlang/github-workflows/compare/0.0.7...0.0.8 </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/61db6917df4ec2ddeeb493757e2d1effd46af855 "><code>61db691</code></a>
Update the Xcode versions - 26.3 and 26.4b2 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/245 ">#245</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/d7f8c780c9994917d6088e165e0fee6fb0bd06a1 "><code>d7f8c78</code></a>
Update installed version of static linux SDK to 0.1.0 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/241 ">#241</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/bca81f75d7d1ae2474f1213169aab56dcad8961f "><code>bca81f7</code></a>
Revert Use local copy on action invocation (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/239 ">#239</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/27ad4acfa502b0cb8b901532e8294a14b7273988 "><code>27ad4ac</code></a>
Add symlinks for backwards compatability (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/238 ">#238</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/555b8029955d1e91ed50768afb969805c796bdd6 "><code>555b802</code></a>
Check if the locally installed Android NDK matches the wanted NDK
version (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/235 ">#235</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/c6fcbaf70a845126ec165107a2d509bda17a2fd1 "><code>c6fcbaf</code></a>
Use local copy on action invocation (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/236 ">#236</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/2b7c7405cd7ce3627f84fb0765c785f099d19715 "><code>2b7c740</code></a>
Fix build warnings in the workflow for iOS (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/173 ">#173</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.7...0.0.8 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-13 19:46:39 +00:00
Vladimir Kukushkin
f22537f94d
Do not run benchmarks on linux, we can’t collect anything anyway ( #415 )
...
`swift-nio` reusable workflow for running benchmarks has been recently
fixed and now linux benchmarks are failing because we do not have any
thresholds recorded. The main purpose for `swift-log` benchmarks is to
keep track of the amount of instructions and on linux runners
performance metrics are not available, so we cannot check the relevant
metric. Let's remove them.
2026-02-17 18:51:49 +00:00
Honza Dvorsky
185a56a488
Enable dependabot and switch GHA references to tags ( #412 )
...
### Motivation:
For better control over GitHub workflows, switch over to a tags-based
dependency.
### Modifications:
- Switch to tags
- Enable dependabot to get weekly update checks
### Result:
More streamlined and controlled GHA dependency updates.
2026-02-17 18:16:30 +00:00
Vladimir Kukushkin
1ccd2c5a27
[SLG-0002] Implementation: Compile-time log level elimination using traits ( #389 )
...
Add compile-time traits for eliminating log levels from binaries
### Motivation:
Applications often know in advance which log levels will never be needed
in production. For example, a production service might only need warning
and above, while trace and debug levels are only useful during
development. This PR introduces
compile-time traits that completely eliminate unwanted log levels from
binaries, achieving zero runtime overhead for disabled log statements.
### Modifications:
- Added seven `MaxLogLevel*` traits
- Extended benchmarks with the `MaxLogLevelWarning` suite
- Added "Disable log levels during compilation" section to the best
practices guide
### Result:
Users can eliminate unwanted log levels at compile time by specifying
traits in their `Package.swift` dependency declaration.
2026-01-13 14:23:51 +00:00
Vladimir Kukushkin
6856e42a3f
Adapt separate benchmark workflows from swift-nio ( #396 )
...
Depends on https://github.com/apple/swift-nio/pull/3461 , which is not
yet merged
### Motivation:
`swift-nio` now has 2 separate workflows for running benchmarks on Linux
and macOS to remove unnecessary noise of skipped macOS benchmarks, see
[`swift-nio` PR](https://github.com/apple/swift-nio/pull/3461 ) for
details.
### Modifications:
Split Linux and macOS benchmarks into different jobs.
### Result:
Linux and macOS benchmarks are running as different jobs.
2025-12-11 12:47:43 +01:00
Max Desiatov and Konrad `ktoso` Malawski
63eaca6f4d
Add Wasm builds to pull_request.yml ( #371 )
...
Co-authored-by: Konrad `ktoso` Malawski <konrad_malawski@apple.com >
2025-12-04 19:02:45 +09:00
Max Desiatov
f3a82f1119
Fix Android build error with @preconcurrency import Android ( #393 )
2025-12-04 08:33:10 +09:00
hamzahrmalik and Franz Busch
ca538143e2
Add an InMemoryLogHandler ( #390 )
...
Add an InMemoryLogHandler
### Motivation:
Library maintainers should be able to test that their libraries log what
they expect
### Modifications:
Create a new InMemoryLogging product, which contains an
InMemoryLogHandler
This log handler can be used to make a logger, pass the logger into some
function, and then assert that logs were emitted.
See the tests for example usage
### Future:
For now i have left this very bare-bones. We could in future add
convenience functions. For example
- a function to assert that a particular log message was logged
- a static function to create a logger with this handler
---------
Co-authored-by: Franz Busch <privat@franz-busch.de >
2025-12-02 13:52:42 +01:00
Vladimir Kukushkin
95a70b954c
Logging instructions and allocations benchmarks ( #386 )
...
Add simple benchmarks measuring instructions count and allocations when
logging with various log levels.
### Motivation:
Establish the baseline and have automated checks before approaching
performance improvements.
### Modifications:
- Dependency on https://github.com/ordo-one/package-benchmark added
- A new `Benchmarks` sub-package is added
- CI workflows now run benchmarks
### Result:
- CI workflows are running benchmarks on Linux and macOS
- Thresholds are recorded and verified only on macOS
An example of a benchmark failing with a **better** results than
expected:
https://github.com/apple/swift-log/actions/runs/19540944353/job/55950355442
An example of a benchmark failing with a **worse** results than
expected:
https://github.com/apple/swift-log/actions/runs/19569105729/job/56038101552
2025-11-24 11:05:48 +00:00
Vladimir Kukushkin and Honza Dvorsky
2a4139ef2a
Drop Swift 5.9 and 5.10 support ( #383 )
...
Make Swift 6.0 the minimum support version.
### Motivation:
`swift-log` supports 3 latest Swift releases, which is at this point
6.0, 6.1 and 6.2. Swift 5 is no longer supported.
### Modifications:
- Package.swift swift tools
- CI configs
- Imports checking if compiler is <6.0
### Result:
Swift 5 is no longer supported.
Co-authored-by: Honza Dvorsky <honza@apple.com >
2025-10-23 09:22:00 +01:00
Rick Newton-Rogers
bd44c73045
Enable Swift 6.2 jobs in CI ( #373 )
...
Motivation:
Swift 6.2 has been released, we should add it to our CI coverage.
Modifications:
Add additional Swift 6.2 jobs where appropriate in main.yml,
pull_request.yml
Result:
Improved test coverage.
2025-10-22 16:52:26 +02:00
Melissa Kilby
45b82c6e24
chore: restrict GitHub workflow permissions - future-proof ( #379 )
...
See https://github.com/swiftlang/github-workflows/issues/167 for
additional context
This approach aligns with security best practices, as detailed in the
following documentation:
-
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
-
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defining-access-for-the-github_token-scopes
-
https://openssf.org/blog/2024/08/12/mitigating-attack-vectors-in-github-workflows/
The default GITHUB_TOKEN permissions are defined at the repository
level. This PR modifies the workflow-level overrides to conform to
OpenSSF best practices -> defense in depth.
Allow me to quote OpenSSF:
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
> The highest score is awarded when the permissions definitions in each
workflow's yaml file are set as read-only at the top level and the
required write permissions are declared at the run-level.”
> Remediation steps
> - Set top-level permissions as read-all or contents: read as described
in GitHub's documentation.
> - Set any required write permissions at the job-level. Only set the
permissions required for that job; do not set permissions: write-all at
the job level.
Compare to the LLVM project:
Top-level: contents read, e.g.
https://github.com/swiftlang/llvm-project/blob/next/.github/workflows/build-ci-container-windows.yml#L3-L4
-> this makes it future-proof
Job-level: Allow write permissions as needed, e.g.
https://github.com/swiftlang/llvm-project/blob/next/.github/workflows/build-ci-container-windows.yml#L53-L58
Signed-off-by: Melissa Kilby <mkilby@apple.com >
2025-10-20 16:14:09 +02:00
Raphael
21d132f1ca
Enable release mode builds ( #368 )
...
### Motivation:
Some errors do not show up in debug builds. Enabling release mode builds
improves the CI coverage.
### Modifications:
Enable release mode builds for pull requests and scheduled builds on
main.
### Result:
Improved CI coverage.
2025-07-30 08:34:12 +02:00
Rick Newton-Rogers
81d3d07f14
Enable Swift 6.1 jobs in CI ( #359 )
...
Motivation:
Swift 6.1 has been released, we should add it to our CI coverage.
Modifications:
Add additional Swift 6.1 jobs where appropriate in main.yml,
pull_request.yml
Result:
Improved test coverage.
2025-04-14 12:15:58 +02:00
Rick Newton-Rogers
09c99dd25a
Add static SDK CI workflow ( #355 )
...
Add static SDK CI workflow which runs on commits to PRs, merges to main
and daily on main.
2025-04-02 13:41:15 +00:00
Rick Newton-Rogers
765db8bc47
Enable macOS CI on pull requests ( #358 )
...
Motivation:
* Improve test coverage
Modifications:
Enable macOS CI to be run on pull request commits and make the use of
the nightly runner pool for main.yml jobs explicit.
Result:
Improved test coverage.
2025-04-01 12:25:50 +02:00
Rick Newton-Rogers
2dd04b00f4
Rename nightly_6_1 params to nightly_next ( #352 )
...
Rename nightly_6_1 params to nightly_next; see
https://github.com/apple/swift-nio/pull/3122
2025-03-04 10:38:13 +00:00
Rick Newton-Rogers
770059c51d
CI use 6.1 nightlies ( #348 )
...
CI use 6.1 nightlies now that Swift development is happening in the 6.1
branch
2025-01-31 09:58:02 +00:00
Honza Dvorsky
960b23e33f
Enable strict concurrency ( #342 )
2024-11-29 23:27:51 +01:00
Franz Busch
ee1bfd3f47
[CI] Migrate to GHA ( #328 )
...
# Motivation
We want to modernize our CI.
# Modification
This PR migrates to GH actions and turns on all the right flags.
# Result
Modern CI.
2024-10-30 13:17:15 +00:00