đź’» APIs for creating interactive CLI tools.
Revert unnecessary command behavior change by @gwynne in #197
In a previous release, a change was made (by me) to how old
Command
s are integrated withAsyncCommand
s which was unnecessary, offers no tangible benefit, possibly has a (very small) speed penalty, and is one of a small number of potential sources of runtime stalls. This reverts said ill-advised change.
Full Changelog: https://github.com/vapor/console-kit/compare/4.14.0...4.14.1
Revise async commands support by @gwynne in #196
Changes:
- Deprecates unnecessary API
- Corrects the sync
Command
adapter methods- Cleans up some concurrency warnings
Full Changelog: https://github.com/vapor/console-kit/compare/4.13.0...4.14.0
Add merge function to command groups by @marius-se in #195
Add merge function to
AsyncCommandGroup
and conformAnyCommand
toAnyAsyncCommand
. This allows us to get AsyncCommand working again in Vapor 4 🎉
Full Changelog: https://github.com/vapor/console-kit/compare/4.12.0...4.13.0
Split ConsoleKit into two functional targets by @gwynne in #192
ConsoleKit has been split into two separate targets:
ConsoleKitTerminal
contains the logic for interacting with a console (I/O, color support, other ANSI commands, etc.).ConsoleKitCommands
contains the functionality for handling argument parsing, which is now soft-deprecated in favor ofswift-argument-parser
when possible.The existing
ConsoleKit
target is now an umbrella import, similar to the function of theNIO
target inswift-nio
; existing code should be unaffected.Several additional minor cleanups were also made in the process of this split.
Thanks to the reviewers for their help:
Full Changelog: https://github.com/vapor/console-kit/compare/4.11.0...4.12.0
Add a public initializer to LogRecord by @semicoleon in #194
One of the goals of the
LoggerFragment
system was to make it simple to handle more complex logging logic by wrapping a custom log handler around the existingLoggerFragment
system.Unfortunately I forgot to give
LogRecord
a public initializer which makes doing that impossible.
Full Changelog: https://github.com/vapor/console-kit/compare/4.10.2...4.11.0
Fix AnySendableHashable
regression by @0xTim in #193
AnySendableHashable
introduced a breaking change where trying to pass concrete types that conform toSendable
andHashable
but the compiler couldn’t infer they could be passed around asAnySendableHashable
. This fixes the accesses for any dictionary (includinguserInfo
) to fix an API break in https://github.com/vapor/console-kit/releases/tag/4.8.0
Full Changelog: https://github.com/vapor/console-kit/compare/4.10.1...4.10.2
Elide main queue check in Linux readpassphrase() implementation by @gwynne in #185
In an
async
world, the check for running on the main queue inlinux_readpassphrase()
is hopelessly wrong. Since it’s a violation of the API contract to call this method from multiple threads, we just remove the bad assertion and let misuse fail out the same way the “real” API would.
Full Changelog: https://github.com/vapor/console-kit/compare/4.10.0...4.10.1
Improve AnySendableHashable to match Hashable by @0xTim in #191
Make it better align with the stdlib
Full Changelog: https://github.com/vapor/console-kit/compare/4.9.1...4.10.0
Fix a Sendable warning on Linux by @0xTim in #190
Fixes an issue where
DispatchQueue
and friends are notSendable
on Linux so we need to suppress the warning
Full Changelog: https://github.com/vapor/console-kit/compare/4.9.0...4.9.1
Make Commands Sendable by @0xTim in #188
Makes
Command
and many of the associated types, like@Flag
and@Option
Sendable
.
Full Changelog: https://github.com/vapor/console-kit/compare/4.8.1...4.9.0