Commit Graph

173 Commits

Author SHA1 Message Date
Sergio Benitez b8367d52f8 Update codegen for 2017-12-22 nightly.
This works around #513 by patching 'ring' globally using the new
'[patch]' Cargo section.
2017-12-27 19:37:15 -08:00
Sergio Benitez 3c2db1c7aa Pin 'compiletest_rs' to compatible versions. 2017-12-27 00:33:51 -08:00
Sergio Benitez 94534c3895 List all valid methods in codegen error message. 2017-12-26 10:11:01 -08:00
Sergio Benitez a9c66c9426 Update codegen and pear_codegen for 2017-12-17 nightly. 2017-12-18 06:50:27 -08:00
Sergio Benitez d22dbfbded Update codegen for 2017-12-14 nightly. 2017-12-14 23:09:59 -08:00
Sergio Benitez fabe7ef06e Bump codegen nightly requirement to 2017-12-13. 2017-12-14 18:12:45 +07:00
Sergio Benitez 4ea9b046cd Update codegen for 2017-12-11 nightly. 2017-12-14 15:09:48 +07:00
Sergio Benitez aad97e6be0 Use correct rustdoc 'html_root_url'.
Fixes #474.
2017-11-22 10:58:20 -08:00
Tobias Stolzmann af58f72018 Use absolute path in 'catchers!' generated code. 2017-11-17 12:37:56 -08:00
Sergio Benitez d136332e91 Update 'stderr' messages for latest nightly. 2017-11-09 10:21:01 +01:00
Sergio Benitez 07d4d23cc8 Update dependencies. 2017-10-09 20:15:18 -07:00
Sergio Benitez e8ada89197 Remove unneeded 'SpanExt::expand' method. 2017-09-25 21:19:50 -07:00
Sergio Benitez 651a245bd5 Update codegen for 2017-09-25 nightly. 2017-09-25 19:31:46 -07:00
Sergio Benitez 237c673be4 Rename '#[error]' to '#[catch]', 'errors!' to 'catchers!'. 2017-09-22 19:04:14 -07:00
Sergio Benitez 63169599a7 Convert several 'compilefail' tests to 'ui' tests. 2017-09-21 18:01:56 -07:00
Sergio Benitez 78cc1bda7e Upgrade to 'compiletest' 0.3. 2017-09-21 17:17:40 -07:00
Sergio Benitez f9f4822941 Remove now unneeded 'syntax_pos' import. 2017-09-21 16:57:29 -07:00
Sergio Benitez 16feedd563 Remove 'drop_types_in_const' feature: stabilized. 2017-09-14 22:39:19 -07:00
Sergio Benitez eeef8a44ce Document the 'uri!' macro. 2017-09-14 22:13:07 -07:00
Sergio Benitez 17b8ab694c Use 'FromUriParam' trait for better ergonomics in 'uri!'. 2017-09-14 22:13:07 -07:00
Sergio Benitez 3bf577db6e Handle segments parameters in 'uri!'.
This commit also moves the 'uri' module into its own directory,
includes the beginning of the 'FromUriParam' trait, and abandons the
'url' crate in favor of 'percent_encoding' for percent encoding.
2017-09-14 22:13:07 -07:00
Sergio Benitez 5efc4b1096 Rename 'URI' to 'Uri'. 2017-09-14 22:13:07 -07:00
Sergio Benitez 909eae894a Don't implement 'UriDisplay' for all 'T: Display'.
We don't know if that 'Display' implementation is URI safe, so using
it blindly could result in generating bad URIs.
2017-09-14 22:12:54 -07:00
Sergio Benitez 24f7734c00 Check mount point validity in 'uri!' macro. 2017-09-14 22:12:54 -07:00
Sergio Benitez bbeb95357b Add compile-fail tests for 'uri!' macro. 2017-09-14 22:12:47 -07:00
Sergio Benitez 02cff01e17 Give a nice error when uri! macro is empty. 2017-09-14 22:12:46 -07:00
Sergio Benitez c4524400b2 Add suite of positive tests for typed URIs. 2017-09-14 22:12:46 -07:00
Sergio Benitez a291c9b42e Improve 'uri!' macro internal code. 2017-09-14 22:12:03 -07:00
Sergio Benitez 96b3d81882 Make all run-pass tests regular tests. 2017-09-14 22:12:03 -07:00
Sergio Benitez 084481a84e Initial implementation of typed URIs.
This is a breaking change. All Rocket applications using code
generation must now additionally declare usage of the 'decl_macro'
feature.
2017-09-14 22:10:25 -07:00
Sergio Benitez 3ed0201c6e Remove unused 'extern crate's. 2017-08-31 17:03:47 -07:00
Sergio Benitez c5890934c0 Improve missing argument compile-time error. 2017-08-22 01:01:57 -07:00
Sergio Benitez 89443bcdf0 Remove unnecessary 'RouteGenerateExt' trait. 2017-08-20 11:13:45 -07:00
Sergio Benitez 4df7ce6bf5 Propogate route names through codegen to runtime.
This commit modifies `codegen` so that a route's name (the name of the
route handler) is stored in the generated static route information
structure and later propogated into the corresponding `Route`
structure.

