Skip to content

mbed-cli can clone mbed-os.lib more than once #472

Closed
@wdwalker

Description

@wdwalker

As a creator of an mbed library that people can add to their projects, I want to be able to build and test my library against mbed-os. To do so, I put an mbed-os.lib file in my top level directory so that mbed-cli will clone mbed-os when I do an "mbed import" of my library.

However, the presence of the mbed-os.lib file in my library wreaks havoc on projects that import my library. The reason is that mbed-cli seems to recurse through directories looking for *.lib files. So, the presence of mbed-os.lib in my library will end up with mbed-os being cloned twice by an app that uses my library: once for the app's own mbed-os.lib and again for my libraries mbed-os.lib.

I'm not sure how to fix this. I'm looking at using the solution outlined in http://stackoverflow.com/questions/229186/os-walk-without-digging-into-directories-below. I've coded this up but haven't tested it yet. If I can get this to work, and the mbed-cli maintainers agree this is a valid request, I will do a pull request.

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