It’s likely this is well covered elsewhere. If so, I apologize in advance.
I have a non-trivial dependency use case:
Program Z depends on Library A and Library B. Both Library A and B can be considered “real” pio libraries complete with a library.json - and also they are local, not necessarily on github (though eventually)
Library A has its own default config.h. However, it needs to utilize a “config.h” from Program Z. Within Z’s config.h, it has an include_next<config.h> which falls through to Library A’s copy.
Library B also wants access to Program Z’s “config.h”. The include_next<config.h> needs to fall through to Library A.
This use case suggests that Library B has a dependency on Library A. In this use case, however, Library B conditionally depends on Library A, depending on Program Z’s feature flag configuration (let’s just call it FEATURE_ENABLE_CONFIG for now). There are other use cases where B operates without A
So, I’m having trouble in my program indicating how to get Library B to have this kind of dependency. Also, getting Library A and B to see Program Z’s “config.h” works by brute-forcing -Isrc
into build_flags
, but so far that’s not working out for the B -> A dependency.
Library B (rightfully) complains that it can’t do a include_next<config.h> since it doesn’t have a scope into A