Skip to content

Contributing to Toast

Jaci R edited this page Jan 26, 2016 · 4 revisions

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.

Step 1: Forking the Repository

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 or myname-hotfix
  • Clone your copy of the repository to your local machine. This is just like any normal git repo.

Step 2: Preparing for Development

To set Toast up, follow these simple steps:

  • Run gradlew build eclipse if you're on the Eclipse IDE, or gradlew 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.

Step 3: Working with Patches

If you're making changes to Toast's Runtime Patches, there are some things you need to know.

Simulation Patches

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

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.

Step 4: Building Toast

When building for Toast, there are some details that you should keep in mind.

Your First Build

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

Future builds can be executed by just gradlew build.

Step 5: Submitting your Changes

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!