-
Notifications
You must be signed in to change notification settings - Fork 12
Contributing to Toast
So you want to help on Toast, huh? That's great! We love contributions. Follow this guide to setup your Toast development environment, and how to make sure Toast works for you.
The first step to development is to fork the repository so you can work on it.
- First, click the 'fork' button at the top of the repository to get a copy on your own Github account.
- Next, create a new branch. This branch is where you'll be applying your changes. Call it something unique and fitting to the purpose, like
myname-feature
ormyname-hotfix
- Clone your copy of the repository to your local machine. This is just like any normal git repo.
To set Toast up, follow these simple steps:
- Run
gradlew build eclipse
if you're on the Eclipse IDE, orgradlew build idea
if you're on IntelliJ. This will setup the Toast Patches and your development environment. - Import the Toast project into your Eclipse Workspace, or open the IntelliJ project as you would with any other project.
If you're making changes to Toast's Runtime Patches, there are some things you need to know.
Simulation Patches are applied when started in a Simulation. This does things like patch the HAL interface to proxy it to a GUI. Simulation Patches are stored in a sub-project under patches/
, but Source Folders are linked directly to your eclipse and intelliJ configurations.
Global Patches are applied at every runtime, simulation or not. This is for things like MotorSafety, where they are stored in a registry for easy de-activation in the event of a Robot failure. Global Patches are stored in a sub-project under patches_full/
, but Source Folders are linked directly to your eclipse and intelliJ configurations.
IMPORTANT: Every time you make a change to a Toast patch, you must run gradlew build generateExternalPatches
. This ensures the patches are compiled and up to date when you build Toast.
When building for Toast, there are some details that you should keep in mind.
If you're building Toast on your local system for the first time, you must run gradlew build generateExternalPatches build
. This builds Toast, applies the patches to the Toast Jar, and reassembles. This is required to ensure patches are present in the Toast Jar
Future builds can be executed by just gradlew build
.
If you want to submit your changes to us here at OpenRIO, simply push your changes to your forked repo and start a new pull request on this repo (Open-RIO/ToastAPI). Our Build Service will ensure your changes are compatible, and if they are, we'll go ahead and merge your changes.
Thanks for Contributing to Toast, we look forward to working with you and seeing the amazing things this community is capable of!