Skip to content

An action cannot set its environment or working directory #708

Description

@speak-agent

Observed

mcpp::action carries an argument vector and nothing else. An action cannot set an environment variable or choose its working directory.

mcpp-plugins 0.13–0.14 built a helper program (mcpp-deps) only to supply these two things to vcpkg and to cmake -E tar. The helper then reached consumers' manifests as tools = ["mcpp-deps"]. Because it is a host tool, it also paid for #705 and #707: GalTranslPP's emit build-database took 53 minutes, because emit built this tool in full.

0.15.0 (mcpp-community/mcpp-plugins#32) removes the helper. vcpkg happens to accept every setting as a flag (--vcpkg-root, --disable-metrics, --x-buildtrees-root, ...), and CMake work runs as cmake -P over a script the build program writes. Neither route is available to a tool that reads only its environment or its working directory.

Request

Let an action state env entries and a cwd, recorded in the action's fingerprint like its arguments, so a plugin can run such a tool directly without a helper program.

Activity

  1. added 2 commits that reference this issue on Sep 27, 2026
  2. speak-agent commented on Sep 27, 2026

    @speak-agent
    MemberAuthor

    Fixed in mcpp 2026.9.27.1 (#719, merged as b439fd9), released on GitHub and mirrored to GitCode (xlings-res/mcpp), and published in the xim index (openxlings/xim-pkgindex#894).

    Verified after the release with the published binary inside an xlings subos sandbox (xlings subos use eco-0927 --sandbox --cmd ...), mcpp configured for the CN mirror in a fresh MCPP_HOME:

    • e2e 799_an_action_runs_with_its_env_and_cwd: the command sees the variable, runs in the package-relative cwd, its declared output lands where declared, and a changed value re-runs the action. PASS on Linux here; on Windows the PR's CI caught and fixed cwd being entered in the \\?\ form, and the Windows e2e jobs pass.
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