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

lbuild repository glob #70

Closed
kikass13 opened this issue Oct 6, 2021 · 3 comments
Closed

lbuild repository glob #70

kikass13 opened this issue Oct 6, 2021 · 3 comments

Comments

@kikass13
Copy link
Contributor

kikass13 commented Oct 6, 2021

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
@kikass13
Copy link
Contributor Author

kikass13 commented Oct 6, 2021

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
Copy link
Member

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

@salkinium
Copy link
Member

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

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

No branches or pull requests

2 participants