tarpc
tarpc copied to clipboard
Unnecessary recompilation in workspace
I have a client and server and common crate in a workspace, if I build the client, then the server, then the client again, it recompiles all the deps unnecessarily. The verbose output says all the deps are Fresh, but they shouldn't be. I think it's an issue with the tarpc code generation causing everything to be marked modified.
My common crate only contains:
#![feature(plugin)]
#![plugin(tarpc_plugins)]
#[macro_use] extern crate tarpc;
service! {
rpc register(hardware_id: String, version: u32) -> bool;
}
And only depends on tarpc = "0.8.0" and tarpc-plugins = "0.1.1".
The client and server crates use this crate. So the code for this should be generated to the same location when server or client builds the common crate, right?
Btw, when I do it this way, I only receive empty strings for hardware_id on the server side, why? (version arrives correctly.)
Empty strings regardless of input certainly sounds like a bad bug! Do you have an example that reproduces that behavior? I'll try to get to it this week.
Ah, I found out that the string was malformed, it contained a '\r', so the println output looked wrong..
So now that works.
And I found out that the unnecessary recompilation (for both client and server) only happens when the server also depends on another crate in the workspace (that provides the db controllers). Neither the client nor the common crate depend on the db controller crate. This is weird..
@Boscop did you ever root cause this?