Skip to content

Include flags with relative directories always resolve relative to workspace #52

@benmcmorran

Description

@benmcmorran

Problem

If a SourceFileConfiguration includes a entry in compilerFragments like /I..\foo, cpptools will attempt to resolve that include directory relative to the VS Code workspace root and silently discard the flag if the directory does not exist. However, it's possible that the compiler process was invoked with a different working directory than the workspace root, and the relative include directory would have resolved successfully relative to the compiler's working directory.

Suggested fix

Add a new readonly directory?: string; property to SourceFileConfiguration that specifies the working directory of the compiler process. Relative paths in compilerFragments should resolve relative to directory, if it is defined.

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