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

Developer quickstart #2

Open
garrettr opened this issue Sep 16, 2017 · 2 comments
Open

Developer quickstart #2

garrettr opened this issue Sep 16, 2017 · 2 comments

Comments

@garrettr
Copy link

I'm interested in contributing to ricochet-go, but now that I have downloaded the repository I cannot figure out how to build/run it. I'm not very familiar with Go so I'm probably missing something obvious to a more seasoned Go dev, but it'd be great if the README included a short section that gives developers the info they need to get up and running so they can potentially contribute to the project. Something like:

# Developer Quickstart

## Requirements

1. Go <minimum version>
2. <any other requirements for the development environment...>

## Common tasks

1. Build the code: <...>
2. Run the code: <...>
3. Run the tests: <...>

I'm happy to make a PR for this as long as someone can guide me towards a working development environment.

@special
Copy link
Member

special commented Oct 3, 2017

Quick things off the top of my head:

  1. ricochet-go has vendored dependencies, so there's no need to get other dependencies. This repo has everything you need.
  2. You need a sufficiently new go to handle vendoring and some other features. I'd suggest Go 1.8+, but 1.7+ might work too.
  3. You should clone the repository into your GOPATH for best results. By default, that means it should be at ~/go/src/github.com/ricochet-im/ricochet-go. If you build elsewhere, Go may behave differently. You can set $GOPATH to something other than ~/go/ if you need.
  4. You should be able to just cd ricochet-cli and go build. Expected result is a ricochet-cli binary in that directory within a few seconds.
  5. Go binaries are static, so you can do whatever you want with that binary once you have it. It does not need any other files in the repository once it's built.
  6. Run ricochet-cli -help to learn about what it can do, and the help command to see what commands it knows.

A few more important tips about known issues right now:

  1. On first-run, you won't show your own address in status. It's visible in log, or by restarting.
  2. There's no CLI for inbound contact requests, so you can't actually accept them. Outbound should work, but there's a bug where it sometimes get stuck on accept and needs reconnecting before chat will work properly.

And interface tips that might not be obvious:

  1. You'll notice a few letters after the names in contacts. They're taken from the beginning of the contact's address, and you can type those to switch to that contact's conversation.
  2. In the conversation mode (which is clearly marked with a different prompt), you can type / in front of any of the usual commands, including the commands to switch to a different contact's conversation.
  3. To get out of conversation mode, type /close

I'd love to hear if you get things working! And yes, we should definitely turn this into some actual documented build/use instructions (& fix the bugs).

@special
Copy link
Member

special commented Oct 3, 2017

For even more adventurous souls, there's a very prototype-y port of the Qt UI to the Go backend. It's definitely not finished, but it is possible to see contacts, chat, etc. If you want to try that:

  1. Build ricochet-cli
  2. Build ricochet from the go-frontend branch of https://github.com/special/ricochet
  3. Run ricochet-cli -listen 127.0.0.1:51515
  4. Run ricochet from that build

If everything works, you should see the same contacts and chats as the CLI, be able to restart the UI without losing anything, etc.

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

No branches or pull requests

2 participants