Skip to content

lib_compat_mode should impact lib_deps #4666

Open
@MacDada

Description

@MacDada
  • 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

  1. lib_deps: https://github.com/bblanchon/ArduinoJson.git#5.x
  2. #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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions