Commit Graph

79 Commits

Author SHA1 Message Date
Jeb Rosen ccb5eb1d4f Update UI tests for latest nightly. 2020-05-29 01:53:06 -07:00
Sergio Benitez 807e3b8d85 New version: 0.4.4. 2020-03-09 02:17:21 -07:00
Sergio Benitez d559f09abc Update UI tests for latest nightly. 2020-03-09 02:08:50 -07:00
Sergio Benitez 635a4bddba Fix more broken links. 2020-03-09 02:04:03 -07:00
Sergio Benitez 0ee3205a68 Remove double semicolons; silence test warnings. 2020-03-08 19:18:41 -07:00
Sergio Benitez 60623e8544 Fix UI tests for macOS CI. 2020-02-29 18:44:46 -08:00
Sergio Benitez b3d65b0ad2 New version: 0.4.3. 2020-02-29 18:19:02 -08:00
Sergio Benitez 7a7cd83783 Use proper span in responder codegen output. 2020-02-27 16:14:23 -08:00
Jeb Rosen b29b2db35e Adjust '#[catch]' codegen output to fix a UI test regression in latest nightly. 2020-02-27 16:03:54 -08:00
Sergio Benitez 3a8e23f7f2 Make references to core types absolute in codegen.
Prior to this commit, codegen emitted tokens containing bare types like
'Result' and 'Box' as well as presumed imported variants such as 'None'
and 'Ok'.  However, users are free to shadow these, and if they do, the
generated code will fail to compile, or worse, be incorrect. To avoid
this, this commit makes all references to these core types and imports
absolute.
2020-02-27 16:00:57 -08:00
Sergio Benitez 070c5cbcfa Update UI tests for latest nightly. 2020-02-27 15:48:50 -08:00
Sergio Benitez 4618bd0a5e Test all guide code examples.
Every code example is now fully runnable and testable. As a result, all
examples are now tested and include imports. Relevant imports are shown
by default. Code examples can be expanded to show all imports.

Fixes #432.
2020-02-27 14:43:06 -08:00
Sergio Benitez 996694aefb Update UI tests for latest nightly. 2020-02-27 14:41:21 -08:00
Sergio Benitez 368f387c21 Fix tests for latest nightly. 2020-02-09 01:53:09 -08:00
Sergio Benitez fe4ac8e74d Hide generated macro docs. 2020-02-09 01:53:09 -08:00
Sergio Benitez 2d4dc5ae58 New version: 0.4.2. 2019-06-28 17:50:57 -07:00
Jeb Rosen b7afade412 Allow 'non_snake_case' for generated query params.
Also adds '#[deny(non_snake_case)]' to the complete route generation
test for regressions.

Fixes #1003.
2019-06-28 12:20:13 -07:00
Sergio Benitez 2d4eec8f7e Update 'version_check' to 0.9. 2019-06-28 12:17:28 -07:00
jeb 8e7100f8f7 Reexport derive macros alongside derived traits. 2019-06-28 12:11:18 -07:00
Jacob Pratt 3e3fe56e6a Remove stabilized feature gates.
* try_from
* transpose_result
2019-06-28 12:08:49 -07:00
Sergio Benitez f1f09f17ca New version: 0.4.1. 2019-05-11 16:51:38 -07:00
Jeb Rosen bb0af5423d Update compiler tests for 2019-04-19 nightly. 2019-05-09 09:11:51 -07:00
Oliver Scherer c86f4312fb Always produce a valid, if conservative, subspan. 2019-02-08 18:03:53 -08:00
jeb afd08ffb20 Update compiler tests for 2018-12-28 nightly. 2018-12-29 09:31:14 -08:00
Sergio Benitez ca5623c641 Type encoding to fix encoding issues once and for all.
Fixes #849.
2018-12-12 17:38:36 -08:00
Sergio Benitez 5056705884 Improve query string routing and typed URI docs. 2018-12-07 12:09:15 -08:00
Sergio Benitez a4dcb0cf4c New version: 0.4.0. 2018-12-06 09:19:11 -08:00
Sergio Benitez 7fb6ba9be5 Generate 'FromUriParam' impls in 'UriDisplayPath'. 2018-12-06 09:00:01 -08:00
Sergio Benitez d7933dd6fd Implement ignorable 'uri!' expressions.
Closes #840.
2018-12-06 08:43:24 -08:00
Sergio Benitez 90a6749313 New version: 0.4.0-rc.2. 2018-11-30 21:00:18 -08:00
Sergio Benitez 5ec21d5ba0 Update dependencies to published versions. 2018-11-30 09:00:16 -08:00
Sergio Benitez ac823861c8 Systematically name and span codegen variables.
Fixes #839.
2018-11-30 08:43:31 -08:00
Sergio Benitez b7db74144f Parameterize 'UriDisplay' with 'Path' or 'Query'.
This commit introduces the sealed `UriPart` marker trait as well as the
implementing `Path` and `Query` marker types, allowing for parts of a
URI to be distinguished at the type level. Consequently, `UriDisplay`
has been parameterized with `P: UriPart`, creating `UriDisplay<Path>`
and `UriDisplay<Query>`. The effect of this change is improved type
safely for URI rendering as well as the ability to omit rendering values
in query parts via `Option` and `Result`.

The `UriDisplay` derive was replaced by `UriDisplayQuery` and
`UriDisplayPath` which derive implementations for `UriDisplay<Path>`
and `UriDisplay<Query>`, respectively.

This commit also works around a rustdoc visibility issue by creating a
hidden `http::private` module.

Finally, this commit also removes the now vestigial use of the
`rustc_private` feature in codegen.

Fixes #827.
2018-11-27 10:01:47 -06:00
Sergio Benitez 543b07a4ba Use upstream 'Literal::subspan()'. 2018-11-23 19:15:13 -06:00
jeb ed4055925d Use 'dyn' in codegen to silence 'bare_trait_objects' lint. 2018-11-19 02:34:46 -08:00
Sergio Benitez abb434f228 Stop using white for legible logging everywhere.
Prior to this change, Rocket emitted "white" text in much of its logging
output. On terminals with light backgrounds, the text was nearly
illegible. This PR stops using white coloring altogether, opting instead
to use the terminal's default color albeit with bold styling. On dark
terminals, this will likely be a light color, and on light terminals,
this will likely be a dark color. The end result is that Rocket's
logging output should be readable everywhere.

Resolves #639.
2018-11-19 02:11:38 -08:00
Sergio Benitez 3b6c4d2a5f Prefix codegen imports to avoid name collisions.
Fixes #817.
2018-11-12 13:08:39 -08:00
Sergio Benitez 4dbd87a36f New version: 0.4.0-rc.1. 2018-10-31 14:35:30 -07:00
Sergio Benitez ef3e7ca2c6 Make all top-level crates publishable. 2018-10-31 03:57:37 -07:00
Sergio Benitez 16a65a9a45 Mention selective importing in 'rocket_codegen' docs. 2018-10-30 02:53:51 -07:00
jeb 328bf4b32e Support 'uri' macro in 2018 edition crates. 2018-10-30 02:44:22 -07:00
Sergio Benitez 4ef179cc59 Migrate from 'derive_utils' to published 'devise'.
Resolves #800.
2018-10-29 04:58:56 -07:00
Sergio Benitez 7090e2a1ee Use 'unreachable' to silence clippy on route codegen.
Closes #794.
2018-10-29 01:33:30 -07:00
Sergio Benitez c1b39a016b Improve 'Redirect' and 'rocket_codegen' documentation. 2018-10-28 20:17:44 -07:00
Sergio Benitez a77876f640 Use stable version of 'compiletest_rs'. 2018-10-28 20:17:44 -07:00
Sergio Benitez 556206e8b3 Version all URLs to 'rocket.rs'. 2018-10-26 21:20:12 -07:00
Sergio Benitez 3798cd3e65 Document and test 'UriDisplay', its derive, and 'Formatter'. 2018-10-25 02:53:04 -07:00
Divyahans Gupta cda4c520f1 Add derive for 'UriDisplay'. 2018-10-24 22:14:12 -07:00
Divyahans Gupta 34421f13f3 Allow nested values in 'UriDisplay'. 2018-10-24 21:57:53 -07:00
Sergio Benitez 26db5ecb4e Fix normalization and Windows issues. 2018-10-24 00:01:56 -07:00