The primary advantage of this change is an improvement to debug and
error messages which now include route names. The collision error
message, in particular, has been improved dramatically in this commit.
Additionally, the `LaunchError::Collision` variant now contains a
vector of the colliding routes.
2017-08-20 10:55:23 -07:00
Sergio Benitez 8183f63630 Remove lints and associated code from 'rocket_codegen'.
Rust's linting API is incredibly unstable, resulting in unnecessary
breakage to `rocket_codegen`. Rocket's lints are also not as
conservative as would be desired, resulting in spurious warnings. For
these reasons, this commit removes linting from `rocket_codegen`.

These lints will likely be reintroduced as part of a 'rocket_lints'
crate. Factoring the lints out to a separate crate means that lint
breakage can be dealt with by uncommenting the dependency instead of
waiting for a new release or backtracking nightlies. In the same vein,
it will likely improve stability of the 'rocket_codegen' crate.
2017-08-15 11:39:22 -07:00
Sergio Benitez 3f6c6fd576 Move to 0.4.0-dev on master. 2017-08-11 09:32:27 -07:00
Sergio Benitez 721f6204ea Update lints for latest nightly, '2017-08-10'. 2017-08-11 09:14:54 -07:00
Sergio Benitez 86c7a67b02 Allow named parameters to be ignored. 2017-08-02 18:44:31 -07:00
Sergio Benitez 0b7d9f4602 Remove unused doc comments. 2017-08-02 17:48:00 -07:00
Sergio Benitez 95452af449 Improve form field name error message. 2017-08-02 17:41:10 -07:00
Sergio Benitez 952c98fc04 Allow the full range of valid form field renames.
Closes #337.
2017-08-02 17:37:20 -07:00
Sergio Benitez 72bed509b9 Handle 'TypeRelative' qualified paths in lints.
Fixes #367.
2017-08-02 02:40:37 -07:00
Alex Burka 02794db2cd Allow unreachable patterns in generated matches. 2017-07-27 00:09:54 -04:00
Sergio Benitez cdacda0896 New version: 0.3.0. 2017-07-14 11:30:48 -07:00
Sergio Benitez 0bbfa5e21a Update 'version_check' to 0.1.3. 2017-07-12 04:15:30 -07:00
Sergio Benitez ed14f59c44 Add documentation for the 'FromForm' derive. 2017-07-10 03:41:45 -07:00
Sergio Benitez 7e0cbe4842 Restrict compilation to rustc >= 2017-07-09. 2017-07-09 22:34:29 -07:00
Sergio Benitez 6050eb5169 Update for 2017-07-09. 'associated_consts' is stable. 2017-07-09 22:00:01 -07:00
Sergio Benitez 9dd83a9c39 Use 'eprintln' instead of custom 'printerr'. 2017-07-03 02:59:47 -07:00
Sergio Benitez 3f87b16d75 Update minimum nightly to '2017-06-19'. 2017-06-19 22:58:31 -07:00