Commit Graph

71 Commits

Author SHA1 Message Date
Jon Lim 4fb51ad70a clean up for rust fmt 2024-04-02 22:19:25 -07:00
Jon Lim 828be28199 clean up code. fix bugs with route and method attributes with parameters 2024-04-02 22:13:13 -07:00
Jon Lim ab73c72596 add tests again. refactor nested code. 2024-03-31 22:37:48 -07:00
Jon Lim c4520d909a work in progress. revised procedural macro to change othe macro call 2024-03-31 20:44:08 -07:00
Jonathan Lim 3ee0dc9329
Update actix-web-codegen/src/lib.rs with comment documentation fix
Co-authored-by: oliver <151407407+kwfn@users.noreply.github.com>
2023-12-09 17:56:28 -08:00
Jon Lim ec4633a911 code formatting cleanup 2023-09-13 22:45:37 -07:00
Jon Lim 6bedb958e4 add some unit tests 2023-09-13 21:57:54 -07:00
Jon Lim db69279557 started some test code 2023-09-10 16:13:12 -07:00
Jon Lim ac82b56ad7 Update scope macro code to work with current HttpServiceFactory 2023-09-10 14:15:41 -07:00
Jon Lim ad90bc926d add scope proc macro 2023-09-03 14:05:21 -07:00
Rob Ede 76f6106f8f
fix: wrap attribute codegen regression when using expression (#3119) 2023-08-29 21:27:36 +01:00
Rob Ede 75a97f6b32
chore: remove clippy config file 2023-07-24 03:29:56 +01:00
Rob Ede d22c9f9fb1
update syn to 2 in web codegen (#3081) 2023-07-20 10:49:01 +01:00
Rob Ede 79a38e0628
apply standard formatting 2023-07-17 02:38:12 +01:00
Rob Ede 241da6e081
update MSRV to 1.65 (#3059) 2023-07-02 01:09:15 +01:00
Rob Ede 67efa4a4db
migrate to doc_auto_cfg 2023-02-26 21:55:25 +00:00
Rob Ede dc08ea044b
clippy 2023-02-13 21:09:28 +00:00
Rob Ede 359d5d5c80
refactor codegen route guards 2023-02-06 17:06:47 +00:00
edgerunnergit 65c0545a7a
added support for creating custom methods with route macro (#2969)
Co-authored-by: Rob Ede <robjtede@icloud.com>
Closes https://github.com/actix/actix-web/issues/2893
2023-02-06 12:40:41 +00:00
Rob Ede 6f0a6bd1bb
address clippy lints
For intrepid commit message readers:
The choice to add allows for the inlined format args lint instead of actually
inlining them is not very clear because our actual real world MSRV is not clear.
We currently claim 1.60 is our MSRV but this is mainly due to dependencies. I'm
fairly sure that we could support < 1.58 if those deps are outdated in a users
lockfile. We'll remove these allows again at some point soon.
2023-01-01 20:56:34 +00:00
Roland Fredenhagen 8759d79b03
`routes` macro allowing multiple paths per handler (#2718)
* WIP: basic implementation for `routes` macro

* chore: changelog, docs, tests

* error on missing methods

* Apply suggestions from code review

Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>

* update test stderr expectation

* add additional tests

* fix stderr output

* remove useless ResourceType

this is dead code from back when .to and .to_async were different ways to add a service

Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-07-04 04:31:49 +00:00
JY Choi 8e76a1c775
Allow a path as a guard in route handler macro (#2771)
* Allow a path as a guard in route handler macro

* Update CHANGES.md

Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-06-06 18:53:23 +01:00
Rob Ede 074d18209d
better document relationship with tokio 2022-02-08 10:21:47 +00:00
Rob Ede bc89f0bfc2
s/example/examples 2022-01-21 16:56:33 +00:00
Rob Ede c959916346
fmt codegen 2022-01-20 01:54:57 +00:00
Rob Ede f227e880d7
refactor route codegen to be cleaner 2022-01-20 01:53:02 +00:00
Rob Ede f2e736719a
add url_for test for conflicting named resources 2022-01-20 01:30:33 +00:00
Rob Ede 81ef12a0fd
add warn log to from_parts if given request is cloned
closes #2562
2022-01-19 22:23:53 +00:00
Rob Ede 07f2fe385b
standardize crate level lints 2021-12-08 06:09:56 +00:00
Rob Ede 2a72bdae09
improve typed header macro (#2481) 2021-12-02 15:25:39 +00:00
Rob Ede 591abc37c3
add test runtime macro (#2409) 2021-10-19 17:30:32 +01:00
Rob Ede efdf3ab1c3
clippy 2021-10-19 01:32:58 +01:00
Rob Ede 6b3ea4fc61
copy original route macro input with compile errors (#2410) 2021-10-14 18:06:31 +01:00
Aravinth Manivannan 168b2f227d
compile time validation of path (#2350)
* compile time validation of path

* added trybuild err message

* Update Cargo.toml

* add changelog entry

* test more cases of path validation

* fmt

Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-08-30 21:50:40 +01:00
Igor Aleksanov 262c6bc828
Various refactorings (#2281)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-06-26 15:33:43 +01:00
Ibraheem Ahmed e46cda5228
Deduplicate rt::main macro logic (#2255) 2021-06-08 22:44:56 +01:00
Rob Ede 3188ef5731
don't use rust annotation on code doc blocks 2021-03-25 08:45:52 +00:00
Richard Chien fc6f974617
Add "name" attribute to route macro (#1934) 2021-03-04 12:38:47 +00:00
Erik Johnston 42711c23d7
Port over doc comments in route macros. (#2022)
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-02-24 12:26:56 +00:00
Rob Ede bd26083f33
prepare codegen 0.5.0-beta.1 release 2021-02-10 12:45:46 +00:00
Rob Ede a290e58982
prepare beta 2 release set (#1975) 2021-02-10 12:10:03 +00:00
fakeshadow 41bc04b1c4
Use immutable reference of service state. Update awc dns resolver. (#1905) 2021-02-07 01:00:40 +00:00
Aravinth Manivannan fabc68659b
Intradoc links conversion (#1827)
* switching to nightly for intra-doc links

* actix-files intra-doc conversion

* more specific Result

* intradoc conversion complete

* rm blank comments and readme doc link fixes

* macros and broken links
2020-12-13 13:28:39 +00:00
Rob Ede c53e9468bc
prepare codegen 0.4.0 release (#1702) 2020-09-24 23:54:01 +01:00
Arniu Tseng 162121bf8d
Unify route macros (#1705) 2020-09-22 22:42:51 +01:00
Matt Gathu 509b2e6eec
Provide attribute macro for multiple HTTP methods (#1674)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2020-09-16 22:37:41 +01:00
Rob Ede 3fde3be3d8
add trybuild tests to routing codegen (#1677) 2020-09-13 16:31:08 +01:00
Yuki Okushi 92b5bcd13f
Check format and tweak CI config (#1619) 2020-07-22 00:28:33 +01:00
Rob Ede a70e599ff5
re-export rt in web and add main macro (#1575) 2020-06-22 20:09:48 +01:00
Yuki Okushi 24372467d9
codegen: Minimize `futures` dependencies 2020-05-19 08:29:11 +09:00