You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
However, this does not work for me. I have a "source" folder which is empty except for a "subsrc" directory, which contains source code. If I set "lib": "./source", my source files are compiled correctly. If I set "lib": "./source/subsrc", yotta finds no sources and generates an empty placeholder library instead.
The same thing happens when I set "lib": "./" (no sources are found). The behavior of using the root directory as the source dir is not clearly documented, but it seems like it ought to be allowed.
The text was updated successfully, but these errors were encountered:
The subdirectory should work, so that's definitely a bug. Does it work if you try a subdirectory of somewhere other than ./source? (I ask because ./source is the default location, so it's special-cased in a few places).
Putting source files directly in the root directory is probably not generally a good idea, but I think it should be supported for compatibility with existing libraries that do that.
Yes, it works fine with ./anyfolder or just anyfolder, but not with ./folder1/folder2. I haven't tried ./source/folder2.
The reason I might use the root directory for sources is to maintain compatibility with other build systems. A custom cmake is probably a better idea, but it would be nice to choose.
The documentation for the module.json file clearly states that a subdirectory may be used for the "lib" property of a library module:
However, this does not work for me. I have a "source" folder which is empty except for a "subsrc" directory, which contains source code. If I set
"lib": "./source"
, my source files are compiled correctly. If I set"lib": "./source/subsrc"
, yotta finds no sources and generates an empty placeholder library instead.The same thing happens when I set
"lib": "./"
(no sources are found). The behavior of using the root directory as the source dir is not clearly documented, but it seems like it ought to be allowed.The text was updated successfully, but these errors were encountered: