-
Notifications
You must be signed in to change notification settings - Fork 533
Open
Description
rules_rust sets one -Ldependency statement per transitive dependency, leading to potentially a very long library search path.
The issue is, on Windows, in rustc the search paths get added to the PATH environment variable, but on Windows environment variables have a limit of 32,767 characters.
The probability of that bug happening in rules_rust is quite high.
Could we try to workaround it until it is fixed at rustc's side?
Steps to reproduce
- Create a
rust_librarysomecrate, it does not need to have sources - Craete a
rust_binarysomebinary, with the following sources:
// main.rs
use somecrate::*;
pub fn main() {}- Add
somecratetodepsofsomebinary, alongside many other (unused) dependencies - Try to build
somebinary
It should lead to:
error[E0463]: can't find crate for `somecrate`
--> main.rs:1:5
|
1 | use somecrate::*;
| ^^^^ can't find crate
Metadata
Metadata
Assignees
Labels
No labels