25 Commits
Author SHA1 Message Date
Nathan Harris b5c0bc8e05 Bump minimum supported Swift version to 5.5
## Motivation

RediStack 1.x is going to be supported at least until 2.x is released, which is a few months away.

Developers who are on later versions of Swift will adopt later versions of NIO and other libraries, and after we merged !183 we required NIO 2.42.x which has a minimum Swift version of 5.5

## Changes

This back ports the CI config from `master` into this branch, with updates to the README to reflect the changes
2022-11-30 21:35:43 -06:00
Fabian Fett ff495ef0d8 Fix NIOLock warning
# Conflicts:
#	Package.swift
#	Sources/RediStack/RedisConnection.swift
2022-11-26 14:02:12 +01:00
Nathan Harris 610915a909 Add new 'RedisTypes' module
Motivation:

Redis is written in C, so even though it has concepts of "types" such as SortedSet or List
its commands are all "free-floating" functions.

This can make it unfamiliar for those new to Redis to work within its systems and understand the relation of all of the commands.

RediStack can improve this by giving a way of having a consistent reference to a Redis type and all of its associated methods.

Modifications:

- Add: New library product called "RedisTypes"
- Add: First type to "RedisTypes", `RedisSet`

Result:

Newcomers to Redis will have an easier time getting familiar with the APIs and working with its types by having wrappers that
provide a familiar Swift Standard Library API tailored to Redis APIs.
2020-08-30 14:33:21 -07:00
Nathan Harris d2fcb61f56 Drop support for Swift 5.0 2020-08-09 16:34:59 -07:00
Nathan Harris b08ad5461a Rename Package to "RediStack"
Motivation:

SwiftPM as of Swift 5.2 introduces a new package dependency graph and package description that makes the current naming of RediStack awkward to pull in.

Modifications:

- Change: Package.name to be "RediStack"

The git repo will be renamed to "mordil/redistack" in addition to this change.

Result:

Fixes #72 and makes it seamless to pull in RediStack as a Swift package dependency.
2020-03-11 20:35:15 -07:00
Nathan Harris 973a9162af 70 -- Update SwiftMetrics for ecosystem compatability 2020-03-06 03:13:19 +00:00
Nathan Harris 556da6475f 56 -- Add ByteToMessageDecoderVerifier unit tests 2019-07-28 20:05:14 -07:00
Nathan Harris ce43dad72e Split tests into two targets: Unit tests and Integration tests
Motivation:

For users looking to contribute, and for those looking to validate the library, it was unclear what tests require an actual connection to a Redis instance in order to run.

Modifications:

Add a `RediStackIntegrationTests` that takes all tests that require a Redis instance in order to run.

Result:

Those looking to run just unit tests, or contribute new tests, can now directly point to a specific testTarget as defined in the Package manifest.
2019-07-28 00:09:19 -07:00
Nathan Harris aeae1f6c78 Properly export module 2019-07-10 22:46:20 -07:00
Nathan Harris 7e7e354697 61 -- Rebrand from RedisNIO to RediStack 2019-07-08 19:45:33 -07:00
Nathan Harris cd9bd04f73 Revisit RESPValue and RESPValueConvertible implementations.
Motivation:

Johannes provided a fair code review of the project and summarized his findings in issue #48, and one of the prime offenders was all of the `unsafe*` APIs (pointers, buffers, bytes)
that were used with `RESPValue` and `RESPValueConvertible`.

He also provided great feedback and pointed out good points of confusion with the API design of `RESPValue` and `RESPValueConvertible`.

Modifications:

- Return to using `Array` instead of `ContiguousArray` for `RESPValue.array` storage
- Update all documentation to be more thorough in explaining how the types should be used and conformed to.
- Remove all uses of `unsafe*` APIs where possible
- Change implementations to be a lot more type and memory safe, double checking assumptions
- Remove conformance to `ExpressibleBy*Literal` as it is too easy for users to shoot themselves in the foot and saves only a few characters over `.init(bulk:)`
- Create new `RedisNIOTestUtils` target for common test extensions, making them public
- Move most almost all implementations of `RESPValue` computed properties into the `RESPValueConvertible` conformances

Result:

Users should be more safeguarded by the API against unknowingly getting incorrect `RESPValue` representations, the API design of `RESPValue` and `RESPValueConvertible` should be much clearer,
and memory safety should be at a higher bar from these changes.

This resolves issues #55 & #48, and contributes to issue #47.
2019-07-02 23:19:15 -07:00
Nathan Harris dfbccf4c07 Rename package to match repo
Motivation:

SE-0226 changes how SPM resolves a dependency graph and as part of the accepted proposal was to require package names to match their repo URL segments.

Modifications:

Change package from `redis-nio` to `swift-redis-nio-client`

Result:

The project should compliant with SE-0226: https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md
2019-06-06 15:10:59 -07:00
Nathan Harris e81f9546d1 Rename NIORedis to RedisNIO
Motivation:

The SSWG has identified a fast approaching reality of namespace clashes in SPM within the ecosystem and has proposed a rule on names that `NIORedis` no longer complies with.

Modifications:

All references to `NIORedis` have been switched to `RedisNIO` as this module name is unique (at least within GitHub's public repositories).

The goals for this name are as follows:

1. To indicate that this is a Redis client library that is built with SwiftNIO
2. That it is a lower level library, as it directly exposes SwiftNIO as an implementation detail
    2a. The idea being that a higher level library (`Redis`) will be used, and to "go one level deeper" in the stack, you append the "deeper" `NIO` postfix
3. It follows a naming pattern adopted by Vapor who has expressed their desire to adopt this library as their Redis implementation

Result:

A repository, package name, and module name that are unique across GitHub's public repositories that achives the goals outlined above.
2019-06-06 09:55:08 -07:00
Nathan Harris 1a9f086c68 Add SwiftMetrics Dependency
This will eventually support issue #40
2019-05-17 18:34:45 -07:00
Nathan Harris c7a606d8a6 Add Copyright Notices, Acknowledgements, and Contributors List 2019-05-01 16:24:05 -07:00
Nathan Harris ed106a943f Update to use official release of SwiftLog 2019-04-10 11:33:52 -07:00
Nathan Harris 869625d47d Update to use NIO 2 2019-03-26 08:46:51 -07:00
Nathan Harris 73d5930f34 Add initial swift-log support for most paths
Closes #14
2019-03-18 22:04:47 -07:00
Nathan Harris 5c32b97a0c Remove DispatchRedis 2019-03-17 14:06:21 -07:00
Nathan Harris 915b620fa3 Update package description for Swift 5.0 2019-01-10 11:56:17 -08:00
Nathan Harris 473bdcbeed Clarify module and project names 2019-01-09 12:44:41 -08:00
Nathan Harris 58ac3c1298 Add basic non-NIO wrappers for Redis 2018-12-22 16:22:04 -08:00
Nathan Harris 99463bfcd1 Use SwiftNIO 2.0 development 2018-12-18 22:56:00 -08:00
Nathan Harris 7b1d2b46c5 Update package name and remove license 2018-12-18 21:55:15 -08:00
Nathan Harris 29160cd308 Initial project files commit 2018-12-13 13:34:30 -08:00