I was finding the context help was not working on any of my sketches, but worked just fine if I loaded up a built-in example file.
It seems this is because the My Documents folder where my sketchbook is saved is on my E: drive. I've tested by copying it to the root of the C drive & it works again.
Here's the screen shots of the same sketch loaded from each location.
Sketch file saved on E: drive:
Sketch file saved on C: drive:
I can work around this, but thought it may help others to identify the cause.
Thanks,
Aidan
Hi @aidangardham . The formal bug report for this problem is here:
opened 05:19AM - 24 Apr 23 UTC
closed 09:40AM - 02 May 23 UTC
os: windows
topic: code
type: imperfection
### 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:
```text
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
```text
$ 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
2c2a5cc6
### Operating system
Windows
### Operating system version
11
### Additional context
I bisected the regression to 78bfa744dc0fbdd04d385e56545027e824a3102f
---
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
- https://github.com/arduino/arduino-ide/issues/2034
- https://forum.arduino.cc/t/auto-completion-not-working-on-arduino-2-1/1120524
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-cli/issues?q=)
- [X] I verified the problem still occurs when using the [nightly build](https://arduino.github.io/arduino-cli/dev/installation/#nightly-builds)
- [X] My report contains all necessary details
The developers already fixed the bug in the Arduino CLI tool used by Arduino IDE to provide these "context aware" features, but it will take some time still until that fix propagates up to a build of Arduino IDE. For now, you can use the workaround you discovered of storing the files on the C:\
drive.
Hi, thanks for confirming & linking the bug report.
My searches were failing to turn up any knowledge of this on the forum, so I thought it was worth a post.
I'm fine to work around & will check back for a new build later.
1 Like
system
Closed
November 4, 2023, 3:20pm
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.