Skip to content

Workspace use means libtock-core has more dependencies than necessary. #196

@jrvanwhy

Description

@jrvanwhy

I stumbled upon this issue while trying to update tock-on-titan to the current libtock-rs master commit.

Because test_runner and libtock-core are in the same workspace, cargo searches for test_runner's dependencies when it tries to build libtock-core. This makes async-std a build dependency of libtock-core.

I don't think this was either expected or intended behavior when PR #164 created libtock-core.

This is blocking the tock-on-titan update because tock-on-titan's build system (intentionally) makes it difficult to pull in large dependencies such as async-std. I can think of a few ways forward:

  1. Remove the workspace entirely, making each crate stand on its own.
  2. Change the directory layout so that libtock-core stays outside the "main" workspace. We could potentially have multiple workspaces, such as one for minimal-dependency code (e.g. libtock-core) and another for high-dependency code (libtock-rs and test_runner).
  3. Leave the workspace in place and let out-of-tree boards deal with it. This is possible for tock-on-titan (our build system could copy libtock-core to a separate directory, removing it from the workspace) but is not possible for cargo-based projects.

I would prefer option 1 or 2, but I'd like to hear what others think before I put too much effort into this change.

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