platformio / platformio/platformio-core
Sharing dependencies across environments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.5k
- Forks
- 905
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 2
Description
What kind of issue is this?
- [*] Feature Request.
Configuration
Operating system: Windows 11 Pro
PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.4
Description of problem
Hi, I was wondering if it is possible to create a feature to allow sharing dependencies across environments. I have a project with several dependencies with the same version and they end up getting downloaded multiple times.
Steps to Reproduce
pio run
Actual Results
The above command will create:
.pio
'-libdeps
'-env1
`-ArduinoJson
'-env2
`-ArduinoJson
Expected Results
Something like:
.pio
'-libdeps
'-env-shared
`-ArduinoJson
If problems with PlatformIO Build System:
The content of platformio.ini:
[env]
platform = nordicnrf52
board = adafruit_feather_nrf52840
framework = arduino
lib_deps =
bblanchon/ArduinoJson@^6.19.4
[env:env1]
[env:env2]
Source file to reproduce issue:
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional info
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied platformio.ini and run pio run to reproduce the duplicate .pio/libdeps/env1 and env2 directories. Trace the PlatformIO Core build-system and dependency-resolution entry points responsible for environment-specific library installation. Done means identical dependencies can be shared across environments without breaking either build, with coverage for the shown env1/env2 configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100