Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

using error_chain #6

Open
jamesray1 opened this issue May 16, 2018 · 0 comments
Open

using error_chain #6

jamesray1 opened this issue May 16, 2018 · 0 comments

Comments

@jamesray1
Copy link

jamesray1 commented May 16, 2018

I'm having issues with using error_chain for MML.

Cargo.toml

[package]
build = "build.rs"

[dependencies]
error-chain = "0.11.0"

[build-dependencies.mml]
version = "0.1"
error-chain = "0.11.0"

build.rs:

// UML Generator https://github.com/adjivas/ml

#![allow(unused_imports)]
#![allow(unused_variables)]
#![allow(dead_code)]

extern crate mml;

#[macro_use]
extern crate error_chain;

pub mod errors { error_chain!{} }

use errors::*;

fn make_uml_diagram() {
    // Generate diagram in /diagrams/ml.svg for README.md
    let dest: String = "../diagrams/".to_string();
    let _ = mml::src2both("src", dest.replace("-", "_").as_str());

    // Generate diagram in /target/doc/diamond_drops_node/ml.svg
    let dest: String = concat!("../target/doc/", env!("CARGO_PKG_NAME")).to_string();
    let _ = mml::src2both("src", dest.replace("-", "_").as_str());
}

fn main() {
    //make_uml_diagram();
}
$ cargo test
warning: unused manifest key: build-dependencies.mml.error-chain
   Compiling diamond-drops-node v0.1.0-a (file:///home/james/dod/node)
error[E0463]: can't find crate for `error_chain`
  --> build.rs:10:1
   |
10 | extern crate error_chain;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant