PlatformIO Community

Library examples not fetched correctly in Registry

I was trying to add a library of my own named http-parser-arduino months ago. The library has already shown up in the Registry here, but the examples are not fetched from the original repo. I wonder if there is someone who can help me.

History of library.json can be found in the commit history. Note that none of these historical versions of library.json worked.

Could you declare examples as documented at https://docs.platformio.org/en/latest/librarymanager/config.html#examples ?

First of all, thank you ivakravets. I haven’t noted the changes in the docs of library.json.

However, note that I have mentioned that this library was first put up to the registry long ago (around May 2019). The library.json has been out of work since then, while the new docs were not added then.

I am just wondering, why other libs can have auto-fetched examples (like this one named ArduinoHttpServer, sorry for the no-link policy) while mine doesn’t have this feature.

We automatically determine examples if they are organized in Arduino-library style: INO file has the same name as a parent folder. For example,

examples/Demo/Demo.ini
examples/Hello/Hello.ini
examples/Hello/Hello.h

We don’t detect examples if they contain raw C/C++ files. Developers very often put multiple C/C++ files into the one folder where each C/C++ file is independent example. So, we give library maintainers whole control on this.

2 Likes

Thank you very much. The post is now closed.

UPDATE: The post is now reopened.
UPDATE: The post is now closed.

1 Like

Dear ivankravets, I am very sorry to trouble you again. I have corrected the manifest as the docs have said, but there are still no examples shown.

I am curious about whether the problem have something to do with the ‘refresh rate’ of the Registry. However, as GitHub Repo Insights has told me, there were 11 unique clones yesterday (when I corrected my manifest). I wonder if there’s anything more I can do to fix this issue.

Thank you again for your great support.

Ivan will be able to tell you the current state of affairs (since the whole library registry system is in the middle of being overhauled), but it used to be that the registry would update every 24 hours, so I usually say to wait for 36 hours before suspecting it’s not picked up any changes. And usually the version number needs to change for it to accept a new ‘version’ of the library.

pfeerick, thank you for your response. Besides, I would apologize again for disturbing you and ivankravets for so many times.

1 Like

It’s no trouble… forums are here to help people! :wink:

1 Like
  1. Please fix “examples” according to the https://docs.platformio.org/en/latest/librarymanager/config.html#examples
        {
            "name": "bench",
            "base": "examples",
            "files": [
                "examples/bench/bench.c"
            ]
        },

must be

        {
            "name": "bench",
            "base": "examples/bench",
            "files": [
                "bench.c"
            ]
        },
  1. I see that you did mistake in JSON file and our crawler saw it. If we see broken manifest - we revisit library with +1 day. However, this is legacy mode, and we will shutdown it soon. ALL new versions MUST BE submitted manually using https://docs.platformio.org/en/latest/librarymanager/creating.html#publishing
  2. We don’t moderate libraries with the new regsitry. No need to wait 24hours. Just use pio package publish and library will be processed in minutes.

P.S: Please login with your csharpermantle account to PlatformIO. You can use pio home command and login with Github.

To check which packages are owned by our account, please use https://docs.platformio.org/en/latest/core/userguide/access/cmd_list.html#cmd-access-list

2 Likes

@pfeerick a few updates from our side.

  1. Crawler works only for legacy libraries. We will turn off it soon. It check modifications every 24h.
  2. All new libraries or new versions are processed instantly the only maintainer used pio package publish command.

To get access to “legacy packages”, need to login with GitHub to the PlatformIO Account.

1 Like

Thank you for your reply! Your advice is so helpful and detailed that I do not know how to reply. I know that replying to a noob just like me would take a lot of time. I will try not to waste other people’s time in the future.

BTW, my example file actually exists in two places: one is bench.c, and the other one is examples/bench/bench.c.

Do you mean that documentation is unclear? How could we improve? I still don’t understand the root of problem.

No, no. I don’t mean that. I am just expressing my appreciation to all of you PIO staff. In China we seldom get this kind of detailed explanation about our questions and we are usually treated badly. I just feel happy and lucky to be nicely answered.

1 Like