Open nicklasb opened 5 months ago
@ivankravets Not sure about the labels here, wouldn't this be some kind of bug?
I think I have a related bug too:
I have 2 envs, one for esp32 and an other for native. I'm using the native env for testings by generating an executable for my pc. In lib/ I have a library named lib/platform-native and an other named lib/platform-esp32 Inside platform-esp32/library.json I have "platforms": "espressif32", "frameworks": "espidf",
And in platform-native/library.json I have "platforms": "native", "frameworks": "*", "dependencies": { "armmbed/mbedtls": "^2.23.0" }
Each env have a lib_deps= platform-esp32 or platform-native
When I build the native env, I see mbedtls being pulled and compiled. The problem is that for esp32 I have the same behavior. I see that it ignored platform-native, but why does it pick mbedtls? (for the esp32 I'm using the mbedtls from espidf, and I see it being compiled too)
Now the weird part: If I change the syntax of platform-native/library.json like so: "dependencies": [ { "name" : "armmbed/mbedtls", "version" : "^2.23.0", "platforms" : ["native"]} ]
I get a warning that mbedtls dependency is ignored! (Warning: Ignored 'armmbed/mbedtls' dependency for 'platform-native' library)
I think something is wrong in the dependency management of libraries.
For now I removed the dependency from library.json and put it in the env directly
What kind of issue is this?
[ ] Question. This issue tracker is not the place for questions. If you want to ask how to do something, or to understand why something isn't working the way you expect it to, use Community Forums or Premium Support
[ ] PlatformIO IDE. All issues related to PlatformIO IDE should be reported to the PlatformIO IDE for VSCode repository
[ ] Development Platform or Board. All issues (building, uploading, adding new boards, etc.) related to PlatformIO development platforms should be reported to appropriate repository related to your hardware https://github.com/topics/platformio-platform
[ ] Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.
[X ] PlatformIO Core. If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: MacOS
PlatformIO Version (
platformio --version
): 6.1.16a1Description of problem
Similar to https://github.com/platformio/platformio-core/issues/4338 , dependencies of my library is being installed even though I have specified on what platforms they should be installed for.
Steps to Reproduce
Source file to reproduce issue: N/A