Skip to content

rustpkg endlessly compiles dependencies #7879

Closed

Description

@jedestep

My project contains two subdirectories of src, liba and libb. Both of them contain lib.rs. libb depends on liba. Inside the libb folder is a folder called test which contains test.rs and depends on the contents of libb. When building with rustpkg, libb is compiled ad infinitum as it tries to resolve its dependency.

Activity

  1. huonw commented on Jul 18, 2013

    @huonw
    Contributor
  2. catamorphism commented on Sep 12, 2013

    @catamorphism
    Contributor

    Reproduced with HEAD. Note that this happens even with just a self-contained libb, as long as the test subdirectory with the test.rs file depending on libb is there.

  3. catamorphism commented on Sep 12, 2013

    @catamorphism
    Contributor

    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.

  4. catamorphism commented on Sep 13, 2013

    @catamorphism
    Contributor

    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.)

  5. added a commit that references this issue on Sep 18, 2013
  6. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions