Skip to content

non-legacy communication mode changed the working directory for invoking cmake #2569

@leifwalsh

Description

@leifwalsh

Brief Issue Summary

The recently introduced new communication modes have broken a workflow for us that used to work with the legacy mode.

We have a direnv-like development environment configuration tool that provides commands you can put on your PATH which will select the appropriate version of the tool to run depending on the current working directory in which they're invoked. For example, when working within a specific repository, I might have repository-local config that makes the cmake command run a specific version of cmake from a specific path that repository is known to work with. Similarly, I might have configuration to make cc resolve to a specific version of gcc or clang.

These repositories used to work with cmake-tools in VS Code because the driver would execute the cmake command inside the repository directory (in a multi-folder workspace, within the folder I'm trying to build):

. It seems that the newer communication modes don't run the tools in any particular directory (
const res = await this.executeCommand(cmake, args, outputConsumer, { environment: env }).result;
), so our configuration tool cannot determine the context in which they're operating.

Would it be possible to make the newer drivers run these tools inside the folders they're trying to build please? Alternatively, if you could provide a setting that lets us control the working directory in which commands are run, we could use that too.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions