Skip to content

Fix compile error with redis shard v0.15.1 - #13

Merged
lipanski merged 2 commits into
defense-cr:masterfrom
akadusei:redis-0.15.1
Feb 5, 2026
Merged

lipanski merged 2 commits into
defense-cr:masterfrom
akadusei:redis-0.15.1

Conversation

@akadusei

@akadusei akadusei commented Feb 3, 2026

Copy link
Copy Markdown
Contributor
In src/defense/redis_store.cr:21:11

 21 | end.first.as(Int64)
          ^----
Error: undefined method 'first' for Nil (compile-time type is (Array(Redis::Value) | Nil))

The redis shard introduced a breaking change in v0.15.1; it changed the return type of #multi to a nilable array.

```
In src/defense/redis_store.cr:21:11

 21 | end.first.as(Int64)
          ^----
Error: undefined method 'first' for Nil (compile-time type is (Array(Redis::Value) | Nil))
```
@rodrigopinto

Copy link
Copy Markdown
Contributor

@akadusei Thanks! Please update the shard dependency and lock accordingly.

@akadusei

akadusei commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Done; redis shard upgraded to v0.15.

@lipanski
lipanski merged commit 2cf1c05 into defense-cr:master Feb 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants