modm-io/lbuild

lbuild repository glob

kikass13 opened this issue · 3 comments

Hi,

this came up a long time ago (I know that @rleh is against this, but I dont really know why).

lbuild (mainly the project.xml parser) should have the option to glob lbuild repositories from a given path.

@salkinium mentioned his fancy modm-io/modm#285 modm project template, which we implemented (separately) a long time ago for ourselfs.

It basically separates the project from the external library dependencies via git submodules.

Some of our firmwares look like this now:

  • my_firmware
    • app/
      • main.cpp
      • project.xml
      • ...
    • libs/
      • modm
      • erpc_modm
      • lely_modm
      • etl_modm
      • eigen_modm
      • ourOwnInternalLib_modm
      • randomStuff_modm
      • ...

and keeping track of those (nasty) libs is not only a nuisance, but redundant as well, because our project.xml has to keep track of those dependencies ... which git submodules do for us anyways.

I would suggest a simple fix for my problem:

<repositories>
   <glob>
     <path>../libs/*/repo.lb</path>
   </glob>
 </repositories>

Can I introduce this an give a PR or are there any relevant use cases aganst it?

  • This does not impede modm / lbuild in any way
  • it is simply reducing redundandy
  • it is optional
    • is doesn even have to be documented as an A* feature

see diff of my feature branch and the current develop branch of lbuild:

https://github.com/modm-io/lbuild/compare/develop...kikass13:lbuild_glob_repositories?expand=1

I like it, I think this is a very good idea!

I need to get the template working again, GitHub already fixed the submodule thing a while ago.