arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.22k stars 379 forks source link

IDE incorrectly shows `PubSubClient@2.8.0` as updatable after an `Install All` automatic update #1390

Closed kittaakos closed 2 years ago

kittaakos commented 2 years ago

Describe the problem

After an Install All, the PubSubClient remains updateable in the IDE. The LibraryListResponse#installed_libraries contains the PubSubClient as an installed one.

gRPC:

[
    "Adafruit AM2315",
    "AsyncLiquidCrystal",
    "107-Arduino-NMEA-Parser",
    "ACAN2515",
    "Arduino_BuiltIn",
    "Firmata",
    "Servo",
    "AD9850SPI",
    "Adafruit APDS9960 Library",
    "Mouse",
    "107-Arduino-Sensor",
    "Adafruit AMG88xx Library",
    "Adafruit Arcada GifDecoder",
    "LiquidCrystal",
    "AccelStepperWithDistances",
    "Adafruit BMP085 Library",
    "ACAN2515Tiny",
    "AceCommon",
    "BaudotCode",
    "AceSorting",
    "Keyboard",
    "PubSubClient",
    "AceRoutine",
    "ArduinoLearningKitStarter",
    "SD",
    "ACAN_ESP32",
    "AceUtils",
    "Stepper",
    "hd44780",
    "AD57X4R",
    "YouTubeLiveStreamArduino",
    "ABB PowerOne Aurora inverter communication protocol",
    "Arduino Cloud Provider Examples",
    "WiFi101",
    "Accessories",
    "Adafruit CAP1188 Library",
    "Adafruit BD3491FS",
    "ACE128",
    "Ethernet",
    "AD7173",
    "Accelerometer_H3LIS331DL",
    "CheapLCD",
    "NimBLE-Arduino",
    "107-Arduino-BMP388",
    "ACS712",
    "AD524X",
    "107-Arduino-MCP2515",
    "Adafruit AS7341",
    "Adafruit AHRS",
    "Adafruit AM2320 sensor library",
    "WiFi101OTA",
    "Accessory Shield",
    "107-Arduino-Debug",
    "AD5254_asukiaaa",
    "Adafruit ADXL345",
    "XboxSeriesXControllerESP32_asukiaaa",
    "ACAN2517",
    "AD_Sensors",
    "Adafruit 9DOF",
    "XboxControllerNotificationParser",
    "107-Arduino-Cyphal",
    "Adafruit BMP085 Unified",
    "107-Arduino-BoostUnits",
    "ACAN2517FD",
    "ACAN_T4",
    "AD520X",
    "Adafruit LiquidCrystal",
    "Akafugu TWILiquidCrystal Library",
    "AceSegment",
    "Adafruit ADXL343",
    "Adafruit BusIO",
    "ACANFD_FeatherM4CAN",
    "AceButton",
    "ArduinoJson",
    "BlockNot",
    "TFT"
]

The CLI without the gRPC client see behaves correctly:

~/dev/git/arduino-ide/arduino-ide-extension/build/arduino-cli lib list --updatable --format json
[]

https://user-images.githubusercontent.com/1405703/188275789-014c6ca3-1b18-418f-aaa3-b363dd40dcde.mp4

To reproduce

Install PubSubClient@2.8.0, and check for updates.

Expected behavior

PubSubClient@2.8.0 is not prompted as updateable.

Arduino IDE version

fe69093 (https://github.com/arduino/arduino-ide/pull/1385)

Operating system

macOS

Operating system version

12.5.1

Additional context

No response

Issue checklist

kittaakos commented 2 years ago

Caused by https://github.com/arduino/arduino-cli/issues/1727

lib list:

 {
    "library": {
      "name": "PubSubClient",
      "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
      "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
      "sentence": "A client library for MQTT messaging.",
      "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
      "website": "http://pubsubclient.knolleary.net",
      "category": "Communication",
      "architectures": [
        "*"
      ],
      "install_dir": "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient",
      "source_dir": "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/src",
      "real_name": "PubSubClient",
      "version": "2.8",
      "license": "Unspecified",
      "location": 1,
      "layout": 1,
      "examples": [
        "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/examples/mqtt_auth",
        "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/examples/mqtt_basic",
        "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/examples/mqtt_esp8266",
        "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/examples/mqtt_large_message",
        "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/examples/mqtt_publish_in_callback",
        "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/examples/mqtt_reconnect_nonblocking",
        "/Users/a.kitta/Documents/Arduino/libraries/PubSubClient/examples/mqtt_stream"
      ],
      "provides_includes": [
        "PubSubClient.h"
      ]
    }
  },

lib search:

  {
      "name": "PubSubClient",
      "releases": {
        "2.2.0": {
          "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "version": "2.2.0",
          "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "sentence": "A client library for MQTT messaging.",
          "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages from a remote server. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison and ESP8266.",
          "website": "http://knolleary.github.io/pubsubclient/",
          "category": "Communication",
          "architectures": [
            "*"
          ],
          "types": [
            "Contributed"
          ],
          "resources": {
            "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.2.0.zip",
            "archive_filename": "PubSubClient-2.2.0.zip",
            "checksum": "SHA-256:99f84bead6e9748a654a7c3f9bd99beed7323240d031209bf18e644f25958b47",
            "size": 35601,
            "cache_path": "libraries"
          }
        },
        "2.3.0": {
          "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "version": "2.3.0",
          "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "sentence": "A client library for MQTT messaging.",
          "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
          "website": "http://pubsubclient.knolleary.net",
          "category": "Communication",
          "architectures": [
            "*"
          ],
          "types": [
            "Contributed"
          ],
          "resources": {
            "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.3.0.zip",
            "archive_filename": "PubSubClient-2.3.0.zip",
            "checksum": "SHA-256:698a8f85c81cdacf87f4a4c16e27cd017e43886abbec8fa3765c38b0d5d9e7f5",
            "size": 37720,
            "cache_path": "libraries"
          }
        },
        "2.4.0": {
          "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "version": "2.4.0",
          "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "sentence": "A client library for MQTT messaging.",
          "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
          "website": "http://pubsubclient.knolleary.net",
          "category": "Communication",
          "architectures": [
            "*"
          ],
          "types": [
            "Contributed"
          ],
          "resources": {
            "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.4.0.zip",
            "archive_filename": "PubSubClient-2.4.0.zip",
            "checksum": "SHA-256:16c9ee3569f6dcc2e1cc44b94d5df3a5b11162081d0db40b66f121239ba43669",
            "size": 38047,
            "cache_path": "libraries"
          }
        },
        "2.5.0": {
          "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "version": "2.5.0",
          "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "sentence": "A client library for MQTT messaging.",
          "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
          "website": "http://pubsubclient.knolleary.net",
          "category": "Communication",
          "architectures": [
            "*"
          ],
          "types": [
            "Contributed"
          ],
          "resources": {
            "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.5.0.zip",
            "archive_filename": "PubSubClient-2.5.0.zip",
            "checksum": "SHA-256:994ef2e7a3484c0cbb13daf6c53e8d394de950319aafb1bf8b8dc022fdcdc473",
            "size": 38730,
            "cache_path": "libraries"
          }
        },
        "2.6.0": {
          "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "version": "2.6.0",
          "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "sentence": "A client library for MQTT messaging.",
          "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
          "website": "http://pubsubclient.knolleary.net",
          "category": "Communication",
          "architectures": [
            "*"
          ],
          "types": [
            "Contributed"
          ],
          "resources": {
            "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.6.0.zip",
            "archive_filename": "PubSubClient-2.6.0.zip",
            "checksum": "SHA-256:8f208d5f3d2cf18c00dcbf041af72b5e2f60a5c533cedb8fbf81f7b798128e46",
            "size": 38727,
            "cache_path": "libraries"
          }
        },
        "2.7.0": {
          "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "version": "2.7.0",
          "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "sentence": "A client library for MQTT messaging.",
          "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
          "website": "http://pubsubclient.knolleary.net",
          "category": "Communication",
          "architectures": [
            "*"
          ],
          "types": [
            "Contributed"
          ],
          "resources": {
            "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.7.0.zip",
            "archive_filename": "PubSubClient-2.7.0.zip",
            "checksum": "SHA-256:e01f214af680be6b199452d422046fe7be2bf94729a0b7e27109d97715c4b61f",
            "size": 43409,
            "cache_path": "libraries"
          }
        },
        "2.8.0": {
          "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "version": "2.8.0",
          "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
          "sentence": "A client library for MQTT messaging.",
          "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
          "website": "http://pubsubclient.knolleary.net",
          "category": "Communication",
          "architectures": [
            "*"
          ],
          "types": [
            "Contributed"
          ],
          "resources": {
            "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.8.0.zip",
            "archive_filename": "PubSubClient-2.8.0.zip",
            "checksum": "SHA-256:f0849b93a2b02e263a6c157c374d6103caefba753a47dcbef64bbec620b079fe",
            "size": 44426,
            "cache_path": "libraries"
          }
        }
      },
      "latest": {
        "author": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
        "version": "2.8.0",
        "maintainer": "Nick O'Leary \u003cnick.oleary@gmail.com\u003e",
        "sentence": "A client library for MQTT messaging.",
        "paragraph": "MQTT is a lightweight messaging protocol ideal for small devices. This library allows you to send and receive MQTT messages. It supports the latest MQTT 3.1.1 protocol and can be configured to use the older MQTT 3.1 if needed. It supports all Arduino Ethernet Client compatible hardware, including the Intel Galileo/Edison, ESP8266 and TI CC3000.",
        "website": "http://pubsubclient.knolleary.net",
        "category": "Communication",
        "architectures": [
          "*"
        ],
        "types": [
          "Contributed"
        ],
        "resources": {
          "url": "https://downloads.arduino.cc/libraries/github.com/knolleary/PubSubClient-2.8.0.zip",
          "archive_filename": "PubSubClient-2.8.0.zip",
          "checksum": "SHA-256:f0849b93a2b02e263a6c157c374d6103caefba753a47dcbef64bbec620b079fe",
          "size": 44426,
          "cache_path": "libraries"
        }
      }
    }

The IDE must deal with such versions gracefully.