Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow absolute path again #18

Open
stevefan1999-personal opened this issue Aug 13, 2023 · 3 comments
Open

Allow absolute path again #18

stevefan1999-personal opened this issue Aug 13, 2023 · 3 comments

Comments

@stevefan1999-personal
Copy link

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)

@smoelius
Copy link

Can I ask why absolute paths are not allowed?

@stevefan1999-personal
Copy link
Author

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.

@smoelius
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants