Description
openedon Apr 24, 2023
Describe the problem
Under the following conditions:
- A custom build path is set via the
--build-path
flag. - The build path is on a different drive from the sketch.
compilation fails:
Error during build: Cannot find build path: Rel: can't make C:\Users\per\AppData\Local\Temp\build-path relative to E:\FooSketch
To reproduce
$ arduino-cli version
arduino-cli.exe Version: git-snapshot Commit: 2c2a5cc6 Date: 2023-04-24T05:04:04Z
$ arduino-cli sketch new "e:/FooSketch"
Sketch created in: e:\FooSketch
$ arduino-cli compile --build-path "c:/Users/per/AppData/Local/Temp/build-path" --fqbn arduino:avr:uno "e:/FooSketch"
Error during build: Cannot find build path: Rel: can't make c:\Users\per\AppData\Local\Temp\build-path relative to E:\FooSketch
Expected behavior
Compilation is possible when custom build path is on a different drive from sketch.
Arduino CLI version
Operating system
Windows
Operating system version
11
Additional context
I bisected the regression to 78bfa74
I was not able to reproduce the fault on Linux or macOS
The fault does not occur when --build-path
is not used in the command even when that command uses a default build path on a different drive from the sketch.
The fault also occurs when using the gRPC interface.
Although the use of --build-path
in command line commands is probably not so common, custom build paths are used for the compile operations ran by Arduino IDE 2.x to generate the compilation database for Arduino Language Server, which makes the regression more impactful.
Originally reported at: https://forum.arduino.cc/t/data-item-properties-in-ide-2-1/1118282
Additional reports
- https://forum.arduino.cc/t/data-item-properties-in-ide-2-1/1118282/9
- https://forum.pjrc.com/threads/72643-Issues-with-Arduino-IDE-2-1-and-Teensy-4-1#post_324742
- https://forum.arduino.cc/t/code-hints-missing/1119231
- https://forum.arduino.cc/t/upgrading-2-0-3-to-2-1-0-function-f12-and-alt-f12-not-present-on-menu/1118731
- https://forum.arduino.cc/t/f12-qui-ne-fonctionne-pas/1119169/1
- https://forum.arduino.cc/t/f12-qui-ne-fonctionne-pas/1119169/6
- https://forum.arduino.cc/t/code-hints-missing/1119231/4
- Language server features not available when sketch on different drive from temp folder arduino-ide#2034
- https://forum.arduino.cc/t/auto-completion-not-working-on-arduino-2-1/1120524
- https://forum.arduino.cc/t/hover-tips-context-help-depend-on-sketch-location/1124524
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details
Activity