PlatformIO Community

Setting dependency via URL does not give expected results

I’m trying to set out library’s dependency to a specific one via the download url, pointing to a git repo. This repo is a fork with some added features.

Now, the repo that is being downloaded is the standard one and not the one from the url.

These are our dependencies, see the last one:

  "dependencies": [
    {
      "owner": "me-no-dev",
      "name": "AsyncTCP",
      "version": "*",
      "platforms": ["espressif32"]
    },
    {
      "owner": "me-no-dev",
      "name": "ESPAsyncTCP",
      "version": "*",
      "platforms": ["espressif8266"]
    },
    {
      "name":"Ethernet",
      "url": "https://github.com/maxgerhardt/Ethernet.git",
      "platforms": ["espressif32"]
    }
  ]

changing the name doesn’t work because the library is called that way and gives an error if changed. Leaving the name out is not compatible with platformio.

See the build output:

Library Manager: Installing Ethernet
Library Manager: Warning! More than one package has been found by Ethernet requirements:
 - arduino-libraries/Ethernet @ 2.0.0
 - mbed-wiznet/Ethernet @ 0.0.0+sha.ee0f7508fb5c
 - mbed-jbenamy/Ethernet @ 0.0.0-alpha+sha.3745a5a88226
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
Library Manager: Ethernet @ 2.0.0 has been installed!

the lib that is actually downloaded is NOT the one from the url. I guess it’s the standard Arduino Ethernet library.

Also tried this:

    {
      "name":"custom-Ethernet",
      "repository": {
        "type": "git",
        "url": "https://github.com/maxgerhardt/Ethernet.git"
      },
      "platforms": ["espressif32"]
    }
Library Manager: Installing custom-Ethernet
Library Manager: Warning! Could not install dependency {'name': 'custom-Ethernet', 'repository': {'type': 'git', 'url': 'https://github.com/maxgerhardt/Ethernet.git'}, 'platforms': ['espressif32']} for package 'eModbus'    

Got it, I have to specify the version and not the url.

You may delete this topic. It’s in the docs.