Recently I was making a library, which has this <LibraryName>/src structure.
At the same time I'd like to use whole src folder as a sketch.
So I created a symbolic link (Windows 10, file junction, not .lnk file) whic h connects "src" of my library (in "libraries/MyLibrary/src") to "MyProject" sketch folder (i.e. <SketchDirectory>/MyProject)
Unfortunately, Arduino IDE was not able to compile the code.
The reason for that was simple: Arduino IDE resolves symlinks and then fails, because sketch file name is MyProject.ino, but ArduinoIDE sees it as libraries/MyLibrary/src and offer me to create a new folder and move sketch to it
So the problem is more general: whenever one wants to use symlinks in their sketch folder he/she must be sure that original folder, which symlinks points to, has the same name as the sketch.
A sketch is actually a directory and inside that directory must be a file with the same name as the directory (and the extension ino); there can be other files (.ino, .h. .cpp, ...) in that directory as well.
Actual sources are located in Library Folder/src. Sketch folder "espshell" is a LINK, pointing to library's "src" folder.
At this setup Arduino IDE fails to compile sketch, because it resolves the folder name to "libraries/.../src" and argues that it doesn't match the sketch name. If Arduino IDE will NOT resolve symbolic links to their real path then it will fix the situation.