vmware / differential-datalog

DDlog is a programming language for incremental computation. It is well suited for writing programs that continuously update their output in response to input changes. A DDlog programmer does not write incremental algorithms; instead they specify the desired input-output mapping in a declarative manner.
MIT License
1.38k stars 119 forks source link

Show progress in Rust compilation #839

Open roymanish opened 4 years ago

roymanish commented 4 years ago

Rust compilation in DDlog is a time taking process. Can we show compilation progress by calculating the percentage of rust crates done against total number of crates?

mihaibudiu commented 4 years ago

If the Rust build system can provide this information we can use it. Otherwise it looks like a complicated project, which would require us to parse the Rust build files and reconstruct the work that needs to be done. Even if we can do this, the question is how would you like this reported. I assume writing on stderr is not enough.

roymanish commented 4 years ago

Reporting may not be needed. Not looking for live progress. I can query ddlog for current compilation state and it can give me the calculated value if possible.

Do you mean that we don't have any control over how many crates will be compiled as part of rust compilation in DDLog?

ryzhyk commented 4 years ago

An upcoming release of ddlog will break large projects up into many packages. As rust is building the packages it reports progress on stdout along the lines of 116 of 156. We could try to capture and parse that stream. A less hacky option is to add a build.rs file to each generated crate. This file contains a function invoked right before building the crate. We could generate this function to generate some kind of progress message accessible to java. But again, this will only make sense in the next version of ddlog.

roymanish commented 3 years ago

Sure. I think we can wait for next release.