question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LDF only downloading some of the dependencies listed in library manifest

See original GitHub issue

Description

My project has 1 library specified in lib_deps, and that library has another 20+ dependencies listed in its library.json manifest. However, only 3 of those dependencies are being automatically downloaded by Library Dependency Finder.

To Reproduce

  1. Create a new project from PIO Home->New Project, and select the board EnviroDIY Mayfly.
  2. Replace the contents of platformio.ini with the following, and save it: [env:mayfly] platform = atmelavr board = mayfly framework = arduino lib_deps = EnviroDIY_ModularSensors@0.25.1 lib_ldf_mode = deep+ lib_ignore = RTCZero build_flags = -DSDI12_EXTERNAL_PCINT
  3. Click Build.

Results

  • When you save the ini file, LDF installs only the following into .pio\libdeps\mayfly: EnviroDIY_ModularSensors and 3 of its dependencies. They happen to be the first 3 dependencies listed in that library’s manifest.
  • When you build, it fails with the error: In file included from .pio\libdeps\mayfly\EnviroDIY_ModularSensors\src\modems\DigiXBee3GBypass.cpp:11:0: .pio\libdeps\mayfly\EnviroDIY_ModularSensors\src\modems\DigiXBee3GBypass.h:37:27: fatal error: TinyGsmClient.h: No such file or directory

Expected Behavior

  • LDF installs EnviroDIY_ModularSensors as well as all 23 of its dependencies.
  • Build succeeds.

Notes

I can avoid the problem by downgrading the IDE as follows:

  1. Downgrade the PlatformIO IDE extension to v2.1.0 or earlier.
  2. Close VSCode.
  3. Delete the .pio folder.
  4. Reopen the project in VSCode.

Then, LDF downloads all dependencies as expected. Any newer version of the extension, including 2.2.0, produces the condition described above, under Results.

My Environment

PlatformIO Core 5.0.2 PlatformIO Home 3.3.1 PlatformIO IDE extension 2.2.0 VSCode 1.51.0 Windows 10 Pro 64-bit

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SRGDamia1commented, Dec 15, 2020

The invalid library fields are there intentionally, as extra notes for a curious person reading the file. I added “version_note” in cases where the version filed was linked to a specific branch or commit, but I wanted someone to be able to see the version number. In the same way “url” is just a link for a person to look at and “library id”, “note”, etc are all just decoration.

In skimming the code for the LibraryJsonManifestParser, it looks like all the expected fields of the manifest are pulled out by the expected key names so as long as those are present and valid, anything left over should be ignored.

Between version 0.25 and now I added the “owner” field to all of the dependencies. I believe that field is new to pio version 5.

0reactions
mbarneytucommented, Dec 23, 2020

Success! I just tested, after upgrading to the latest dev version (5.0.4b1), all dependencies were properly downloaded for EnviroDIY_ModularSensors@0.25.1, and build succeeds. Thank you all!

Read more comments on GitHub >

github_iconTop Results From Across the Web

LDF dependency downloads are incomplete - PlatformIO IDE
My project has 1 library specified in lib_deps, and that library has another 20+ dependencies listed in its library.json manifest.
Read more >
Why is ClickOnce downloading unchanged files?
The issue is the ClickOnce progress dialog. It always shows the whole size of your application, even it only a single file is...
Read more >
Welcome to the Future of Deployment - CODE Magazine
These file groups will be included in the manifest and copied when published, but will not be downloaded and installed on the user's...
Read more >
Known install issues - BizTalk Server - Microsoft Learn
Configuration fails with a "File or assembly name FileName.dll, or one of its dependencies, was not found" error. Problem An error similar to ......
Read more >
DNN Backup - Release Notes - Evotiva
FIX: Direct backup file downloads could be corrupted on DNN 9.4+ ... ENH - Restore Wizard: Even when not included in the portal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found