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

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