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

Dependencies are being installed regardless of platform in some cases #4926

Open
4 tasks
nicklasb opened this issue Jun 1, 2024 · 0 comments
Open
4 tasks

Comments

@nicklasb
Copy link

nicklasb commented Jun 1, 2024

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.16a1

Description of problem


 "dependencies": [
        {
            "name": "esp_modem",
            "version": "https://github.com/RobustoFramework/Robusto/releases/download/v1.0.0/esp_modem_1.1.0.zip",
            "platforms": ["espressif32"]
        },
        {
            "name": "lvgl/lvgl",
            "version": "~8.3.0",
            "platforms": ["espressif32"]

        },
        {
            "name": "esp_lvgl_port",
            "version": "https://github.com/RobustoFramework/Robusto/releases/download/v1.0.0/esp_lvgl_port_1.4.0.zip",
            "platforms": ["espressif32"]

        },
        {
            "name": "RadioLib",
            "version": "https://github.com/jgromes/RadioLib.git#6.4.2",
            "platforms": ["espressif32"]

        }
    ],

Similar to #4338 , dependencies of my library is being installed even though I have specified on what platforms they should be installed for.

Steps to Reproduce

  1. Use a Native or Arduino platform project
  2. Add a dependency to the Robusto framework
lib_deps = 
    robusto

  1. Let the dependencies install

Actual Results

Several of the above dependencies of Robusto that shouldn't install, are installed: esp_lvgl_port, esp_modem and Radiolib
Intererestingly the lvgl/lvgl library is not installed. It differs by having a short version "~8.3.0".

My possibilities to test different variants is limited as I do not want to upload a hundred versions of the library to the registry..

Expected Results

Only non-platform-specific dependencies should install.

If problems with PlatformIO Build System:

The content of platformio.ini:
I certainly do not hope that the rest of the config interacts with the dependency loading.
The extra script just adds paths, omitted.

[env:attiny85]
platform = atmelavr
board = attiny85
framework = arduino

upload_protocol = stk500v1
upload_flags =
    -P$UPLOAD_PORT
    -b$UPLOAD_SPEED
    -v
upload_port = /dev/cu.usbmodem141201
upload_speed = 19200
board_fuses.lfuse = 0xE2
board_fuses.hfuse = 0xDF
board_fuses.efuse = 0xFF

[env:testing]
platform = native
build_flags = 
    -I/usr/local/include/libelf/
    -L/usr/local/lib/
    -lelf
    -DFIRMWARE_PATH="\"${platformio.build_dir}/attiny85/firmware.elf\""

extra_scripts = post:extra_script.py
platform_packages =
    platformio/tool-simavr
    platformio/toolchain-atmelavr

lib_deps = 
    robusto                                                                        #<<<<< Here it is
    https://github.com/nicklasb/robusto-platformio.git
test_framework = unity
test_speed = 9600

[test]
framework = unity

Source file to reproduce issue: N/A

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

No branches or pull requests

1 participant