-
-
Notifications
You must be signed in to change notification settings - Fork 7k
build.path with relative path specified creates new sub sub sub "$(build.path)/sketch/" directories on every run #5077
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
Comments
I believe the problem is not so much a relative path, but having a build path inside the source directory. Also, this is a duplicate of arduino/arduino-builder#89 which is already fixed in git master (and should be fixed in the next IDE release). |
Hm, wait, if you change it to an absolute path, it does work. Seems I read to quickly, this might be another issue after all. I'm curious as to this is fixed with fixing the issue linked above. @cmaglie, I think the commit to fix that arduino-builder issue is not yet present in an arduino-builder release, and thus also not in the Arduino IDE nightly build. Perhaps you could make an arduino-builder release so @plocher can check if this issue is fixed? |
I can confirm that the same thing is happening on Windows 10 when using the "arduino_debug.exe" from the command line on Windows. It happens even with full path, from my own debugging, the issue is related to the folder content, e.g., if the build.path folder is empty, then it uses the folder as output for the binaries and etc, else it creates a new folder inside the folder "sketch" with the same name as the build.path folder, repeating these conditionals recursively. My Arduino version is 1.8.3 Cheers |
@legionaryu it's not really helpful for you to do testing with outdated versions of the Arduino IDE. Currently, all testing should be done using the beta build: https://www.arduino.cc/en/Main/Software#beta. |
@per1234 I've just tested using the version 'arduino-PR-beta1.9-BUILD-22' and the problem still happens. You can see, in the image below, that 'arduino_debug.exe' keeps creating new 'build' folders recursively: |
I was trying to find the issue in the source and I found the method saveHex, my 'spider sense' tells me that the issue has something to do with the following conditional:
The line that creates new folders probably is this one -> |
MacOS IDE environment
$(ARDUINO) --pref build.path=./obj --board $(BUILD) --verify CP_Sargent.ino
After 4x invocations, the ./obj directory contains 4x nested instances of "obj/sketch". Each invocation adds yet another subdirectory structure...
Changing the CLI to use an absolute path is a workarround for this issue:
$(ARDUINO) --pref build.path=$(PWD)/obj --board $(BUILD) --verify CP_Sargent.ino
The text was updated successfully, but these errors were encountered: