Description
Describe the request
Background
libraries-repository-engine will reject any release that does not have a unique version number. We regularly receive support request/bug reports from library maintainers whose release was rejected due to them having forgotten to update the version
property in their library.properties
metadata file before making a release.
The situation is inherently challenging to understand due such understanding being dependent on the fairly complex concept that, although the unit of release is the Git tag, the version
metadata property is the sole source of versioning information (the name of the tag has no significance).
Request
🙂 Print a clear explanation of the cause in the logs when a release is rejected due to having a non-unique version number.
Describe the current behavior
The logs do not effectively communicate about this situation. For example:
https://downloads.arduino.cc/libraries/logs/github.com/hpssjellis/portenta-pro-community-solutions/
2021/06/12 21:58:38 Scraping https://github.com/hpssjellis/portenta-pro-community-solutions.git
2021/06/12 21:58:38 Checking out tag: 0.1.2
2021/06/12 21:58:38 Release portenta-pro-community-solutions:0.2.0 already loaded, skipping
2021/06/12 21:58:38 Checking out tag: 0.2.0
2021/06/12 21:58:38 Release portenta-pro-community-solutions:0.2.0 already loaded, skipping
2021/06/12 21:58:38 Checking out tag: 0.3.0
2021/06/12 21:58:39 Release portenta-pro-community-solutions:0.2.0 already loaded, skipping
The code that rejects tags with a non-unique version
value is the same as the code used to skip releases that were already indexed. So this "already loaded, skipping" message is normal and expected in every logs entry (except for the ones from the very first run after the library's addition, which only exist for the hour following that run). It is only the somewhat cryptic :0.2.0
that provides the clue as to what happened.
🙁 Most library maintainer will not notice this, or not understand the significance.
libraries-repository-engine version
Additional context
A potential solution I considered was enabling Arduino Lint's rule LP022
when in the "ARDUINO_LINT_LIBRARY_MANAGER_INDEXING
" mode used by libraries-repository-engine:
Rule LP022 result: fail
WARNING: The latest Git tag appears to be greater than the library.properties version value: 0.3.0 vs 0.2.0. You must update the version value before making the tag.
This would be trivial to implement and no changes at all would be required in the libraries-repository-engine codebase.
However, this is not a 100% solution because the tag name does not have any significance at all to the engine. For example, LP022
will pass for the 0.2.0
tag of the hpssjellis/portenta-pro-community-solutions
repository, when in fact the engine rejected this tag because for some reason the prior 0.1.2
tag had the version
value of 0.2.0
! The 100% correct results can not be achieved by Arduino Lint and would instead need to be implementedin the libraries-repository-engine code
Related
- RV8803Tiny & TinyMegaI2C have not loaded to latest versions yet library-registry#286
- [Library Manager] Request for updating library library-registry#652
- [Library Manager] lib update version issues library-registry#987
- Telemetrix4Esp8266 not updated in library manager library-registry#1046
- New Release Issue - Released the library before changing the version in the library.properties library-registry#1121
- Update repositories.txt library-registry#1244
- The lib didn't update after new tag drafted library-registry#1486
- The latest version was not found in the Arduino Library Manager after the release library-registry#1552
- New version not showing up library-registry#3090
- Update repositories.txt library-registry#4131 (comment)
- Tags made without bumping version in
library.properties
Seeed-Studio/Seeed_SHT35#12 - Tag pushed without bumping version in library.properties suoapvs/NTC_Thermistor#22
- https://forum.arduino.cc/t/portenta-example-library-release-updates-not-showing/870252/6
- https://forum.arduino.cc/t/help-with-new-tag-in-library/929200
- https://forum.arduino.cc/t/release-not-updated-on-www-arduinolibraries-info/956280
- https://forum.arduino.cc/t/library-update-not-publishing/1226480
Issue checklist
- I searched for previous requests in the issue tracker
- My request contains all necessary details