diff --git a/Cargo.toml b/Cargo.toml index ce526946..9f7f11cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ codegen-units = 4 [workspace] members = [ "core/lib/", - "core/codegen_next/", + "core/codegen/", "core/http/", "contrib/lib", "contrib/codegen", diff --git a/core/codegen_next/Cargo.toml b/core/codegen/Cargo.toml similarity index 89% rename from core/codegen_next/Cargo.toml rename to core/codegen/Cargo.toml index fa21f52e..b7bc15b6 100644 --- a/core/codegen_next/Cargo.toml +++ b/core/codegen/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "rocket_codegen_next" +name = "rocket_codegen" version = "0.4.0-dev" authors = ["Sergio Benitez "] description = "Procedural macros for the Rocket web framework." -documentation = "https://api.rocket.rs/0.4.0-dev/rocket_codegen_next/" +documentation = "https://api.rocket.rs/0.4.0-dev/rocket_codegen/" homepage = "https://rocket.rs" repository = "https://github.com/SergioBenitez/Rocket" readme = "../../README.md" diff --git a/core/codegen_next/src/attribute/catch.rs b/core/codegen/src/attribute/catch.rs similarity index 100% rename from core/codegen_next/src/attribute/catch.rs rename to core/codegen/src/attribute/catch.rs diff --git a/core/codegen_next/src/attribute/mod.rs b/core/codegen/src/attribute/mod.rs similarity index 100% rename from core/codegen_next/src/attribute/mod.rs rename to core/codegen/src/attribute/mod.rs diff --git a/core/codegen_next/src/attribute/route.rs b/core/codegen/src/attribute/route.rs similarity index 100% rename from core/codegen_next/src/attribute/route.rs rename to core/codegen/src/attribute/route.rs diff --git a/core/codegen_next/src/attribute/segments.rs b/core/codegen/src/attribute/segments.rs similarity index 100% rename from core/codegen_next/src/attribute/segments.rs rename to core/codegen/src/attribute/segments.rs diff --git a/core/codegen_next/src/bang/mod.rs b/core/codegen/src/bang/mod.rs similarity index 100% rename from core/codegen_next/src/bang/mod.rs rename to core/codegen/src/bang/mod.rs diff --git a/core/codegen_next/src/bang/uri.rs b/core/codegen/src/bang/uri.rs similarity index 100% rename from core/codegen_next/src/bang/uri.rs rename to core/codegen/src/bang/uri.rs diff --git a/core/codegen_next/src/bang/uri_parsing.rs b/core/codegen/src/bang/uri_parsing.rs similarity index 100% rename from core/codegen_next/src/bang/uri_parsing.rs rename to core/codegen/src/bang/uri_parsing.rs diff --git a/core/codegen_next/src/derive/from_form.rs b/core/codegen/src/derive/from_form.rs similarity index 100% rename from core/codegen_next/src/derive/from_form.rs rename to core/codegen/src/derive/from_form.rs diff --git a/core/codegen_next/src/derive/from_form_value.rs b/core/codegen/src/derive/from_form_value.rs similarity index 100% rename from core/codegen_next/src/derive/from_form_value.rs rename to core/codegen/src/derive/from_form_value.rs diff --git a/core/codegen_next/src/derive/mod.rs b/core/codegen/src/derive/mod.rs similarity index 100% rename from core/codegen_next/src/derive/mod.rs rename to core/codegen/src/derive/mod.rs diff --git a/core/codegen_next/src/derive/responder.rs b/core/codegen/src/derive/responder.rs similarity index 100% rename from core/codegen_next/src/derive/responder.rs rename to core/codegen/src/derive/responder.rs diff --git a/core/codegen_next/src/http_codegen.rs b/core/codegen/src/http_codegen.rs similarity index 100% rename from core/codegen_next/src/http_codegen.rs rename to core/codegen/src/http_codegen.rs diff --git a/core/codegen_next/src/lib.rs b/core/codegen/src/lib.rs similarity index 100% rename from core/codegen_next/src/lib.rs rename to core/codegen/src/lib.rs diff --git a/core/codegen_next/src/proc_macro_ext.rs b/core/codegen/src/proc_macro_ext.rs similarity index 100% rename from core/codegen_next/src/proc_macro_ext.rs rename to core/codegen/src/proc_macro_ext.rs diff --git a/core/codegen_next/src/syn_ext.rs b/core/codegen/src/syn_ext.rs similarity index 100% rename from core/codegen_next/src/syn_ext.rs rename to core/codegen/src/syn_ext.rs diff --git a/core/codegen_next/tests/compile-test.rs b/core/codegen/tests/compile-test.rs similarity index 100% rename from core/codegen_next/tests/compile-test.rs rename to core/codegen/tests/compile-test.rs diff --git a/core/codegen_next/tests/from_form.rs b/core/codegen/tests/from_form.rs similarity index 100% rename from core/codegen_next/tests/from_form.rs rename to core/codegen/tests/from_form.rs diff --git a/core/codegen_next/tests/from_form_value.rs b/core/codegen/tests/from_form_value.rs similarity index 100% rename from core/codegen_next/tests/from_form_value.rs rename to core/codegen/tests/from_form_value.rs diff --git a/core/codegen_next/tests/other-route.rs b/core/codegen/tests/other-route.rs similarity index 100% rename from core/codegen_next/tests/other-route.rs rename to core/codegen/tests/other-route.rs diff --git a/core/codegen_next/tests/responder.rs b/core/codegen/tests/responder.rs similarity index 100% rename from core/codegen_next/tests/responder.rs rename to core/codegen/tests/responder.rs diff --git a/core/codegen_next/tests/route-data.rs b/core/codegen/tests/route-data.rs similarity index 100% rename from core/codegen_next/tests/route-data.rs rename to core/codegen/tests/route-data.rs diff --git a/core/codegen_next/tests/route-format.rs b/core/codegen/tests/route-format.rs similarity index 100% rename from core/codegen_next/tests/route-format.rs rename to core/codegen/tests/route-format.rs diff --git a/core/codegen_next/tests/route-params.rs b/core/codegen/tests/route-params.rs similarity index 100% rename from core/codegen_next/tests/route-params.rs rename to core/codegen/tests/route-params.rs diff --git a/core/codegen_next/tests/route-ranking.rs b/core/codegen/tests/route-ranking.rs similarity index 100% rename from core/codegen_next/tests/route-ranking.rs rename to core/codegen/tests/route-ranking.rs diff --git a/core/codegen_next/tests/route.rs b/core/codegen/tests/route.rs similarity index 100% rename from core/codegen_next/tests/route.rs rename to core/codegen/tests/route.rs diff --git a/core/codegen_next/tests/typed-uris.rs b/core/codegen/tests/typed-uris.rs similarity index 100% rename from core/codegen_next/tests/typed-uris.rs rename to core/codegen/tests/typed-uris.rs diff --git a/core/codegen_next/tests/ui-fail/catch.rs b/core/codegen/tests/ui-fail/catch.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/catch.rs rename to core/codegen/tests/ui-fail/catch.rs diff --git a/core/codegen_next/tests/ui-fail/catch.stderr b/core/codegen/tests/ui-fail/catch.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/catch.stderr rename to core/codegen/tests/ui-fail/catch.stderr diff --git a/core/codegen_next/tests/ui-fail/catch_type_errors.rs b/core/codegen/tests/ui-fail/catch_type_errors.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/catch_type_errors.rs rename to core/codegen/tests/ui-fail/catch_type_errors.rs diff --git a/core/codegen_next/tests/ui-fail/catch_type_errors.stderr b/core/codegen/tests/ui-fail/catch_type_errors.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/catch_type_errors.stderr rename to core/codegen/tests/ui-fail/catch_type_errors.stderr diff --git a/core/codegen_next/tests/ui-fail/catchers.rs b/core/codegen/tests/ui-fail/catchers.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/catchers.rs rename to core/codegen/tests/ui-fail/catchers.rs diff --git a/core/codegen_next/tests/ui-fail/catchers.stderr b/core/codegen/tests/ui-fail/catchers.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/catchers.stderr rename to core/codegen/tests/ui-fail/catchers.stderr diff --git a/core/codegen_next/tests/ui-fail/from_form.rs b/core/codegen/tests/ui-fail/from_form.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/from_form.rs rename to core/codegen/tests/ui-fail/from_form.rs diff --git a/core/codegen_next/tests/ui-fail/from_form.stderr b/core/codegen/tests/ui-fail/from_form.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/from_form.stderr rename to core/codegen/tests/ui-fail/from_form.stderr diff --git a/core/codegen_next/tests/ui-fail/from_form_type_errors.rs b/core/codegen/tests/ui-fail/from_form_type_errors.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/from_form_type_errors.rs rename to core/codegen/tests/ui-fail/from_form_type_errors.rs diff --git a/core/codegen_next/tests/ui-fail/from_form_type_errors.stderr b/core/codegen/tests/ui-fail/from_form_type_errors.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/from_form_type_errors.stderr rename to core/codegen/tests/ui-fail/from_form_type_errors.stderr diff --git a/core/codegen_next/tests/ui-fail/from_form_value.rs b/core/codegen/tests/ui-fail/from_form_value.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/from_form_value.rs rename to core/codegen/tests/ui-fail/from_form_value.rs diff --git a/core/codegen_next/tests/ui-fail/from_form_value.stderr b/core/codegen/tests/ui-fail/from_form_value.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/from_form_value.stderr rename to core/codegen/tests/ui-fail/from_form_value.stderr diff --git a/core/codegen_next/tests/ui-fail/responder-types.rs b/core/codegen/tests/ui-fail/responder-types.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/responder-types.rs rename to core/codegen/tests/ui-fail/responder-types.rs diff --git a/core/codegen_next/tests/ui-fail/responder-types.stderr b/core/codegen/tests/ui-fail/responder-types.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/responder-types.stderr rename to core/codegen/tests/ui-fail/responder-types.stderr diff --git a/core/codegen_next/tests/ui-fail/responder.stderr b/core/codegen/tests/ui-fail/responder.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/responder.stderr rename to core/codegen/tests/ui-fail/responder.stderr diff --git a/core/codegen_next/tests/ui-fail/route-attribute-general-syntax.rs b/core/codegen/tests/ui-fail/route-attribute-general-syntax.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/route-attribute-general-syntax.rs rename to core/codegen/tests/ui-fail/route-attribute-general-syntax.rs diff --git a/core/codegen_next/tests/ui-fail/route-attribute-general-syntax.stderr b/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/route-attribute-general-syntax.stderr rename to core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr diff --git a/core/codegen_next/tests/ui-fail/route-path-bad-syntax.rs b/core/codegen/tests/ui-fail/route-path-bad-syntax.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/route-path-bad-syntax.rs rename to core/codegen/tests/ui-fail/route-path-bad-syntax.rs diff --git a/core/codegen_next/tests/ui-fail/route-path-bad-syntax.stderr b/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/route-path-bad-syntax.stderr rename to core/codegen/tests/ui-fail/route-path-bad-syntax.stderr diff --git a/core/codegen_next/tests/ui-fail/route-type-errors.rs b/core/codegen/tests/ui-fail/route-type-errors.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/route-type-errors.rs rename to core/codegen/tests/ui-fail/route-type-errors.rs diff --git a/core/codegen_next/tests/ui-fail/route-type-errors.stderr b/core/codegen/tests/ui-fail/route-type-errors.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/route-type-errors.stderr rename to core/codegen/tests/ui-fail/route-type-errors.stderr diff --git a/core/codegen_next/tests/ui-fail/route-warnings.rs b/core/codegen/tests/ui-fail/route-warnings.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/route-warnings.rs rename to core/codegen/tests/ui-fail/route-warnings.rs diff --git a/core/codegen_next/tests/ui-fail/route-warnings.stderr b/core/codegen/tests/ui-fail/route-warnings.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/route-warnings.stderr rename to core/codegen/tests/ui-fail/route-warnings.stderr diff --git a/core/codegen_next/tests/ui-fail/routes.rs b/core/codegen/tests/ui-fail/routes.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/routes.rs rename to core/codegen/tests/ui-fail/routes.rs diff --git a/core/codegen_next/tests/ui-fail/routes.stderr b/core/codegen/tests/ui-fail/routes.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/routes.stderr rename to core/codegen/tests/ui-fail/routes.stderr diff --git a/core/codegen_next/tests/ui-fail/typed-uri-bad-type.rs b/core/codegen/tests/ui-fail/typed-uri-bad-type.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/typed-uri-bad-type.rs rename to core/codegen/tests/ui-fail/typed-uri-bad-type.rs diff --git a/core/codegen_next/tests/ui-fail/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/typed-uri-bad-type.stderr rename to core/codegen/tests/ui-fail/typed-uri-bad-type.stderr diff --git a/core/codegen_next/tests/ui-fail/typed-uris-bad-params.rs b/core/codegen/tests/ui-fail/typed-uris-bad-params.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/typed-uris-bad-params.rs rename to core/codegen/tests/ui-fail/typed-uris-bad-params.rs diff --git a/core/codegen_next/tests/ui-fail/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/typed-uris-bad-params.stderr rename to core/codegen/tests/ui-fail/typed-uris-bad-params.stderr diff --git a/core/codegen_next/tests/ui-fail/typed-uris-invalid-syntax.rs b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.rs similarity index 100% rename from core/codegen_next/tests/ui-fail/typed-uris-invalid-syntax.rs rename to core/codegen/tests/ui-fail/typed-uris-invalid-syntax.rs diff --git a/core/codegen_next/tests/ui-fail/typed-uris-invalid-syntax.stderr b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr similarity index 100% rename from core/codegen_next/tests/ui-fail/typed-uris-invalid-syntax.stderr rename to core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr diff --git a/core/codegen_next/tests/ui-fail/update-references.sh b/core/codegen/tests/ui-fail/update-references.sh similarity index 100% rename from core/codegen_next/tests/ui-fail/update-references.sh rename to core/codegen/tests/ui-fail/update-references.sh diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index 50581917..97130156 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -18,7 +18,7 @@ categories = ["web-programming::http-server"] tls = ["rocket_http/tls"] [dependencies] -rocket_codegen_next = { version = "0.4.0-dev", path = "../codegen_next" } +rocket_codegen = { version = "0.4.0-dev", path = "../codegen" } rocket_http = { version = "0.4.0-dev", path = "../http" } yansi = "0.4" log = "0.4" diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs index 199198c0..8a8a4fff 100644 --- a/core/lib/src/lib.rs +++ b/core/lib/src/lib.rs @@ -98,8 +98,8 @@ //! //! [testing chapter of the guide]: https://rocket.rs/guide/testing/#testing -#[allow(unused_imports)] #[macro_use] extern crate rocket_codegen_next; -#[doc(hidden)] pub use rocket_codegen_next::*; +#[allow(unused_imports)] #[macro_use] extern crate rocket_codegen; +#[doc(hidden)] pub use rocket_codegen::*; extern crate rocket_http; #[macro_use] extern crate log; diff --git a/scripts/config.sh b/scripts/config.sh index 62120698..c710c11d 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -34,7 +34,7 @@ SITE_ROOT=$(relative "site") || exit $? # Root of project-like directories. CORE_LIB_ROOT=$(relative "core/lib") || exit $? -CORE_CODEGEN_NEXT_ROOT=$(relative "core/codegen_next") || exit $? +CORE_CODEGEN_ROOT=$(relative "core/codegen") || exit $? CORE_HTTP_ROOT=$(relative "core/http") || exit $? CONTRIB_LIB_ROOT=$(relative "contrib/lib") || exit $? CONTRIB_CODEGEN_ROOT=$(relative "contrib/codegen") || exit $? @@ -45,7 +45,7 @@ DOC_DIR=$(relative "target/doc") || exit $? ALL_PROJECT_DIRS=( "${CORE_LIB_ROOT}" - "${CORE_CODEGEN_NEXT_ROOT}" + "${CORE_CODEGEN_ROOT}" "${CORE_HTTP_ROOT}" "${CONTRIB_LIB_ROOT}" "${CONTRIB_CODEGEN_ROOT}" @@ -58,7 +58,7 @@ if [ "${1}" = "-p" ]; then echo "CONTRIB_ROOT: ${CONTRIB_ROOT}" echo "SITE_ROOT: ${SITE_ROOT}" echo "CORE_LIB_ROOT: ${CORE_LIB_ROOT}" - echo "CORE_CODEGEN_NEXT_ROOT: ${CORE_CODEGEN_NEXT_ROOT}" + echo "CORE_CODEGEN_ROOT: ${CORE_CODEGEN_ROOT}" echo "CORE_HTTP_ROOT: ${CORE_HTTP_ROOT}" echo "CONTRIB_LIB_ROOT: ${CONTRIB_LIB_ROOT}" echo "CONTRIB_CODEGEN_ROOT: ${CONTRIB_CODEGEN_ROOT}" diff --git a/scripts/mk-docs.sh b/scripts/mk-docs.sh index 2c70d115..306b6b83 100755 --- a/scripts/mk-docs.sh +++ b/scripts/mk-docs.sh @@ -20,7 +20,7 @@ fi echo ":::: Generating the docs..." pushd "${PROJECT_ROOT}" > /dev/null 2>&1 RUSTDOCFLAGS="-Z unstable-options --crate-version ${ROCKET_VERSION}" \ - cargo doc -p rocket -p rocket_contrib -p rocket_codegen_next --no-deps --all-features + cargo doc -p rocket -p rocket_contrib -p rocket_codegen --no-deps --all-features popd > /dev/null 2>&1 # Blank index, for redirection.