Skip to content

A workspace root's xlings declaration is not visible to its members' build programs, so each member repeats it #713

Description

@speak-agent

Observed

A workspace root that declares an xlings payload does not make that payload visible to its members' build programs. A member that uses the payload through mcpp::xpkg_dir (for instance, rules-qt locating the Qt SDK) has to declare the payload itself, so the same version is written once per member.

Reproduction (mcpp 2026.9.26.2, Linux): a workspace with members app and tool, each of whose build programs calls mcpp::rules::qt::compile(), and a root manifest that declares:

[target.'cfg(any(windows, linux, macos))'.xlings.workspace]   # also tried: [target.linux.xlings.workspace], [xlings.workspace]
"xim:qt-base" = "6.11.1"

mcpp build -p tool reports that the member sees no payload:

warning: tool: mcpp.rules.qt: no Qt SDK. Nothing Qt-specific is planned. …
fatal error: QtCore/QtGlobal: No such file or directory

The payload is installed. When each member declares the same entry itself, the build passes.

docs/23-the-project-environment.md says that "in a workspace build the workspace root owns the selection". docs/07-workspace.md says that a root [target.<triple>] block "is already inherited by every member". Both statements describe the opposite of what is observed.

GalTranslPP writes "xim:qt-base" and "xim:7zip" in four member manifests for this reason.

Request

One of the following:

  • a root declaration is visible, through xpkg_dir, to the build programs of the members;
  • xlings entries support the explicit opt-in that [workspace.dependencies] already has for mcpp dependencies, so that a member writes "xim:qt-base".workspace = true and names the version in one place.

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