arduino / libraries-repository-engine

Arduino Library Manager index manager
GNU Affero General Public License v3.0
12 stars 3 forks source link

New version not picked up, log says 'already loaded, skipping' #204

Closed tedtoal closed 1 year ago

tedtoal commented 1 year ago

Describe the problem

This is also posted as issue #11899 in arduino/arduino. I'm reposting it here because I'm thinking that other one is the wrong place to have posted.

The initial version V1.1.1 of my library, monitor_printf, was picked up and released by the library manager after I did a pull request. However, subsequent versions are not being picked up, and the log message is always "1.1.1 already loaded, skipping". I don't understand what is wrong, I'm following all the instructions I could find. I think versions 1.2.1 and 1.3.1 didn't release because I didn't update the version number in library.properties. However, for 1.4.1 and 1.5.1 I did update the version number in library.properties before I created the release, and I created the version number tag for the release at the same time the release was created. I have not renamed the library.

The log shows:

2023/07/18 12:29:43 Scraping https://github.com/tedtoal/monitor_printf.git
2023/07/18 12:29:43 Checking out tag: V1.1.1
2023/07/18 12:29:43 Release monitor_printf:1.1.1 already loaded, skipping
2023/07/18 12:29:43 [Arduino Lint](https://arduino.github.io/arduino-lint/latest/) has suggestions for possible improvements:
Click to expand Arduino Lint report

2023/07/18 12:29:43 Checking out tag: V1.2.1
2023/07/18 12:29:43 Release monitor_printf:1.1.1 already loaded, skipping
2023/07/18 12:29:43 [Arduino Lint](https://arduino.github.io/arduino-lint/latest/) has suggestions for possible improvements:
Click to expand Arduino Lint report

2023/07/18 12:29:43 Checking out tag: V1.3.1
2023/07/18 12:29:43 Release monitor_printf:1.1.1 already loaded, skipping
2023/07/18 12:29:43 [Arduino Lint](https://arduino.github.io/arduino-lint/latest/) has suggestions for possible improvements:
Click to expand Arduino Lint report

2023/07/18 12:29:43 Checking out tag: V1.4.1
2023/07/18 12:29:43 Release monitor_printf:1.4.1 already loaded, skipping
2023/07/18 12:29:43 Checking out tag: V1.5.1
2023/07/18 12:29:43 Release monitor_printf:1.5.1 already loaded, skipping

Why is it not creating new releases?

To reproduce

I just have to update the version in library.properties, then do a new release with a new version tag, and the problem will repeat.

Expected behavior

I expected the library manager to pick up the new version and release it.

Additional context

I've had a thought. Could it be caused by my release tag value starting with "V" but the version number in library.properties does not? I'll give that a try and if it makes a difference I will update this issue.

Issue checklist

per1234 commented 1 year ago

Nice detective work tracking down this repository @tedtoal. This is indeed the home of the code that decides whether your releases should be indexed.

I already explained the cause of the releases being rejected in your other issue at https://github.com/arduino/library-registry/issues/3090

Could it be caused by my release tag value starting with "V" but the version number in library.properties does not?

No, you can name your tags any way you like. Tags are the unit of release for Library Manager, but the tag is only marking a point in the revision history. The name of the tag is completely ignored by the engine. All versioning is done according to the value of the version field in the library.properties metadata file at the tagged revision in the repository.