How to update a file in a library package without increasing the library version number?

I noticed that I forgot to include a fix in

The fix was included in the Github v1.1.0 release of the library, but I forgot to include the updated when creating the library package for PlatformIO.

When the library v1.1.0 gets downloaded from PlatformIO it contains the old non-updated

When v1.1.0 is downloaded from Github the updated is included.

I read in the documentation (or on screen messages) that a specific library version can be published only one single time which means that unpublishing it and then repushing it with the same library version shall not work.

Changing the library version is not an option because nothing has changed. The actual version and its contents are defined by the repository on Github.
There is only a mismatch in the package published on PlatformIO.

How can I fix this mismatch between PlatformIO and Github without changing te version number and corresponding release on Github?

Probably needs manual intervention if the unpublish period of 72hrs has experied. Also I assume by the username you’re talking about GitHub - lnlp/EasyLed: Arduino library for controlling standard LEDs in an easy way. EasyLed provides simple logical methods like on(), off(), toggle(), flash(), isOn(), isOff() and reset(). This library will help to write cleaner code that is easy to read and understand.? @ivankravets please :slight_smile:

Thanks. Yes, that’s the library.

I must have overlooked that unpublishing is (only) possible within the first 72 hours.
I published the latest version yesterday so I should be able to unpublish it.

The docs show that an unpublish can be undone (which means that all data is not wiped) but is not clear about the following:

Will the unpublish allow me to re-publish the library with the same version again?

(Neither are the docs clear about within what time frame an unpublish can be undone.)

pio package unpublish [<organization>/]<pkgname>[@<version>] [OPTIONS]

So to unpublish I would have to use pio package unpublish lnlp/EasyLed@1.1.0 ?
(lnlp is a user account, not an organisation)

Yes, per this declaration and version for your library, so it should work. (If you are logged in with pio account login of course).

Could you provide a link to the library?

NO it will not:

pio package unpublish lnlp/EasyLed@1.1.0
Package version has been successfully removed from the registry

pio package publish EasyLed-1.1.0.tar.gz
Error: The package EasyLed@1.1.0 is already published in registry.

It will be helpful to add this information to the pio unpublish documentation.

It would be more useful if an unpublish-ed package can be re-published with the same version (for situations like this).

I still do not understand what is wrong with our registry. You published a package with version 1.1.0. Now, you changed 1 byte. The question: “Are these packages identical?”. If no, please publish 1.1.1 or 1.2.0. It’s registry. It’s impossible to host 2 packages with DIFFERENT contents under the same version.

The problem is that the EasyLed library package which contains the EasyLed library v1.1.0 does not 100% match the files in the corresponding Github repository.
Because I apparently made a mistake when creating the PlatformIO library package.

No that is incorrect. That was in the latest commit which was committed to Github after v1.1.0 was released on Github.

To repeat what I tried to explain above:

  • EasyLed release v1.1.0 released on GitHub

  • PlatformIO library package created from local repository. was updated (fix version in shield) edited on (in Github Web UI) and committed on Github BEFORE Github release v1.1.0 was created. The fixed is part of release v1.1.0.

I forgot to do pull on local repo so local repo did not include the updated But library.json and already contained the correct library version number 1.1.0.

I then created a publish package from local repo and published it to PlatformIO.

When downloading the library from PlatformIO in VSCode I noticed it contains the old unfixed, while the rrepository release v1.1.0 on Github does contain the fixed

So the PlatformIO package contains an error. It does not match 100% the repository on Github which is not good.

This is about a fix in that is now not included on PlatformIO, which should be corrected. The package in PlatformIO should match the released version on Github.

It would be absurd having to change the version of the library while no functionality of the code has been changed.

If I would not have created and uploaded a package explicitly but the library would have been picked up by the crawler then the problem would not have existed at all. The crawler would use the contents from Github. There would not be a mismatch between Github and the PlatformIO library package.

I tried to play nicely and follow PlatformIO rules where possible, but it is still possible to make (small) mistakes.

I conclude that it is currenly possible to create a PlatformIO library package based on a Github repository for which the URL needs to be specified, but then end up with a PlatformIO package with contents that does not match the same files in the Github repository. Isn’t that strange?

I just want to make available on Platform my EasyLed v1.1.0 library with the same version of the files as contained in the v1.1.0 release (tage) on Github.

Shortly - please try to publish a package again with 1.1.0 version.

This is not a part of rules and we did this just for you to save a time from this discussion.

Thanks for understanding! :pray:

1 Like

Thanks for helping. Much appreciated.

If will be useful if PlatformIO could provide guidance with best practices and possible pitfalls for testing and publishing of packages.