google / google/tarpc

Unnecessary recompilation in workspace

Open
#158 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
3.7k
Forks
230
PR merge metrics
No merged PRs in 30d

Description

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:
```rust
#![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.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.