Renamed macros to codegen.

This commit is contained in:
Sergio Benitez 2016-09-08 20:38:58 -07:00
parent f14dec0728
commit 46f73ed57c
60 changed files with 44 additions and 44 deletions

View File

@ -8,7 +8,7 @@ application:
```rust ```rust
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -1,5 +1,5 @@
[package] [package]
name = "rocket_macros" name = "rocket_codegen"
version = "0.0.6" version = "0.0.6"
authors = ["Sergio Benitez <sb@sergio.bz>"] authors = ["Sergio Benitez <sb@sergio.bz>"]

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
#[get("/<name>")] //~ ERROR 'name' is declared #[get("/<name>")] //~ ERROR 'name' is declared
fn get(other: &str) -> &'static str { "hi" } //~ ERROR isn't in the function fn get(other: &str) -> &'static str { "hi" } //~ ERROR isn't in the function

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
#[get("/><")] //~ ERROR malformed #[get("/><")] //~ ERROR malformed
fn get() -> &'static str { "hi" } fn get() -> &'static str { "hi" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
#[get("/<param>")] //~ ERROR declared #[get("/<param>")] //~ ERROR declared
fn get() { } //~ ERROR isn't in the function signature fn get() { } //~ ERROR isn't in the function signature

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;

View File

@ -6,7 +6,7 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }
serde = "0.8" serde = "0.8"
serde_json = "0.8" serde_json = "0.8"
serde_macros = "0.8" serde_macros = "0.8"

View File

@ -1,5 +1,5 @@
#![feature(plugin, custom_derive)] #![feature(plugin, custom_derive)]
#![plugin(rocket_macros, serde_macros)] #![plugin(rocket_codegen, serde_macros)]
extern crate rocket; extern crate rocket;
extern crate serde_json; extern crate serde_json;

View File

@ -6,6 +6,6 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }
lazy_static = "*" lazy_static = "*"
tera = { git = "https://github.com/Keats/tera" } tera = { git = "https://github.com/Keats/tera" }

View File

@ -1,5 +1,5 @@
#![feature(plugin, custom_derive, custom_attribute)] #![feature(plugin, custom_derive, custom_attribute)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
#[macro_use] #[macro_use]
extern crate lazy_static; extern crate lazy_static;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::{Rocket, Error, Request}; use rocket::{Rocket, Error, Request};

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin, custom_derive)] #![feature(plugin, custom_derive)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin, custom_derive)] #![feature(plugin, custom_derive)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin, custom_derive)] #![feature(plugin, custom_derive)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,4 +6,4 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }

View File

@ -1,5 +1,5 @@
#![feature(plugin)] #![feature(plugin)]
#![plugin(rocket_macros)] #![plugin(rocket_codegen)]
extern crate rocket; extern crate rocket;
use rocket::Rocket; use rocket::Rocket;

View File

@ -6,7 +6,7 @@ workspace = "../../"
[dependencies] [dependencies]
rocket = { path = "../../lib" } rocket = { path = "../../lib" }
rocket_macros = { path = "../../macros" } rocket_codegen = { path = "../../codegen" }
lazy_static = "*" lazy_static = "*"
tera = { git = "https://github.com/Keats/tera" } tera = { git = "https://github.com/Keats/tera" }
serde = "0.8" serde = "0.8"

View File

@ -1,5 +1,5 @@
#![feature(plugin, custom_derive, custom_attribute)] #![feature(plugin, custom_derive, custom_attribute)]
#![plugin(rocket_macros, serde_macros, diesel_codegen)] #![plugin(rocket_codegen, serde_macros, diesel_codegen)]
extern crate rocket; extern crate rocket;
extern crate tera; extern crate tera;

View File

@ -3,7 +3,7 @@ set -e
EXAMPLES_DIR="examples" EXAMPLES_DIR="examples"
LIB_DIR="lib" LIB_DIR="lib"
MACROS_DIR="macros" CODEGEN_DIR="codegen"
# Add Cargo to PATH. # Add Cargo to PATH.
export PATH=${HOME}/.cargo/bin:${PATH} export PATH=${HOME}/.cargo/bin:${PATH}
@ -17,15 +17,15 @@ function build_and_test() {
pushd ${dir} pushd ${dir}
echo ":: Building '${PWD}'..." echo ":: Building '${PWD}'..."
cargo build --verbose RUST_BACKTRACE=1 cargo build
echo ":: Running unit tests in '${PWD}'..." echo ":: Running unit tests in '${PWD}'..."
cargo test --verbose RUST_BACKTRACE=1 cargo test
popd popd
} }
build_and_test $LIB_DIR build_and_test $LIB_DIR
build_and_test $MACROS_DIR build_and_test $CODEGEN_DIR
for file in ${EXAMPLES_DIR}/*; do for file in ${EXAMPLES_DIR}/*; do
if [ -d "${file}" ]; then if [ -d "${file}" ]; then