actix-ratelimit icon indicating copy to clipboard operation
actix-ratelimit copied to clipboard

Upgrade the project to Actix 4.0.0

Open stevefan1999-personal opened this issue 4 years ago • 4 comments

This is not yet finalized, as there is some substantial change in the source code.

More specifically, there happen to have Request type param removed in several traits, and that MailboxError does not implement ResponseError anymore. I substituted ServiceRequest into the type param and it should work as intended.

I workaround the latter by adding an extra function call ErrorInternalServerError using map_err to wrap the error up. It's a convenient workaround but it's not very effective. I checked the diff from 3.x to 4.x and see that from MailboxError to ResponseError is transformed to an ISE, this is how I come up with this idea.

Yet, copy pasting map_err(ErrorInternalServerError) isn't very fun and tedious, but since this is an upstream Actix problem, why don't we just go blind first for a few moments.

Until the review passed on the ISE part and all the crate has graduated from beta then, let's keep it a draft.

stevefan1999-personal avatar Jan 12 '21 15:01 stevefan1999-personal

Is this going forward? Actix 4 is long out of beta (only actix-rt, upz)

vicky5124 avatar Apr 03 '21 16:04 vicky5124

any update of this one ?

Kavan72 avatar Sep 17 '21 09:09 Kavan72

The user making this has dissapeared from the face of the world. So now somebody else has to do it. I'll check it out.

Tristaan avatar Sep 18 '21 13:09 Tristaan

The user making this has dissapeared from the face of the world. So now somebody else has to do it. I'll check it out.

See my pull request here for working actix4 code

poisson-fish avatar Jan 21 '22 11:01 poisson-fish