Libraries that use libraries

I’ve been using a display with an MCP23008 expander and the Adafruit_Liquidcrystal library no issues. Presumably for ease of implementation that includes the files for the expander in the same library as the ones for the display.

Unless I am somewhat mistaken, normally including a library in a library in this way would not make that second library available to the parent project but for a Particle project it seems to, is that intended behavior that I can rely on or something that might change

As an aside so it comes up on a search… I have also used an native I2C display that uses the RW1063 chipset [a Raystar/Winstar 16*2 in my case] by beating the ST7036 driver found here https://bitbucket.org/fmalpartida/st7036-display-driver/wiki/Home with a stick.

There is no definet answer yes or no, since this depends on how the nested library is included in the top level library and/or whether you add an explicit include statement in your project.

I only discovered it when assuming using #include without adding it to the project.properties file wouldn’t work, in fact adding it to project.properties stops it compiling at all. For cleanliness I guess it would be better to use the basic liquidcrystal library and mcp libraries separately anyway.