Skip to content

[WIN] Symlinks or junctions not followed in sketch directory #347

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

Closed
jpmeijers opened this issue Dec 14, 2019 · 3 comments
Closed

[WIN] Symlinks or junctions not followed in sketch directory #347

jpmeijers opened this issue Dec 14, 2019 · 3 comments
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

@jpmeijers
Copy link

I have a project consisting of a single folder containing most of my code, and a couple of sketch directories which mostly contain tests and production sketches.

Example layout:

Root folder
  + Arduino Libraries
    + OneWire (specific commit pulled in as git submodule)
  + src
    + custom library 1
    + OneWire (symlink to ../Arduino Libraries/OneWire)
  + TestSketchOne
    + TestSketchOne.ino
    + src (symlink to ../src)

Inside the sketch I will include the appropriate sources using:
#include "src/OneWire/OneWire.h"
#include "src/custom library 1/library.h"

This layout works perfectly under Ubuntu, but using Windows it does not. On Windows I get an error saying testHardware:6:10: error: src/OneWire/OneWire.h: No such file or directory

Or more verbose:

===info ||| Alternatives for src/OneWire/OneWire.h: [] ||| []
===info ||| ResolveLibrary(src/OneWire/OneWire.h) ||| []
===info |||   -> candidates: [] ||| []
C:\Users\jpmeijers\Documents\ebug-v2-arduino-samd21\testHardware\testHardware.ino:6:10: fatal error: src/OneWire/OneWire.h: No such file or directory
 #include "src/OneWire/OneWire.h"
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

It seems like Arduino Builder on Windows does not follow symlinks in the project root directory, neither in the src subdirectory - which should be included recursively.

Tested on:

  • Arduino IDE v1.8.10
  • Arduino IDE v1.9.0-beta (downloaded 20191214)
@facchinm
Copy link
Member

@cmaglie should we move to arduino-cli ?

@jpmeijers
Copy link
Author

Using the following configuration symlinks are followed:

  1. Clone latest master arduino-cli
  2. Clone latest master arduino-builder
  3. Add replace github.com/arduino/arduino-cli => C:\some local dir\arduino-cli to go.mod.
  4. Compile using go sdk 1.13.5

No changes to the code were needed.

@per1234 per1234 added 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 labels Sep 30, 2021
@per1234
Copy link
Contributor

per1234 commented Sep 30, 2021

Thanks so much for reporting this @jpmeijers! I am able to reproduce the bug using Arduino IDE 1.8.10 (arduino-builder 1.4.7), but no problem with Arduino IDE 1.8.16 (arduino-builder 1.6.1). So I'll close this as resolved. Feel free to comment if you find the issue still occurs with the latest version.

@per1234 per1234 closed this as completed Sep 30, 2021
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 30, 2021
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

No branches or pull requests

3 participants