include-flate icon indicating copy to clipboard operation
include-flate copied to clipboard

Allow absolute path again

Open stevefan1999-personal opened this issue 2 years ago • 3 comments

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)

stevefan1999-personal avatar Aug 13 '23 05:08 stevefan1999-personal

Can I ask why absolute paths are not allowed?

smoelius avatar May 25 '24 09:05 smoelius

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.

stevefan1999-personal avatar May 25 '24 09:05 stevefan1999-personal

Interesting. Thanks for the explanation, @stevefan1999-personal.

smoelius avatar May 25 '24 15:05 smoelius