-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added xreadgroup, xtrim, xclaim, xautoclaim, xpending commands #52
Added xreadgroup, xtrim, xclaim, xautoclaim, xpending commands #52
Conversation
Swoorup
commented
Jun 10, 2022
•
edited
Loading
edited
- Adds xreadgroup (mostly same as xread), xtrim commands.
- Updates xgroupcreate such that it allows to specify creation of stream
Is mima off? switching to defaults args I didn't think was binary compatible. |
In build.sbt, the Looks like following will fix the incompatability. Any thoughts? @ChristopherDavenport def xgroupcreate[F[_]: RedisCtx](stream: String, groupName: String, startId: String, mkStream: Boolean): F[Status] = {
val mkStreamFragment = Alternative[List].guard(mkStream).as("MKSTREAM")
RedisCtx[F].unkeyed(NEL("XGROUP", "CREATE" :: stream :: groupName :: startId :: mkStreamFragment))
}
def xgroupcreate[F[_]: RedisCtx](stream: String, groupName: String, startId: String): F[Status] =
xgroupcreate(stream, groupName, startId, false) |
If you make the current one package private that will work great. The one you delegate to the new one in. |
Hmm, it still complains of
using |
Fairly certain that's normal. Feel free to add the exclusion. Will confirm with @armanbilge just to be double safe. |
My recommendation would be to leave that method public but deprecated, like so: @deprecated("x.y.z.", "use ... instead")
def xgroupcreate[F[_]](stream: String, groupName: String, startId: String, redisCtx: RedisCtx[F]): F[Status] In theory, static methods are not really a concern since they would only be used by hypothetical Java interop. But the bigger problem is that every time you add a filter, it might mask real binary-incompatible changes in the future. Unfortunately MiMa filters are just not fine grained enough, for example to distinguish between static and non-static methods. |
Done. |
core/src/main/scala/io/chrisdavenport/rediculous/RedisCommands.scala
Outdated
Show resolved
Hide resolved
How is adding a value to a sealed trait safe? Or is that just source breaking not mima breaking? My brain is trying to put the pieces together here. |
case class LastConsumed(stream: String) extends StreamOffset { | ||
override def offset: String = ">" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChristopherDavenport you mean this change? You are right, this is not backwards-compatible. See:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is I gather, only if pattern matching on the user side? Which seems a rather odd use in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChristopherDavenport Anything changes required on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best way is to just release a new minor. Its limited changes and as you mentioned no one is probably doing this so the only burden is on intermediate libraries.
Are there any other values here we should add?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answering my own question this looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be all, I believe.
Added xpendingsummary, xclaimsummary, xclaimdetail, xautoclaimsummary, xautoclaimdetail. |