- Notifications
You must be signed in to change notification settings - Fork 64
Description
Environment
OS and Version: MacOS 12.6 (21G115)
VS Code Version: 1.72.2 (Universal)
Issue
The Ada extension can't build the project because it's unaware of Alire's environment variables. To get around this issue, I overrode the extension's default task to call Alire instead (see Configuration below).
So far, the project builds, but unlike extensions default build task, whenever there's a build error, clicking on any of the errors results in VSCode claiming it can't find the file with an option to create it. I also overrode the extension's ProblemMatcher inside my build task to use a relative location as displayed in the error message, but it still cannot find them. Oddly enough, option clicking from in the terminal window works flawlessly. What could be the problem? This is a major issue for developers working with Alire and VS Code.
Configuration
{ "version": "2.0.0", "tasks": [ { "label": "alire: Build project", "command": "alr", "args": ["build"], "problemMatcher": { "base": "$ada", "fileLocation": ["autoDetect", "${workspaceRoot}"] }, "group": { "kind": "build", "isDefault": true } } ] }
Here's my workspace file (located inside .vscode folder in root of project):
{ "folders": [ { "path": "../" } ], "settings": { "ada.projectFile": "main.gpr", // Set a workspace-specific environment for Linux/OSX platforms "terminal.integrated.env.linux": { // Set MAIN_NUMBER scenario variable to MAIN_2 directly from the environment "MAIN_NUMBER": "MAIN_2", // Optionally, you can append the Ada toolchain of your choice to the PATH environment variable // if you want to use a different toolchain. // "PATH": "<PATH_TO_TOOLCHAIN>:${env:PATH}", // Append the path to the directory containing print_utils.gpr project file dependency to // the GPR_PROJECT_PATH environment variable "GPR_PROJECT_PATH": "./imported:${env:GPR_PROJECT_PATH}" } } }
Originally posted by @Joebeazelman in microsoft/vscode-cpptools#10021