Yes, that’s what I was saying earlier. My point is that writing those incremental compilation hooks is the hard part, and is compiler work that has to happen before we can even talk about build systems. (And adding that support to Cargo/rustbuild is easy.)
-
-
Replying to @pcwalton @BRIAN_____ and
My suggestion is to use a dwarf parser to generate the hash without touching the compiler. That might require making the build system, not cargo, drive rustc though.
1 reply 0 retweets 0 likes -
Yeah, that’s what I was trying to say earlier, but didn’t make it clear.
1 reply 0 retweets 0 likes -
DWARF doesn't contain type-level dependency edges (especially once you throw specialization in the mix) Rust's dwarf generation is good, but i wouldn't trust it for incremental compilation
1 reply 0 retweets 0 likes -
Replying to @ManishEarth @shaver and
Right it's not anything like a complete solution but it should fix the doc comment issue (I would hope).
1 reply 0 retweets 0 likes -
not really, because you can't rely on DWARF to know that no code changed. you can query the compiler, of course, but this circles back to patrick's point
1 reply 0 retweets 0 likes -
Replying to @ManishEarth @shaver and
I'm confused. If you strip all the debug info, etc, and hash that, you can see if nothing changed in the actual code, right?
2 replies 0 retweets 0 likes -
Replying to @samth @ManishEarth and
Yes (I think), but we could also just fix it at the incremental compilation level, which would be faster because we wouldn’t have to hash so much.
1 reply 0 retweets 0 likes -
We have a sophisticated framework for dependency tracking already. It’s more sophisticated than almost anything out there, including Bazel’s file-level tracking. It even knows to only run *some* of the passes of the compiler when it can. Let’s use it.
0 replies 0 retweets 3 likes
Well, I’m not on the Cargo subteam. Personally I think we should do something to make build scripts smarter, because sometimes (not commonly IME) it becomes a pain. I don’t know what the right solution is.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.