-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustpkg endlessly compiles dependencies #7879
Comments
Reproduced with HEAD. Note that this happens even with just a self-contained |
I think the Right Thing is for rustpkg to topologically sort crates in the given package by dependency order. This will be a bit of work, since as it is, we don't have a graph library. |
Having slept on this, I think the situation isn't really so bad. The problem is that I'm considering a given package to be a single unit. Thus, the containing package here doesn't show up in workcache as "already built". If I cached each crate as a single entity with inputs and outputs, I think this example would work without having to build a dependency graph. (Building a dependency graph would be more declarative, and workcache is supposed to work imperatively, which occurred to me later.) |
r? @brson Treating a package as the thing that can have other packages depend on it, and depends on other packages, was wrong if a package has more than one crate. Now, rustpkg knows about dependencies between crates in the same package. This solves the problem reported in #7879 where rustpkg wrongly discovered a circular dependency between thhe package and itself, and recursed infinitely. Closes #7879
My project contains two subdirectories of
src
,liba
andlibb
. Both of them containlib.rs
.libb
depends onliba
. Inside thelibb
folder is a folder calledtest
which containstest.rs
and depends on the contents oflibb
. When building with rustpkg,libb
is compiled ad infinitum as it tries to resolve its dependency.The text was updated successfully, but these errors were encountered: