Commit Graph

164 Commits

Author SHA1 Message Date
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
Sergio Benitez 539a7fc55b Remove 'struct_field_attributes' feature: it's been stabilized. 2017-06-19 17:44:01 -07:00
Sergio Benitez 6a7fde6d70 Initial cleanup of 'http' docs. Add 'handler::Outcome' docs.
This commit also changes the signature of the 'ContentType'
'from_extension" method so that it returns an 'Option<ContentType>' as
opposed to 'ContentType'.

This commit also disallows negative quality values in 'Accept' media
types.
2017-06-19 17:32:33 -07:00
Sergio Benitez cdf9ff9bde Remove 'LoggingLevel' from root. Add ConfigError::Io.
This tentatively completes the 'config' rustdocs.
2017-06-18 21:06:41 -07:00
Sergio Benitez 43a4028085 Use a less confusing version number during dev. 2017-06-18 02:25:26 -07:00
Sergio Benitez a3ea9d0f9a Add support for lenient forms via 'LenientForm'.
This commit changes the 'FromForm' trait in two ways:

  1. The singular method is now named 'from_form'.
  2. The method takes a second parameter: 'strict: bool'.

The 'strict' parameter is used to specify whether form parsing should
be strict or not (i.e. lenient). When parsing is lenient, extra form
fields do not result in an error. This lenient behavior is used by a
new 'LenientForm' data guard type to request lenient form parsing. The
behavior for 'Form' remains unchanged.

Resolves #242.
2017-06-18 01:59:22 -07:00
Sergio Benitez 504a7fe583 Update to yansi 0.3 for proper Debug formatting.
This commit also improves the format of TOML parsing error messages.

Fixes #310.
2017-06-06 13:56:13 -07:00
Sergio Benitez fa31b6ae42 Support the 'dev' channel during build.
Resolves #306.
2017-06-02 17:41:15 -07:00
Sergio Benitez a6c4d053ad Switch to 'yansi' for all terminal coloring.
Resolves #299.
2017-06-01 22:10:05 -07:00
Sergio Benitez 73fed03ef4 New version: 0.2.8. 2017-06-01 22:10:05 -07:00