Skip to content

Bump matchit to 0.9.1#3702

Open
AMDmi3 wants to merge 3 commits intotokio-rs:mainfrom
AMDmi3:bump-matchit
Open

Bump matchit to 0.9.1#3702
AMDmi3 wants to merge 3 commits intotokio-rs:mainfrom
AMDmi3:bump-matchit

Conversation

@AMDmi3
Copy link
Copy Markdown

@AMDmi3 AMDmi3 commented Mar 31, 2026

Motivation

Explained in #3140 - primarily to be able to use very desired prefixed or suffixed captures in routes, such as router.route("/{id}.png").

Solution

The work had already been done by @mladedav, but as I understand there were issues regarding conflicting routes handling in matchit, which seem to have been resolved in 0.9.1. I've rebased David's commit, bumped matchit to the latest version, and updated tests and documentation, mostly in regard to that prefixed and suffixed captures may no longer be mixed.

In the process, I've discovered a bug in matchit: /a{b}c/ and /a{b}c routes conflict while they shouldn't (and, notably, they do not conflict when added in different order). This fails some tests, which I've silenced and added similar tests using prefixed (as opposed to prefixed+suffixed) captures, so the related code (router nesting) is still covered.

mladedav and others added 3 commits March 31, 2026 18:51
- Split prefix/suffix/prefix+suffix tests, as these are now not allowed
  in the single segment.
- Ignore nest_service prefix+suffix tests, as these fail due to what
  seems to be matchit issue (ibraheemdev/matchit#92). To be noted, similar
  prefix/suffix routes work fine.
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.

2 participants