Migrate from 'derive_utils' to published 'devise'.

Resolves #800.
This commit is contained in:
Sergio Benitez 2018-10-28 21:09:04 -07:00
parent 7090e2a1ee
commit 4ef179cc59
17 changed files with 23 additions and 29 deletions

View File

@ -19,9 +19,6 @@ database_attribute = []
[lib] [lib]
proc-macro = true proc-macro = true
[dependencies.derive_utils]
git = "https://github.com/SergioBenitez/derive-utils"
rev = "62f361f"
[dependencies] [dependencies]
devise = "0.1"
quote = "0.6" quote = "0.6"

View File

@ -1,5 +1,5 @@
use proc_macro::TokenStream; use proc_macro::TokenStream;
use derive_utils::{Spanned, Result}; use devise::{Spanned, Result};
use syn::{DataStruct, Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility}; use syn::{DataStruct, Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility};
#[derive(Debug)] #[derive(Debug)]

View File

@ -24,14 +24,14 @@
//! DATABASE_NAME := (string literal) //! DATABASE_NAME := (string literal)
//! </pre> //! </pre>
extern crate derive_utils; extern crate devise;
extern crate proc_macro; extern crate proc_macro;
#[allow(unused_imports)] #[allow(unused_imports)]
#[macro_use] extern crate quote; #[macro_use] extern crate quote;
#[allow(unused_imports)] #[allow(unused_imports)]
crate use derive_utils::{syn, proc_macro2}; crate use devise::{syn, proc_macro2};
#[cfg(feature = "database_attribute")] #[cfg(feature = "database_attribute")]
mod database; mod database;

View File

@ -21,15 +21,12 @@ proc-macro = true
indexmap = "1.0" indexmap = "1.0"
quote = "0.6.1" quote = "0.6.1"
rocket_http = { version = "0.4.0-dev", path = "../http/" } rocket_http = { version = "0.4.0-dev", path = "../http/" }
devise = "0.1"
[build-dependencies] [build-dependencies]
yansi = "0.4" yansi = "0.4"
version_check = "0.1.3" version_check = "0.1.3"
[dependencies.derive_utils]
git = "https://github.com/SergioBenitez/derive-utils"
rev = "62f361f"
[dev-dependencies] [dev-dependencies]
rocket = { version = "0.4.0-dev", path = "../lib" } rocket = { version = "0.4.0-dev", path = "../lib" }
compiletest_rs = { git = "https://github.com/laumann/compiletest-rs" } compiletest_rs = { git = "https://github.com/laumann/compiletest-rs" }

View File

@ -1,5 +1,5 @@
use proc_macro::{TokenStream, Span}; use proc_macro::{TokenStream, Span};
use derive_utils::{syn, Spanned, Result, FromMeta}; use devise::{syn, Spanned, Result, FromMeta};
use proc_macro2::TokenStream as TokenStream2; use proc_macro2::TokenStream as TokenStream2;
use http_codegen::Status; use http_codegen::Status;

View File

@ -1,6 +1,6 @@
use proc_macro::{TokenStream, Span}; use proc_macro::{TokenStream, Span};
use proc_macro2::TokenStream as TokenStream2; use proc_macro2::TokenStream as TokenStream2;
use derive_utils::{syn, Spanned, SpanWrapped, Result, FromMeta, ext::TypeExt}; use devise::{syn, Spanned, SpanWrapped, Result, FromMeta, ext::TypeExt};
use indexmap::IndexSet; use indexmap::IndexSet;
use proc_macro_ext::{Diagnostics, SpanExt}; use proc_macro_ext::{Diagnostics, SpanExt};

View File

@ -1,6 +1,6 @@
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};
use derive_utils::syn; use devise::syn;
use proc_macro::{Span, Diagnostic}; use proc_macro::{Span, Diagnostic};
use http::route::RouteSegment; use http::route::RouteSegment;

View File

@ -1,7 +1,7 @@
use proc_macro::TokenStream; use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2; use proc_macro2::TokenStream as TokenStream2;
use derive_utils::{syn, Spanned, Result}; use devise::{syn, Spanned, Result};
use self::syn::{Path, punctuated::Punctuated, parse::Parser, token::Comma}; use self::syn::{Path, punctuated::Punctuated, parse::Parser, token::Comma};
use syn_ext::{IdentExt, syn_to_diag}; use syn_ext::{IdentExt, syn_to_diag};
use {ROUTE_STRUCT_PREFIX, CATCH_STRUCT_PREFIX}; use {ROUTE_STRUCT_PREFIX, CATCH_STRUCT_PREFIX};

View File

@ -2,8 +2,8 @@ use std::fmt::Display;
use proc_macro::TokenStream; use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2; use proc_macro2::TokenStream as TokenStream2;
use derive_utils::{syn, Result}; use devise::{syn, Result};
use derive_utils::syn::{Expr, Ident, Type, spanned::Spanned}; use devise::syn::{Expr, Ident, Type, spanned::Spanned};
use http::{uri::Origin, ext::IntoOwned}; use http::{uri::Origin, ext::IntoOwned};
use http::route::{RouteSegment, Kind, Source}; use http::route::{RouteSegment, Kind, Source};

View File

@ -1,8 +1,8 @@
use proc_macro::Span; use proc_macro::Span;
use derive_utils::{syn, Spanned}; use devise::{syn, Spanned};
use derive_utils::proc_macro2::TokenStream as TokenStream2; use devise::proc_macro2::TokenStream as TokenStream2;
use derive_utils::ext::TypeExt; use devise::ext::TypeExt;
use quote::ToTokens; use quote::ToTokens;
use self::syn::{Expr, Ident, LitStr, Path, Token, Type}; use self::syn::{Expr, Ident, LitStr, Path, Token, Type};

View File

@ -1,5 +1,5 @@
use proc_macro::{Span, TokenStream}; use proc_macro::{Span, TokenStream};
use derive_utils::{*, ext::{TypeExt, Split3}}; use devise::{*, ext::{TypeExt, Split3}};
#[derive(FromMeta)] #[derive(FromMeta)]
crate struct Form { crate struct Form {

View File

@ -1,4 +1,4 @@
use derive_utils::*; use devise::*;
use proc_macro::TokenStream; use proc_macro::TokenStream;
#[derive(FromMeta)] #[derive(FromMeta)]

View File

@ -1,7 +1,7 @@
use quote::ToTokens; use quote::ToTokens;
use proc_macro::TokenStream; use proc_macro::TokenStream;
use derive_utils::{*, ext::TypeExt}; use devise::{*, ext::TypeExt};
use derive_utils::proc_macro2::TokenStream as TokenStream2; use devise::proc_macro2::TokenStream as TokenStream2;
use http_codegen::{ContentType, Status}; use http_codegen::{ContentType, Status};

View File

@ -1,5 +1,5 @@
use proc_macro::{Span, TokenStream}; use proc_macro::{Span, TokenStream};
use derive_utils::*; use devise::*;
use derive::from_form::Form; use derive::from_form::Form;

View File

@ -1,6 +1,6 @@
use quote::ToTokens; use quote::ToTokens;
use proc_macro2::TokenStream as TokenStream2; use proc_macro2::TokenStream as TokenStream2;
use derive_utils::{FromMeta, MetaItem, Result, ext::Split2}; use devise::{FromMeta, MetaItem, Result, ext::Split2};
use http::{self, ext::IntoOwned}; use http::{self, ext::IntoOwned};
use attribute::segments::{parse_segments, parse_segment, Segment, Kind, Source}; use attribute::segments::{parse_segments, parse_segment, Segment, Kind, Source};

View File

@ -48,7 +48,7 @@
//! ``` //! ```
#[macro_use] extern crate quote; #[macro_use] extern crate quote;
#[macro_use] extern crate derive_utils; #[macro_use] extern crate devise;
extern crate proc_macro; extern crate proc_macro;
extern crate rocket_http as http; extern crate rocket_http as http;
extern crate indexmap; extern crate indexmap;
@ -64,7 +64,7 @@ mod syn_ext;
use http::Method; use http::Method;
use proc_macro::TokenStream; use proc_macro::TokenStream;
crate use derive_utils::proc_macro2; crate use devise::proc_macro2;
crate static ROUTE_STRUCT_PREFIX: &str = "static_rocket_route_info_for_"; crate static ROUTE_STRUCT_PREFIX: &str = "static_rocket_route_info_for_";
crate static CATCH_STRUCT_PREFIX: &str = "static_rocket_catch_info_for_"; crate static CATCH_STRUCT_PREFIX: &str = "static_rocket_catch_info_for_";

View File

@ -1,6 +1,6 @@
//! Extensions to `syn` types. //! Extensions to `syn` types.
use derive_utils::syn; use devise::syn;
use proc_macro::Diagnostic; use proc_macro::Diagnostic;
pub fn syn_to_diag(error: syn::parse::Error) -> Diagnostic { pub fn syn_to_diag(error: syn::parse::Error) -> Diagnostic {