arduino/arduino-cli

library not recognized, not linting, no explanation other than LS001

Closed this issue · 1 comments

Describe the problem

I downloaded the latest stable bits and installed them on windows 11 last night. That's my version.

Tell me why this doesn't get recognized by arduino. Arduino CLI sees it as a library, but WILL NOT resolve any of the headers to that library.
https://github.com/codewitch-honey-crisis/htcw_io

Keep in mind i have a copy of htcw_bits which it depends on installed locally, and the result is the same even if i remove the depends line. I've deleted the cache, so don't bother asking.

Furthermore Arduino-lint gives a non-specific LS001 error which says nothing helpful at all. In fact that error code should trigger something in your github actions to tell the developers to go back and actually put a real error message in instead of throwing LS0001 which is basically "general failure"

So this is several bug reports and a documentation bug, all in one. Lucky you!

Arduino lint tool needs fixing to report better errors
Documentation for library manager needs improvement - once you tell me why my library isn't being fully recognized, i can be more specific
or
The library resolver needs fixing.

It's one of those things.

To reproduce

Try to copy the linked repo to Documents/Arduino/Libraries and then include "htcw_io.h" see if it works for you (it won't)
Don't worry about not having htcw_bits - it won't even get that far.

Expected behavior

I expect the documentation to reflect the actual steps i need to take to make a valid library.
I expect when I do so that the library is properly picked up by the arduino engine and resolved.

Arduino CLI version

arduino-cli Version: 1.1.1 Commit: fa6eafc Date: 2024-11-22T09:31:38Z

Operating system

Windows

Operating system version

11

Additional context

I didn't install the nightly build and I'm not going to for this. That's ridiculous - check your own work.

Is it too much to ask for you guys to provide a more professional version of this toy even if it's pay to play? Now that platformIO is listing starboard there are plenty of developers out there that need a more professional arduino framework compatible engine rather than some training wheels with a 1990s code editor glued to it.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Hi @codewitch-honey-crisis. The tone you used in this issue not appropriate or productive. Please behave in a more professional and respectful manner in any further interactions with Arduino's repositories.

Thanks in advance for your cooperation.


Now to address your report:

The problem is that your library has an invalid structure. We support two different library layouts, "recursive" and "flat":

https://arduino.github.io/arduino-cli/latest/library-specification/#library-layout

The layout is identified by the presence or absence of a folder named src in the root of the library:

https://arduino.github.io/arduino-cli/latest/library-specification/#source-code

Your library has such a folder, so it is treated as having a "recursive" layout:

https://github.com/codewitch-honey-crisis/htcw_io/tree/master/src

When the library has a recursive layout, all code files of the library must be placed under the src subfolder. But you placed your header files in the root folder of the library, where they are not recognized. This is also the reason why your library is found in violation of rule LS001 by Arduino Lint, since a library must have at least one header file in order to be considered valid.

So move the header files to the src subfolder and the problem will be solved.

Arduino CLI compiles the contents of the src subfolder recursively, so you are welcome to organize the files into subfolders under the src folder if you like.

If you would like further assistance with the development of your library, you are welcome to post over on Arduino Forum:

https://forum.arduino.cc/