Skip to content

Allow remote git dependencies on library.properties (depends key) #2663

@LuKks

Description

@LuKks

Describe the request

It would be great if instead of being forced to publish new libraries into the library-registry repository, we could just use remote Git dependencies which is way more flexible because it allows publishing the library later when it's actually stable and you want to commit to that, or not at all. The CLI allows this so it makes sense for the IDE to also support it

Individual GitHub repositories are already the registry itself, there should be no need for the extra step to edit a .txt file. It's a good solution to avoid having a full registry system, backend, frontend, etc but why not just allowing Git URLs to give full freedom to developers :) There should be zero friction to create libraries

We could do:

name=ota
depends=github:lukks/crypto, github:lukks/nvs#branch

Also ok if it's just the full URL, but the short prefix is cool which it could even default to GitHub if the name has a slash / e.g. lukks/nvs. And the branch can be used to set a specific version #v1.0.0

Also, all this improves the indexing process because there is none, so when someone pushes new changes they're instantly released. Fine to have a small cache

Describe the current behavior

The library specifiction on the depends key forces to use published libraries:

https://arduino.github.io/arduino-cli/1.0/library-specification/#libraryproperties-file-format

In contrast, the CLI allows to use Git URLs:

https://arduino.github.io/arduino-cli/1.0/commands/arduino-cli_lib_install/

Arduino IDE version

1.8.19 (old snap version)

Operating system

Linux

Operating system version

Ubuntu 24.04 (Noble)

Additional context

For example, ESP-IDF allows doing this idf_component.yml

dependencies:
  crypto:
    git: https://github.com/lukks/crypto.git
  nvs:
    git: https://github.com/lukks/nvs.git

So we don't have to be publishing libraries to all registries 😅

I'm almost willing to drop Arduino IDE support on my new libs to avoid having to support different platforms, just because I don't want to contribute to the problem. I will probably end up publishing them anyway haha because other people are used to it as in using the IDE and just selecting the lib

The Arduino IDE has ESP-IDF built-in so another idea is that it should read the corresponding existing idf_component.yml to download dependencies from there! I think this idea is even superior if the selected chip is from Espressif e.g. ESP32. This could fix the problem when at least developing on ESP chips

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions