Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider introducing a new lib search flag to omit the details for all releases from the response #2064

Closed
3 tasks done
kittaakos opened this issue Feb 6, 2023 · 0 comments · Fixed by #2102
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: CLI Related to the command line interface topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Feb 6, 2023

Describe the request

The CLI on the ./arduino-cli lib search "" format --json command produces ~38MB of data. A big part of the result JSON is not used (in IDE2). If there were a flag to omit all the details of the releases, IDE2 would be happy to use it. Thank you!

IDE2 uses the lib search:

  • to filter the results (category and types),
  • to populate the Library Manager view (author, version, maintainer, sentence, website, and the key of the releases object for the available version), and
  • to populate the Sketch > Include Library menu (provides_includes)

Describe the current behavior

CLI returns with this library structure:

{
  "name": "RichHttpServer",
  "releases": {
    "1.0.0": {
      "author": "Chris Mullins \u003c[email protected]\u003e",
      "version": "1.0.0",
      "maintainer": "Chris Mullins \u003c[email protected]\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-1.0.0.zip",
        "archive_filename": "RichHttpServer-1.0.0.zip",
        "checksum": "SHA-256:2e4982027b878d9c64e69bc0790c6d7214e462605b45ece020c0a5b9f84791e8",
        "size": 6329,
        "cache_path": "libraries"
      }
    },
    "1.2.0": {
      "author": "Chris Mullins \u003c[email protected]\u003e",
      "version": "1.2.0",
      "maintainer": "Chris Mullins \u003c[email protected]\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-1.2.0.zip",
        "archive_filename": "RichHttpServer-1.2.0.zip",
        "checksum": "SHA-256:e1d9cb34ecb648e41a0889d4df1a92e9e9580379eaa8f67796f928550714b683",
        "size": 6514,
        "cache_path": "libraries"
      }
    },
    "2.0.0": {
      "author": "Chris Mullins \u003c[email protected]\u003e",
      "version": "2.0.0",
      "maintainer": "Chris Mullins \u003c[email protected]\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.0.zip",
        "archive_filename": "RichHttpServer-2.0.0.zip",
        "checksum": "SHA-256:a9e5d19a3c87ffb3b6f3bf53aa352bedd72a38c71c76167b4be2bcaf537e881e",
        "size": 23828,
        "cache_path": "libraries"
      }
    },
    "2.0.1": {
      "author": "Chris Mullins \u003c[email protected]\u003e",
      "version": "2.0.1",
      "maintainer": "Chris Mullins \u003c[email protected]\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.1.zip",
        "archive_filename": "RichHttpServer-2.0.1.zip",
        "checksum": "SHA-256:6a15bf1cd2919b27446049bb230e1f90ed01c13b2d01917adb7eff775f0a4e9c",
        "size": 23824,
        "cache_path": "libraries"
      }
    },
    "2.0.2": {
      "author": "Chris Mullins \u003c[email protected]\u003e",
      "version": "2.0.2",
      "maintainer": "Chris Mullins \u003c[email protected]\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.2.zip",
        "archive_filename": "RichHttpServer-2.0.2.zip",
        "checksum": "SHA-256:4ed5bf29f234db6d1604a46e79b9ff1bae4dc6ab4fdc11a6faccac51f81fbc8f",
        "size": 23715,
        "cache_path": "libraries"
      }
    },
    "2.0.3": {
      "author": "Chris Mullins \u003c[email protected]\u003e",
      "version": "2.0.3",
      "maintainer": "Chris Mullins \u003c[email protected]\u003e",
      "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
      "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
      "website": "https://github.com/sidoh/rich_http_server",
      "category": "Communication",
      "architectures": [
        "esp8266",
        "esp32"
      ],
      "types": [
        "Contributed"
      ],
      "resources": {
        "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.3.zip",
        "archive_filename": "RichHttpServer-2.0.3.zip",
        "checksum": "SHA-256:2d1a06978ee3336034cae88b75f4ddeee8f332cfa8828cf47da805f9b8b4fda8",
        "size": 23717,
        "cache_path": "libraries"
      }
    }
  },
  "latest": {
    "author": "Chris Mullins \u003c[email protected]\u003e",
    "version": "2.0.3",
    "maintainer": "Chris Mullins \u003c[email protected]\u003e",
    "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
    "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
    "website": "https://github.com/sidoh/rich_http_server",
    "category": "Communication",
    "architectures": [
      "esp8266",
      "esp32"
    ],
    "types": [
      "Contributed"
    ],
    "resources": {
      "url": "https://downloads.arduino.cc/libraries/github.com/sidoh/RichHttpServer-2.0.3.zip",
      "archive_filename": "RichHttpServer-2.0.3.zip",
      "checksum": "SHA-256:2d1a06978ee3336034cae88b75f4ddeee8f332cfa8828cf47da805f9b8b4fda8",
      "size": 23717,
      "cache_path": "libraries"
    }
  }
}

IDE2 would be happy with this:

{
  "name": "RichHttpServer",
  "author": "Chris Mullins \u003c[email protected]\u003e",
  "maintainer": "Chris Mullins \u003c[email protected]\u003e",
  "sentence": "An addon for ESP8266WebServer which makes common tasks for developing a rich REST API straightforward.",
  "paragraph": "This library makes it easy to build rich application REST servers that respond to routes with variables in them (e.g., /things/:thing_id), add authentication, etc.",
  "website": "https://github.com/sidoh/rich_http_server",
  "category": "Communication",
  "architectures": [
    "esp8266",
    "esp32"
  ],
  "types": [
    "Contributed"
  ],
  "releases": [
    "1.0.0",
    "1.2.0",
    "2.0.0",
    "2.0.1",
    "2.0.3"
  ]
}

Arduino CLI version

0.29.0

Operating system

macOS

Operating system version

12.5.1

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details
@kittaakos kittaakos added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface labels Feb 6, 2023
@kittaakos kittaakos changed the title [gRPC] Consider introducing a new lib search flag to omit all the details for all releases from the response [gRPC] Consider introducing a new lib search flag to omit the details for all releases from the response Feb 6, 2023
@cmaglie cmaglie self-assigned this Mar 9, 2023
@per1234 per1234 added conclusion: resolved Issue was resolved topic: CLI Related to the command line interface labels Mar 13, 2023
@per1234 per1234 changed the title [gRPC] Consider introducing a new lib search flag to omit the details for all releases from the response Consider introducing a new lib search flag to omit the details for all releases from the response Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: CLI Related to the command line interface topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants