modm-io / lbuild

lbuild: a generic, modular code generator in Python 3
https://pypi.org/project/lbuild
BSD 2-Clause "Simplified" License
37 stars 12 forks source link

lbuild repository glob #70

Closed kikass13 closed 3 years ago

kikass13 commented 3 years ago

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 https://github.com/modm-io/modm/issues/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:

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?

kikass13 commented 3 years ago

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

salkinium commented 3 years ago

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

salkinium commented 3 years ago

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