Swift 6 - #29
Merged
Merged
Swift 6#29
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Logger package to Swift 6 language mode, removing Combine usage from the core library and adjusting logging model types to be Swift-concurrency friendly (e.g., Sendable, string-backed payloads).
Changes:
- Bumps SwiftPM tools version to 6.0 and enables Swift 6 language mode.
- Refactors logging models (
LogEntry,LogHeader,Level, etc.) to removeDateFormatterfrom headers and store messages/custom levels asString, addingSendablewhere appropriate. - Replaces Combine-based callback logging and updates async/queue usage patterns (incl. test updates and new thread-safe
Countertest helper).
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/LoggerTests/Loggers/NativeLogger+OSLogStoreTests.swift | Updates test encoder to reflect LogEntry.message now being a String. |
| Tests/LoggerTests/Loggers/FileLoggerTests.swift | Removes Combine usage, injects fileAccessQueue, updates LogHeader construction, and rewrites concurrency test logic. |
| Tests/LoggerTests/LoggerManagerTests.swift | Removes Combine usage, updates expectation waiting, rewrites concurrency test logic. |
| Tests/LoggerTests/LogEntry+mock.swift | Updates mock entry builder for new LogHeader initializer and LogLocation init usage. |
| Tests/LoggerTests/Counter.swift | Adds a lock-protected counter utility for multithreaded tests. |
| Sources/Logger/Loggers/NativeLogger/OSLogStore/OSLogStore+getEntries.swift | Simplifies async entry retrieval by removing unnecessary continuation wrapping. |
| Sources/Logger/Loggers/FileLogger/FileLogger.swift | Simplifies file handle and UTF-8 conversion logic within the file-write path. |
| Sources/Logger/Loggers/FileLogger/FileAccessExecutor.swift | Adjusts queue scheduling to use DispatchWorkItem (Swift 6 concurrency compatibility). |
| Sources/Logger/Loggers/ApplicationCallbackLogger.swift | Removes Combine publisher, injects a logging callback closure, and updates macOS compile condition. |
| Sources/Logger/LoggerManager.swift | Removes Combine subscriptions, wires application callbacks via injected closure, updates header init and queue dispatch call style. |
| Sources/Logger/LogEntry/LogLocation.swift | Adds Sendable conformance. |
| Sources/Logger/LogEntry/LogHeader.swift | Adds Sendable conformance and removes DateFormatter from the type/API. |
| Sources/Logger/LogEntry/LogEntryCoding/LogEntryEncoder.swift | Minor initializer style update for Swift 6 mode. |
| Sources/Logger/LogEntry/LogEntryCoding/LogEntryDecoder.swift | Updates decoding to use new LogHeader initializer and explicit type inits. |
| Sources/Logger/LogEntry/LogEntry.swift | Adds Sendable, changes stored message to String while preserving convertible init input. |
| Sources/Logger/LogEntry/Level.swift | Adds Sendable and changes .custom associated value to String. |
| Package.swift | Updates tools version to Swift 6.0 and enables Swift 6 language mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
David2XN
force-pushed
the
feature/swift6
branch
from
April 23, 2026 11:03
91b1e2a to
433cdf1
Compare
jakmaj
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.