Skip to content

2026.9.27.1: a member reached as a path dependency of the workspace root's package cannot use workspace = true #725

Description

@Sunrisepeak

Since 2026.9.27.1 (#714), a workspace member reached as a path dependency of the workspace root's own package can no longer use workspace = true: the build fails with "no workspace declares" the dependency, although the root's [workspace.dependencies] declares it and [workspace].members lists the member. 2026.9.26.1 builds the same tree.

Reproduction

root/
  mcpp.toml
  src/main.cpp          import a; int main() { return a_value() - 1; }
  a/mcpp.toml
  a/src/a.cppm          export module a; export int a_value() { return 1; }

root/mcpp.toml:

[workspace]
members = ["a"]

[workspace.dependencies]
cmdline = "0.0.2"

[package]
name    = "root"
version = "0.1.0"

[dependencies]
a = { path = "a" }

root/a/mcpp.toml:

[package]
name    = "a"
version = "0.1.0"

[targets.a]
kind = "lib"

[dependencies]
cmdline.workspace = true

[lib]
path = "src/a.cppm"

mcpp build in root/:

  • 2026.9.26.1: Compiling a (path) … Finished.
  • 2026.9.27.1:
error: dependency 'a': <root>/a/mcpp.toml: [dependencies] cmdline = { workspace = true }, but no workspace declares 'cmdline'.
       `workspace = true` is resolved against the [workspace.dependencies] of the workspace whose `members` list this package.
       fix: list this package in that workspace's [workspace] members, or state the dependency's version, path or git source here.

a is listed in that workspace's members, so the fix the message suggests is already in place. Building inside root/a/ works with 2026.9.27.1; mcpp build -p a at the root answers workspace member 'a' not found in [workspace].members.

Impact

Sunrisepeak/mcpp-language-server is laid out this way (root package = the server, modules/base and modules/platform are members it depends on by path, each using openkal-llvm-runtime.workspace = true), and does not build with 2026.9.27.1. Its CI pins 2026.9.26.1, so this shows up first in its nightly run against the latest mcpp.

Related: #713, #714.

Activity

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