microsoft / vscode-arduino

Visual Studio Code extension for Arduino
Other
1.15k stars 206 forks source link

Library Manager uses 'more-info' URL from lowest version of library, should be latest #1515

Open zfields opened 2 years ago

zfields commented 2 years ago

Edited by @fearthecowboy to add details

The Library Manager is using the first occurrence (version) of a library in the feed for things like the more info link, it should use the latest version, as if details are updated over time they aren't reflected in the UI at all.

Example - "Blues Wireless Notecard" v1.0.0

 {
      "name": "Blues Wireless Notecard",
      "version": "1.0.0",
      "author": "Blues Wireless",
      "maintainer": "Blues Wireless \u003cinfo@blues.io\u003e",
      "sentence": "An easy to use Notecard Library",
      "paragraph": "An easy to use Notecard Library",
      "website": "https://github.com/rayozzie/Notecard-Library",
      "category": "Communication",
      "architectures": [
        "*"
      ],
      "types": [
        "Contributed"
      ],
      "repository": "https://github.com/blues/note-arduino.git",
      "url": "https://downloads.arduino.cc/libraries/github.com/blues/Blues_Wireless_Notecard-1.0.0.zip",
      "archiveFileName": "Blues_Wireless_Notecard-1.0.0.zip",
      "size": 8788,
      "checksum": "SHA-256:79a6364425c2f2e40cbfd580ec3e9dd69e22a1c5ab8f22374a2a44398b51883f"
    },

Example - "Blues Wireless Notecard" v1.3.15 notice how the website has changed,

 {
      "name": "Blues Wireless Notecard",
      "version": "1.3.15",
      "author": "Blues Wireless",
      "maintainer": "Blues Wireless \u003cinfo@blues.io\u003e",
      "sentence": "An easy to use Notecard Library for Arduino.",
      "paragraph": "Supports Serial and I2C for communication from a host MCU.",
      "website": "https://github.com/blues/note-arduino",
      "category": "Communication",
      "architectures": [
        "*"
      ],
      "types": [
        "Contributed"
      ],
      "repository": "https://github.com/blues/note-arduino.git",
      "providesIncludes": [
        "Notecard.h"
      ],
      "url": "https://downloads.arduino.cc/libraries/github.com/blues/Blues_Wireless_Notecard-1.3.15.zip",
      "archiveFileName": "Blues_Wireless_Notecard-1.3.15.zip",
      "size": 163257,
      "checksum": "SHA-256:5e8290f4786b751cdaf8ee6ab3c7b7e5e623ad72be04e11f1fc8a8aab16d5fe4"
    },

Original Comment

I found this line in your code, but I can't tell where you are populating your library items from; specifically the "More Info" URI.

If you can tell me the base URI, then I can put another issue on Arduino and link back here.

gcampbell-msft commented 2 years ago

@zfields I'm looking into where exactly the library items are populated from. In the meantime could you provide more information about your bug, like what library "more info" link returns a non-existent URL?

Thanks!

gcampbell-msft commented 2 years ago

@zfields I've done a deep dive and understand where the libraries are populated from, it's pretty complex so I won't go into it here. However, I can likely help you get this fixed or report the broken link once I know what link is broken. Thanks!

zfields commented 2 years ago

Hi @gcampbell-msft! I don't know how I missed your first message. I'll collect the details and try to respond in the next few hours.

zfields commented 2 years ago

If you search for Blues Wireless Notecard from the Arduino: Library Manager in VSCode, it should be the top result.

When you click More Info, then you are taken to https://github.com/rayozzie/Notecard-Library, instead of https://github.com/blues/note-arduino.

There is no mention of the invalid URL in the library.properties file, so I don't know how it's picking it up.

fearthecowboy commented 2 years ago

I went to replicate this, and at first I was sure it wasn't going to do it for me, but sure enough it actually did.

Took me a couple minutes to see what's awry. It looks like the Arduino UI takes the 'more info' link from the latest version of the library in the feed, and the VSCode extension takes it from the first one in the feed. (which in this case is the lowest version)