-
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
Large compile times with repetitive trait bound #68796
Comments
I'm not sure if that's really something that could be minimized to mcve. I've run My blind guess is that there is no single bound that takes time, but that there are just that many bounds that rustc struggles with them. |
A MCVE in this case could still be a very large file, but would ideally not have any dependencies beyond libcore. See https://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ for some techniques on that. |
I've run rustc with the self profiler enabled on an incremental build:
I do not see how it would be possible to practical reduce this to something that only depends on core, without investing weeks of work. Diesel, wundergraph and juniper a quite big complicated codebases that have a lot of dependencies on their own. Additionally this example uses a lot of functionality from all of this crates, so there is no simple way to discard larger junks of code. I concatenating all of those crates into one file will not help, right? |
I am using wundergraph that generate lot of macro code and it seems rustc have hard time resolving code here and here
I tried this code:
https://github.com/Farkal/test-wundergraph
I expected to see this happen:
Less than 40sc of compilation on each change
Instead, this happened:
40sc or more of compilation
Meta
rustc --version --verbose
:rustc 1.41.0 (5e1a799 2020-01-27)
binary: rustc
commit-hash: 5e1a799
commit-date: 2020-01-27
host: x86_64-unknown-linux-gnu
release: 1.41.0
LLVM version: 9.0
The text was updated successfully, but these errors were encountered: