Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pio library manager always downloads all libs to .piolibdeps even when building ones from a global storage #1844

Closed
vortigont opened this issue Sep 14, 2018 · 1 comment
Labels
ldf Library Dependency Finder wontfix

Comments

@vortigont
Copy link

Configuration

Linux x64, platformio cli

PlatformIO Version (platformio --version):
PlatformIO, version 3.6.1a4

Description of problem

Even if some libraries are installed in a global storage ( for ex. ~/.platformio/lib)
Platformio library manager always downloads all dependent libs to .piolibdeps project folder.
Building project with --verbose option shows that includes uses global storage libs. So why trashing every project with unused libs copies?

Steps to Reproduce

  1. Install some libs to the global storage
  2. Create project with libs existing in a global storage
  3. Build project

Actual Results

Copies of all libs are downloaded into the .piolibdeps project folder but builder includes libs from a global storage

Expected Results

Do not download redundant libs to the project's folder

If problems with PlatformIO Build System:

The content of platformio.ini:

[platformio]                                                                                                                                                            src_dir = src                                                                                                                                                           env_default = esp8266_stable                                                                                                                                            lib_extra_dirs = ${sysenv.HOME}/dev/libraries                                                                                                                                                                                                                                                                                                   [common]
lib_deps_builtin =
  ArduinoJson
  Time

[env:esp8266_stable]
platform = espressif8266
board = d1_mini
framework = arduino
lib_deps =
  ${common.lib_deps_builtin}

Source file to reproduce issue:

#include <TimeLib.h>
#include <ArduinoJson.h>
void setup() {}
void loop() {}

Additional info

pio lib --global list | grep ID
Library Storage: /home/emil/.platformio/lib
#ID: 64
#ID: 44

 pio run --verbose
Processing esp8266_stable (platform: espressif8266; lib_deps: ArduinoJson, Time; board: d1_mini; framework: arduino)
Library Storage: /mnt/str/dev/testing/piotest/.piolibdeps
Looking for ArduinoJson library in registry
Found: https://platformio.org/lib/show/64/ArduinoJson
LibraryManager: Installing id=64
Downloading...
Unpacking  [####################################]  100%
ArduinoJson @ 5.13.2 has been successfully installed!
Looking for Time library in registry
Found: https://platformio.org/lib/show/44/Time
LibraryManager: Installing id=44
Downloading...
Unpacking  [####################################]  100%
Time @ 1.5 has been successfully installed!
PLATFORM: Espressif 8266 > WeMos D1 R2 & mini
SYSTEM: ESP8266 80MHz 80KB RAM (4MB Flash)
xtensa-lx106-elf-g++ -o "/mnt/str/dev/testing/piotest/src/test.ino.cpp" -x c++ -fpreprocessed -dD -E "/tmp/tmp5n5lR4"
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 32 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ArduinoJson> 5.13.2 (/mnt/str/dev/libraries/ArduinoJson_ID64)
|-- <Time> 1.5 (/mnt/str/dev/libraries/Time_ID44)
xtensa-lx106-elf-g++ -o .pioenvs/esp8266_stable/src/test.ino.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -Wall -DPLATFORMIO=30601 -DESP8266 -DARDUINO_ARCH_ESP8266 -DESP8266_WEMOS_D1MINI -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO=10805 -DARDUINO_BOARD=\"PLATFORMIO_D1_MINI\" -DLWIP_OPEN_SRC -DVTABLES_IN_FLASH -Isrc -I/mnt/str/dev/libraries/ArduinoJson_ID64/src -I/mnt/str/dev/libraries/Time_ID44 -I/home/emil/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include -I/home/emil/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include -I/home/emil/.platformio/packages/framework-arduinoespressif8266/cores/esp8266 -I/home/emil/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include -I/home/emil/.platformio/packages/framework-arduinoespressif8266/variants/d1_mini src/test.ino.cpp

ls .piolibdeps/
ArduinoJson_ID64  Time_ID44
@vortigont vortigont changed the title pio library manager always downloads all libs to .piolibdeps even when using global storage pio library manager always downloads all libs to .piolibdeps even when building ones from a global storage Sep 14, 2018
@ivankravets ivankravets added this to the Backlog milestone Sep 21, 2018
@ivankravets ivankravets added enhancement ldf Library Dependency Finder labels Sep 21, 2018
@ivankravets ivankravets removed this from the Backlog milestone May 23, 2019
@ivankravets
Copy link
Member

Starting from PlatformIO Core 4.0 PlatformIO install libraries into isolated storage per project environment. If you would like to have the one library storage per different projects, please use the same path for http://docs.platformio.org/en/latest/projectconf/section_platformio.html#libdeps-dir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ldf Library Dependency Finder wontfix
Projects
None yet
Development

No branches or pull requests

2 participants