-
Notifications
You must be signed in to change notification settings - Fork 6
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
generate all files during build #40
base: main
Are you sure you want to change the base?
Conversation
CAPNP_TOOL_PATH overrides capnp tool location at build time
1d89b35
to
97ec679
Compare
6d473fe
to
11d1d77
Compare
let output = Command::new(&command) | ||
.arg("--version") | ||
.output() | ||
.expect("capnp tool can't be executed, change PATH or CAPNP_TOOL_PATH"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what happens if I decide to make some sort of tool or plugin separate from cargo's build.rs to generate code? This library would require that it can see the capnp tool before we actually decided we need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's the big deal? You will probably have capnc available anyway. I think it is just a minor incovenience comparing to having robust error messaging. I can throw it away if you wish, but I think it will be a much better user experience if we have it, since I assume most people will depend on recapnc through the dev dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also do it only if CAPNP_TOOL_PATH is set?
This removes all generated files from the check-in.
Also makes "capnp" dependency explicitly checked.