Open stevefan1999-personal opened 1 year ago
Can I ask why absolute paths are not allowed?
Can I ask why absolute paths are not allowed?
IIRC it breaks incremental builds, for example, if you have a bunch of C headers in absolute path, and you decided to update the headers, then incremental build won't take that as a change (otherwise they will have to do an exhaustive search for all possible files referenced). You can only rebuild everything from scratch which is not economical given that Rust is still having a slow compile time.
Interesting. Thanks for the explanation, @stevefan1999-personal.
This means we can include files from
OUT_DIR
which is useful for dynamic file generation (I need to merge several folders into one place). Using relative path is simply not enough here.Possibly related: Tracking Issue for proc_macro::{tracked_env, tracked_path} · Issue #99515 · rust-lang/rust (github.com)
Related: Fix compression with interpolated env · Issue #215 · pyrossh/rust-embed (github.com)