-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Library without includeDir unpredictable #3887
Comments
See https://docs.platformio.org/en/latest/librarymanager/config.html#includedir It seems you need |
@ivankravets I don't think you understand. This is about the behaviour when I'm trying to use a foreign library without library.json in it |
Maybe partly related to https://community.platformio.org/t/platformio-downloads-subfolder/20154. In general, the behavior on how PlatformIO downloads a library is sometimes very wrong -- in the linked topic you can e.g. see that for the repo https://github.com/digint/tinyfsm, when using it in Maybe something in general can be done here to improve the logic in which subfolder of a package is actually used, in case no Regarding the original problem: I've forked the CNL library and added the
(I've only added it to this branch since I couldn't get the 2.0.0-dev branch working, seems to need C++20) |
I think we need a way of injecting metadata to a foreign raw dependency (Conan allows this). Maybe there's a way with extra_scripts, but that's entirely unobvious to me. |
Thanks for the report! Please re-test with |
If you’ve found a bug, please provide an information below.
Configuration
Operating system: Windows 10
PlatformIO Version version 5.1.1b1
Description of problem
Referencing CNL (not containing library.json) causes contents of
include/cnl/
to be placed in.pio\libdeps\penboard\cnl
. TheincludeDir
is also aimed at that directory (-I.pio\libdeps\penboard\cnl
). This breaks the intended library usage with#include "cnl/....h"
. AFAIK this is in contrast withincludeDir
documentation that talks about library/include being the default. Same behaviour is seen both with library.json missing or justincludeDir
missing.Actual Results
The subdirectory
include/cnl
is extracted to libdeps/cnl, making thecnl/...h
include invalid.Expected Results
cnl/...h
include should be the right option.If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
I probably understand the logic behind the behaviour, but I think there;s still an inconsistency with the docs.
.h
fileslibrary/include
path as per docs ... if it's there, I suppose :) (preferred)The text was updated successfully, but these errors were encountered: