platformio / platformio-core

Your Gateway to Embedded Software Development Excellence :alien:
https://platformio.org
Apache License 2.0
7.84k stars 789 forks source link

Library Dependencies in library.json not fetched for pio CI #1074

Closed cujomalainey closed 6 years ago

cujomalainey commented 7 years ago

Configuration

Operating system: OSX 10.12

PlatformIO Version (platformio --version): 3.4.1

Description of problem

Library Dependencies are not fetched when running CI

Steps to Reproduce

  1. Attempt to run pio ci on a library with a dependency section

Actual Results

Dependency is not fetched and dependencies are not met therefore build fails. Installing the library via pio lib install gets the dependent library. https://travis-ci.org/cujomalainey/antplus-arduino/jobs/276188370

Expected Results

Dependencies should be fetched for CI

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:teensy31]
platform = teensy
framework = arduino
board = teensy31

[env:nrf52]
platform = nordicnrf52
framework = arduino
board = nrf52_dk
build_flags = -DNRF52_S132

Source file to reproduce issue: https://github.com/cujomalainey/antplus-arduino

Additional info

ivankravets commented 7 years ago

Thanks! I'll take a look on that very soon! Temporary solution:

platformio ci --lib="." --project-option="lib_deps=ANT" --board=teensy31

See http://docs.platformio.org/en/latest/userguide/cmd_ci.html#cmdoption-platformio-ci-o

r41d commented 2 years ago

Is this platformio lib install file://. command mentioned in any documentation? Cause I didn't see it anywhere and this issue here is the only place I made a find.

ivankravets commented 2 years ago

@r41d I removed my comment. What is your use case? Could you put your dependencies to the lib_deps?

See https://docs.platformio.org/en/latest/librarymanager/dependencies.html

r41d commented 2 years ago

I'm currently in the process of migrating a library (ClusterDuck-Protocol) from dependencies via git submodules to dependencies, this has to be done for both Arduino IDE (library.properties) and PlatformIO (library.json). Basically, I'm inside the library folder and want to fetch alle dependencies that are listed in library.json

ivankravets commented 2 years ago

If you plan to use your library later with the PlatformIO project, PlatformIO will resolve all dependencies. You don't need to install them manually.

Please note that you can "symlink" your library in PlatformIO ( https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_install.html#local-folder ) instead of hard copying.

r41d commented 2 years ago

Thanks for the tip. To better my understanding, would a platform.io like this actually belong in a library? Does the platform.io in my project inherit from it?