PlatformIO Community

[SOLVED]Examples not showing up in registered libraries page


#1

My team has two libraries registered in the PIO lib manager:

https://platformio.org/lib/show/5900/Ark-Cpp-Client/
https://platformio.org/lib/show/5899/Ark-Cpp-Crypto/

Our examples are nested in the examples folder in root, and our library manifests are using the glob pattern per docs; but our PIO lib page says there are no examples.

Anyone have an idea what might be going on or how I can fix this?

Thank you in advance!
Simon.


#2

Not sure what’s going on there - maybe wait a little longer as you made the changes 21 hours ago, and the crawler is supposed to update every 24 hours or so?

Going by the docs, you may not have even needed to specify the examples path, as it appears that the default search settings go deep enough… https://docs.platformio.org/en/latest/librarymanager/config.html#examples


#3

the Cpp-Client library hasn’t shown the latest tagged release yet, but Cpp-Crypto has.
I’ll wait another day or so to see if it updates.
Oddly, the manifests from the PIO/lib pages both show the most recent changes.

Ahhh. So it means any sketches (.ino, etc.) falling within the default examples’ paths will automatically be found?
Thaaaat makes sense now. Thank you!

Do you also happen to know if PIO pulls packages via src’s .zip file in the release, or does it use git?
I just looked at our release zips, and they don’t have the examples folder; only manifests and ‘src/’.
If I’m just basically reusing a part of the default field, I’m feeling the release zips very well may be the culprit.


#4

Hm… so they are… very strange indeed! :open_mouth:

Yeah, looks like unless you have a specific ‘odd’ project structure, the PlatformIO crawler would find the examples by default… whether they be old/new Arduino sketchs, or c/cpp files.

Well, this could be a problem… from how I’m reading the notes on deploying via GitHub, I would think it is pulling from the repo. Now, the catch is, “PlatformIO Library Registry Crawler will lookup for release tag named as value of version or with v prefix (you do not need to pass this v prefix to the version field).

Now, with that in mind, since Ark-Cpp-Crypto is showing v0.2.0 on the PlatformIO registry, I checked the library.json tagged under v0.2.0 on github… er… the examples line there is the old one, as it didn’t make it into v0.2.0. Well, that ain’t confusing much… with the platformIO registry showing the current manifest and apparently the examples from the last released version? Or an I just overthinking this? :laughing: :man_facepalming:


#5

I’ll be sure to just remove the “examples” field :+1:

Now, with that in mind, since Ark-Cpp-Crypto is showing v0.2.0 on the PlatformIO registry, I checked the library.json tagged under v0.2.0 on github… er… the examples line there is the old one, as it didn’t make it into v0.2.0. Well, that ain’t confusing much… with the platformIO registry showing the current manifest and apparently the examples from the last released version? Or an I just overthinking this? :laughing: :man_facepalming:

That’s pretty much exactly where I’m at with it now :joy: :sob:
I know I have to be overlooking something, because not a lot is matching up atm. lol
I’ll wait a bit longer for things to propagate and see if anything changes.

The BIG changes I needed get pulled through PIO okay already; the “examples” showing up are [WIP] like whoa :sob:

Thanks for the help, @pfeerick !!


#6

Got it :+1:

Somewhere along the way, the “export” field in the manifest was including only the “src” folder.
I removed the “export” field, and the redundant “examples” field.



Examples show up now!

Thank you again for the help, pfeerick!