Encountered lousy boo-boo in arduino IDE generated compilation commands

PaulS:

It is totally brain dead to base the include path for everything
based on the headers "noticed" in the users sketch, particularly when it comes to libraries.

I disagree with this. The advantage to listing all libraries in the sketch is that it makes it easy to see, looking at a sketch what libraries it needs.

If a sketch only needed to show that it needed library A, and library A needed libraries B, C, and D, and library C needed libraries E, F, and G, and library E needed 6 more levels of libraries, finding all the needed libraries would be a nightmare.

As it is, a sketch must list all libraries that it needs, so one can see at a glance what libraries will be needed.

One library can NOT hide the fact that it is dependent on another library.

Paul,

It's not just libraries. If I created a .cpp file and include a contributed library header, arduino IDE doesn't properly include that library's path when compiling the .cpp
There are times when I want to create classes in .h and .cpp but not necessarily make them arduino library. Say the classes are specific to only one project and other projects can't benefit from having the class in a library. Maybe I'm still working on the class and would keep it in a sketch folder so I can modify it in arduino IDE. There's more chances I can find to justify a better way of library links. I disagree with you on the fact the library should include all includes. That will be a very long list. I consider it better off if each library takes care of what it needs instead of what it's include needs.