-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Need a solution for loading out-of-tree module source #8778
Comments
Nominating for feature complete. |
My only idea for this so far was basically adding an option to rustc to specify src search dirs, similarly to how |
We could do something like the existing
This would basically transplant the current relative module path onto a different directory when searching for |
Or maybe just
So we don't have to 'transplant' the relative directory onto the build dir root. |
cc @jbclements @paulstansifer how do you feel about the macro-based solution above? Personally I'd rather just change the attribute sublanguage to allow |
generally speaking, I like the idea of using macros rather than extending the language... though it sounds like either one would require extending the language. If I was king of the world... oh, never mind. I think whichever one is simpler is probably the best choice :). |
Through cargo we ended up developing |
Fix `cast_lossless` to avoid warning on `usize` to `f64` conversion. Previously, the `cast_lossless` lint would issue a warning on code that converted a `usize` value to `f64`, on 32-bit targets. `usize` to `f64` is a lossless cast on 32-bit targets, however there is no corresponding `f64::from` that takes a `usize`, so `cast_lossless`'s suggested replacement does not compile. This PR disables the lint in the case of casting from `usize` or `isize`. Fixes rust-lang#3689. changelog: [`cast_lossless`] no longer gives wrong suggestion on usize,isize->f64
Servo has two instances now where crates need to refer to generated modules that are created as part of another build step. Servo also only supports out-of-tree builds. The Rust parser expects to find source files laid out as a tree. As a result we are generating this source directly in the source tree and ignoring them with .gitignore. This is unpleasant.
I don't have any great ideas about how to make this work.
The text was updated successfully, but these errors were encountered: