Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config UI shows incorrect error message that compilerPath is not found, despite picked up correctly from PATH #11903

Closed
geissdoerfer opened this issue Jan 28, 2024 · 2 comments
Assignees
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
Milestone

Comments

@geissdoerfer
Copy link

geissdoerfer commented Jan 28, 2024

Environment

  • OS and Version: Arch Linux x64 6.6.10-1-lts
  • VS Code Version: 1.85.2
  • C/C++ Extension Version: v1.18.5

Bug Summary and Steps to Reproduce

Bug Summary:

I have a project opened in vscode in the directory /home/myuser/myworkspace. arm-none-eabi-gcc is on my PATH:

myuser@mymachine ~> arm-none-eabi-gcc --version
arm-none-eabi-gcc (Arch Repository) 13.2.0

When specifying "compilerPath": "arm-none-eabi-gcc" in c_cpp_properties.json, the following problem is reported: Cannot find "/home/myuser/myworkspace/arm-none-eabi-gcc".

Expected behavior:

Since compilerPath is specified as a relative path, I would expect that it is found on my PATH. This seems to be the intended behavior implemented with 5ca9f34.

Configuration and Logs

`c_cpp_properties.json`:


{
    "configurations": [
        {
            "name": "${config:operSys}",
            "includePath": [
                "${config:rioteeSdkRoot}/core/include",
            ],
            "defines": [
                "mcpu=cortex-m4",
            ],
            "compilerPath": "arm-none-eabi-gcc",
            "intelliSenseMode": "gcc-arm",
            "cStandard": "c17",
            "cppStandard": "c++14"
        }
    ],
    "version": 4
}
``

Other Extensions

No response

Additional context

No response

@Colengms
Copy link
Collaborator

Hi @geissdoerfer . I believe the error message you are seeing is incorrect and a bug in our path validation in the Config UI. However, using a relative path should actually function correctly.

Using a simple example, using g++ and clang-16, which are installed on my Linux system and accessibly via the PATH, it successfully locates g++ and clang-16, without any path specified, and configures the file correctly.

We can use this issue to track correcting the invalid error message in the Config UI.

@Colengms Colengms changed the title compilerPath is searched in current directory instead of PATH environment variable Config UI shows incorrect error message that compilerPath is not found, despite picked up correctly from PATH Jan 29, 2024
@Colengms Colengms added bug Language Service Feature: Configuration An issue related to configuring the extension or IntelliSense labels Jan 29, 2024
@Colengms Colengms added this to the On Deck milestone Jan 29, 2024
@browntarik browntarik self-assigned this Jan 31, 2024
@browntarik browntarik added this to Triage in 1.19 via automation Feb 1, 2024
@browntarik browntarik moved this from Triage to Pull Request in 1.19 Feb 1, 2024
@browntarik browntarik added the fixed Check the Milestone for the release in which the fix is or will be available. label Feb 5, 2024
@browntarik browntarik moved this from Pull Request to Done in 1.19 Feb 6, 2024
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.19.3 Feb 13, 2024
@sean-mcmanus
Copy link
Collaborator

@geissdoerfer Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.19.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
No open projects
1.19
Done
Development

No branches or pull requests

4 participants