Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

File creation errors when the .capnp file is not in the current directory. #8

Closed
bfops opened this issue Mar 11, 2015 · 2 comments
Closed

Comments

@bfops
Copy link

bfops commented Mar 11, 2015

In the example, the .capnp file is in the same directoy as build.rs and Cargo.toml. Moving it to src/addressbook.capnp causes "error writing file" errors. It looks like this line gets a string like src/addressbook.capnp instead of addressbook.capnp. This might be an issue with capnproto-rust.

@dwrensha
Copy link
Member

Did you update build.rs when you tried this? It works for me if I change it to this:

#![feature(path)]

extern crate capnpc;

fn main() {
    ::capnpc::compile(&::std::path::Path::new("src"),
                      &[::std::path::Path::new("src/addressbook.capnp")]).unwrap();
}

@bfops
Copy link
Author

bfops commented Mar 12, 2015

Oh yeah that's my mistake, I still had Path::new(".") for the first path; for some reason, I thought it had to do with the output directory and not the source directory.

@bfops bfops closed this as completed Mar 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants