Failing to include nanopb libdep

The issue has already been reported on nanopb’s boards:

Apparently part of the problem may be some assumptions on pio’s end? My attempt to lock it to an earlier version explicitly as:
lib_deps = nanopb/Nanopb@0.4.5
or even something as old as 0.4.1
does not seem to change anything, it is still trying to get 0.4.6.4 and fails in the same way as in the linked ticket.

Is there currently no way to use nanopb with pio without some brute force contingencies?

As the issue says,

is not a valid semantic versioning of the X.Y.Z form at all, and should be fixed on the library side.

In the meantime I recommend locally cloning the repo in the lib/ folder of the project and fixing the version string in the library.json therein.

Ok, so it is not valid for this version, but why then am I unable to fetch the other versions where the syntax is ok? Does it refuse to load any version of a library that has a single version that does not conform? Won’t this stay broken forever even when they do release a nicely named version?

Versions with a correct semver work perfectly fine.

>pio pkg install -g -l "nanopb/Nanopb@0.4.6"
Library Manager: Installing nanopb/Nanopb @ 0.4.6
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: Nanopb@0.4.6+4 has been installed!

Per above no.

Per above no.

I’ve opened issue PIO Registry accepts invalid SemVers · Issue #4389 · platformio/platformio-core · GitHub so that this can get rectified for the currently broken versions.