Dependencies from private lib disappear after upgrading to Core 5.0.0

After upgrading to Core 5.0.0 all dependencies specified in the library.json file of a private library are ignored and no longer installed on build.

I already changed all references to other private libraries mentioned in the library.json to include a full http specification (in stead of the previously working shortcut of <github_owner>/ ) but the dependency graph is still missing a large amount of libraries

How can I fix this

How did you install them? What is your library.json? Could you provide a simple instruction how to reproduce this issue?

I’m still in the process of finding out what is exactly going wrong (also having loads of “Access denied” messages again when downloading libraries in .cache folder during a build… :face_with_raised_eyebrow: ).

I’ll try to specify what used to work, and doesnt anymore (relevant file contents is below the text)

I have a project, which has a dependency on one of my private libraries named SenseFramework.
The private library SenseFramework has a number of dependencies, both on publicly available projects and on other private libraries of myself.

When i build the SenseFramework library by itself, everything is ok. Dependencies are installed, and it builds without problem.

When I build the main project, the dependency graph it shows looks like this:

Dependency Graph
|-- <SenseFramework> 0.0.1+sha.cf47264
|   |-- <Wire> 1.0
|   |-- <RTClib> 1.3.0
|   |   |-- <Wire> 1.0
|   |-- <SoftwareSerial> 1.0
|-- <RTClib> 1.3.0
|   |-- <Wire> 1.0
|-- <CRC32> 2.0.0
|-- <SPI> 1.0

As you can see im missing a lot of dependencies (i.e. MemoryFree, Sense_Timer, …), which are also not installed on build and therefor the build fails.
Before upgrading to 5.0.0 everything worked fine, and I used this setup for years with no problems

platform.io of my project (partly):

[env]
lib_ldf_mode = deep+
framework = arduino
lib_deps =
https://github.com/I-Connect/SenseFramework

build_flags =
-Werror=return-type

[env:esp32dev]
platform = espressif32@~1.12.0
board = esp32dev
lib_ignore = StandardCplusplus

As you can see, this project has a dependency on one of my libraries called SenseFramework.This library is not published as a package on platformio (and I don’t want to either)

platform.io of SenseFramework:

[platformio]
default_envs = esp32dev

[env]
framework = arduino
lib_deps =
GitHub - I-Connect/Sense_Timer: A fork of Simon Monk's Arduino Timer library
GitHub - I-Connect/StreamDebugger: StreamDebugger allows easier debugging of Serial-based communication on Arduino, like AT command interface in ESP8266, SIM800, SIM900, and other GSM modules
GitHub - sudar/MemoryFree: An Arduino library, that allows you to keep track of the amount of free memory that is available at runtime.
PubSubClient
Adafruit/RTCLib@1.3.0

lib_ldf_mode = deep+

build_flags =
-Wno-write-strings
-Werror=return-type
-DCORE_DEBUG_LEVEL=0
-DDEBUG_SENSE
-DDEBUG_NODEIDS=“26”

[env:esp32dev]
platform = espressif32@~1.12.0
board = esp32dev
lib_deps =
${env.lib_deps}
GitHub - I-Connect/Sense_SPIFFSIniFile: ESP8226 and ESP32 library to parse ini files

test_port = COM3
test_speed = 115200

[env:megaatmega2560]
platform = atmelavr@~1.15.0
board = megaatmega2560

lib_deps =
${env.lib_deps}
https://github.com/I-Connect/StandardCplusplus

[env:ATmega328P]
platform = atmelavr@~1.15.0
board = ATmega328P

lib_deps =
${env.lib_deps}
https://github.com/I-Connect/StandardCplusplus

build_flags =
${env.build_flags}
-Wno-aggressive-loop-optimizations

library.json:

{
“name”: “SenseFramework”,
“version”: “0.0.1”,
“description”: “Hardware independent Arduino framework for working with Observable Nodes, Observers and other generic classes”,
“keywords”: “observable,observer,node”,
“authors”: [
{
“name”: “Bas Schouten”,
“maintainer”: true
},
{
“name”: “Jeroen van de Vorst”
}
],
“repository”: {
“type”: “git”,
“url”: “I-Connect/SenseFramework”
},
“frameworks”: “Arduino”,
“platforms”: [
“espressif32”,
“atmelavr”
],
“build”: {
“flags”: “-Wno-unused-function”
},
“dependencies”: [
{
“name”: “GitHub - I-Connect/Sense_Timer: A fork of Simon Monk's Arduino Timer library”
},
{
“name”: “StreamDebugger”,
“version”: “GitHub - I-Connect/StreamDebugger: StreamDebugger allows easier debugging of Serial-based communication on Arduino, like AT command interface in ESP8266, SIM800, SIM900, and other GSM modules”
},
{
“name”: “MemoryFree”,
“version”: “GitHub - sudar/MemoryFree: An Arduino library, that allows you to keep track of the amount of free memory that is available at runtime.”
},
{
“name”: “PubSubClient”
},
{
“name”: “Wire”
},
{
“name”: “RTCLib”,
“version”: “Adafruit/RTCLib@1.3.0”
},
{
“platforms”: “atmelavr”,
“name”: “StandardCplusplus”,
“version”: “https://github.com/I-Connect/StandardCplusplus”
},
{
“platforms”: “espressif32”,
“name”: “Sense_SPIFFSIniFile”,
“version”: “GitHub - I-Connect/Sense_SPIFFSIniFile: ESP8226 and ESP32 library to parse ini files”
}
]
}

Please file an issue at https://github.com/platformio/platformio-core/issues and put a link to this thread. Thanks!

Created issue Dependencies from private lib disappear after upgrading to Core 5.0.0 · Issue #3649 · platformio/platformio-core · GitHub

2 Likes

Should be fixed in the latest PlatformIO Core 5.0.1-dev. Please re-test with pio upgrade --dev.

Looks like its working, thanks!