[ros-users] [Discourse.ros.org] [ROS Projects] Best practice on maintaining a repository

Daniel Reuter ros.discourse at gmail.com
Tue Dec 13 19:21:52 UTC 2016




First of all I wanted to mention, that your project really looks fantastic and your attention to detail when it comes to documentation is very impressive. Big Thanks, I would have really loved to have those resources when I was in school learning how to build a robot.

But to answer your question: Neither way is perfect. As mentioned in the previous comment having all parts separated makes it easier to swap out a component. But in my experience it can be quite painful to maintain a bunch of repositories, that are dependant on each other.

This is mainly due to the fact, that you need to track, which versions of one repository will work with another repositories version. In the past I relied mostly on syncing them by time and making sure, that the current master branches will work together. As ROS currently does not have a method for resolving versions (e.g. with semantic versioning) other then the main distributions (indigo, jade, etc.) it can be very difficult to deal with the introduction of a breaking change in one of your repositories.

If you put your project in one repository you can make sure, that every commit on master is in a consistent state, where all components work well together. There are other solutions for that, like for example git subrepos, but they are often more complicated. Also code sharing between different platforms is way easier when they are in the same repository.

Also if somebody wants to add a new platform/hardware they can fork your repository and maybe even merge it back, which would allow you to see, whether a new feature breaks a different platform (I would only do that, if the new platform would be adopted by several people, otherwise just forking would definitely suffice, adding the benefit that your changes wouldn't necessarily break other platforms, as somebody could choose whether to upgrade).


So in conclusion: If you want to share code between the platforms, or there are currently dependencies between repositories it would make sense to switch to a monorepo. If the code in each repository is completely independent of each other it makes sense to put them in different repositories.






---
[Visit Topic](https://discourse.ros.org/t/best-practice-on-maintaining-a-repository/959/3) or reply to this email to respond.




More information about the ros-users mailing list