Good way to share common code between teams

I have an API that I wrote in a PROS project. I want to share it with my sister teams. What are some good approaches to solving this issue? I know that there is manual copying, but that sounds tedious to manage between teams.

The project is hosted in a git repo, but submodules look like a headache. Plus, I have some code in the include folder and some code in the src folder

All of the stuff under the two odometry folders is mine and all of our teams need to use it.

What would be a good way to have this code exist on all of our teams’ projects while also making it easy to update the API?

1 Like
1 Like

You can use PROS’s built-in package management ecosystem.
It is the system that brings you the pros kernel and okapilib, both of which are self-contained packages that can be shared, downloaded, installed, uninstalled, and upgraded.
The documentation is here:
https://pros.cs.purdue.edu/v5/cli/conductor.html
You can create your own libraries this way, by creating a separate project, changing the Makefile flags that make it a library, then run prosv5 make template which will compile the library for you, then bundle the link-able executable and relevant headers into a zip file that can be installed into other projects.
The additional benefit of this is that your api comes pre-compiled, so it cuts down on project compile time, and it can automatically be included in the cold package that lives on the V5 Brain.

For an example, check out my odomDebug library:

3 Likes

That looks a lot simpler to use than submodules, i’ll def check that out. Thank you!