-
Notifications
You must be signed in to change notification settings - Fork 236
Error: unable to locate compile_commands.json
#1630
Comments
Also seeing this. If the "empty" compile_commands.json file is deleted the build succeeds. I have relied on the .build folder (located as a sibling to the .vscode folder in the project) to speed builds. If you are working with a large number of sketch folders it is difficult to have unique locations for the build output outside of the project folder. Possibly allowing a ${} variable inside the arduino.json output parameter would be an alternative. Like example below...
|
I'm seeing this as well, and concur with @GregTerrell that deleting the (almost) empty compile_command.json file makes the build succeed (but then you get a full rebuild and you've lost all the advantage of having "output" in arduino.json). FWIW, my "output" folder is currently "./.output". |
I found this discussion since I was seeing exactly the same issue. My setting in 'arduino.json' was "output": ".//.build" After it was changed to "output": "./build" everything started working every single time. Not sure what the root cause of the problem was though. Perhaps the directory name starting with a dot. I am on Win10, fwiw. |
Concur with @37electrons. The behavior seems tied to the . prefix on the build directory if it is in the project directory. If the .build is in the parent directory, seems to work ok. I have been using .build to follow the .vscode convention and simplify my gitignore rules. |
The error persists if the output directory in a subfolder, even if it does not start with a dot, if the name of the folder contains the word These all result in the error "output": "out"
"output": "output"
"output": "outzz"
"output": "zzout"
"output": ".output"
"output": ".//.output"
"output": ".build"
"output": ".//.build" These do not
|
Description
If you set the
output
path to something inside the project folder I get errors when trying to verify the sketch.The error looks like
c:\temp\
) you will not get this error (ever as far as I've seen)compile_command.json
file will be empty except for a[]
Steps to replicate
Make a new project. Board=
Uno
, programmer =AVR ISP
sketch file
arduino.json
in
arduino.json
set the output folder to something relative (.e.g.out
). Compile once (will complete ok. If you try it again, you will get the error (~80% of the time). If you get the output folder somewhere else you do not get the error.The text was updated successfully, but these errors were encountered: