platformio / platformio/platformio-core
`lib_compat_mode` should impact `lib_deps`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.5k
- Forks
- 905
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 2
Description
- Feature Request.
- PlatformIO Core.
One will say it would be a new "feature", from the other perspective it could be considered bug report :P
PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.7
Description of problem
lib_deps downloads libs, even if they cannot be used with the current lib_compat_mode settings. If the lib_compat_mode settings won't allow to use the lib, there is no point downloading it.
What would be the use case to include an incompatible lib anyway o.O
Steps to Reproduce
lib_deps: https://github.com/bblanchon/ArduinoJson.git#5.x#include "ArduinoJson.h"
Actual Results
The lib is successfully downloaded. The code does not compile.
The lib requires Arduino framework – while I’m trying to use it on native platform, without Arduino framework.
Expected Results
The lib should not have been downloaded. Waste of time, if it won't work anyway.
More info
https://community.platformio.org/t/lib-compat-mode-does-not-make-a-difference-for-lib-deps/32664/1
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
No source files or tests are named. Start by reproducing the dependency setup with lib_deps: https://github.com/bblanchon/ArduinoJson.git#5.x and the native platform without the Arduino framework, then trace how lib_compat_mode is applied during library dependency resolution; done means incompatible libraries are not downloaded while compatible dependencies still are.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100