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

compile command fails when sketch on different drive from custom build path #2156

Closed
3 tasks done
per1234 opened this issue Apr 24, 2023 · 1 comment · Fixed by #2163
Closed
3 tasks done

compile command fails when sketch on different drive from custom build path #2156

per1234 opened this issue Apr 24, 2023 · 1 comment · Fixed by #2163
Assignees
Labels
conclusion: resolved Issue was resolved os: windows Specific to Windows operating system topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented 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

2c2a5cc

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

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
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project os: windows Specific to Windows operating system labels Apr 24, 2023
@cmaglie cmaglie self-assigned this Apr 28, 2023
cmaglie added a commit to cmaglie/arduino-cli that referenced this issue Apr 28, 2023
cmaglie added a commit to cmaglie/arduino-cli that referenced this issue Apr 28, 2023
cmaglie added a commit that referenced this issue May 2, 2023
@cmaglie cmaglie added this to the Arduino CLI 0.33.0 milestone May 2, 2023
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jun 5, 2023
@jgardona
Copy link

It happens yet. Autocomplete die at random usage. For me, on linux is happening this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved os: windows Specific to Windows operating system topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants