Skip to content
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

routes macro allowing multiple paths per handler #2718

Merged
merged 11 commits into from Jul 4, 2022

Conversation

ModProg
Copy link
Contributor

@ModProg ModProg commented Mar 30, 2022

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

Adds support for routes macro, allowing multiple paths and methods to be specified.

Closes #2713

@robjtede robjtede added A-codegen project: actix-web-codegen B-semver-minor labels Apr 2, 2022
@ModProg ModProg marked this pull request as ready for review April 30, 2022 16:23
@ModProg ModProg changed the title WIP: basic implementation for routes macro routes macro allowing multiple paths per handler Apr 30, 2022
@ModProg
Copy link
Contributor Author

ModProg commented Apr 30, 2022

This is now working and documented (already using it my self in https://github.com/ModProg/paste).

Would like some feedback on the code to get this in a merge able state ASAP, so I don't need to run on a git version forever.

@robjtede robjtede added this to the actix-web v4.2 milestone Apr 30, 2022
@robjtede robjtede requested a review from a team April 30, 2022 16:31
Copy link
Member

@popzxc popzxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

actix-web-codegen/tests/trybuild.rs Show resolved Hide resolved
@ModProg ModProg requested a review from popzxc May 3, 2022 17:43
Copy link
Member

@popzxc popzxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

actix-web-codegen/src/lib.rs Outdated Show resolved Hide resolved
actix-web-codegen/src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
@ModProg
Copy link
Contributor Author

ModProg commented May 5, 2022

Is there anything left for me to do to make this PR mergeable?

@robjtede robjtede requested a review from a team May 5, 2022 16:34
@robjtede
Copy link
Member

robjtede commented May 5, 2022

I haven't reviewed yet but I'm targetting this for v4.2, not the upcoming v4.1 so it will be merged after that release.

@robjtede
Copy link
Member

robjtede commented Jul 4, 2022

CI issue was just missing a feature flag on syn. Cleaned up a bit too. Looking good now.

Thanks for the contribution.

@robjtede robjtede enabled auto-merge (squash) July 4, 2022 04:08
@robjtede robjtede merged commit 8759d79 into actix:master Jul 4, 2022
@ModProg
Copy link
Contributor Author

ModProg commented Jul 5, 2022

Thanks, really looking forward to 4.2 now :)

@ModProg ModProg deleted the advanced_route_macro branch July 5, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen project: actix-web-codegen B-semver-minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attribute macro multiple paths
3 participants