Skip to content

Latest commit

 

History

History
59 lines (33 loc) · 3.03 KB

CONTRIBUTING.md

File metadata and controls

59 lines (33 loc) · 3.03 KB

First of all, thank you for trying to contribute goby, any contribution will be appreciated 😁

The following is the guideline (not rules) for contributing goby, I suggest you read them all before you start your contribution.

If you are very interested in Goby or planning contribute Goby frequently, please contact me directly.

What to contribute

  • Any issues you see, and if you think the ticket is confusing, please open an issue or ask me on slack.
  • Any grammar error in readme, wiki, and code comments...etc.
  • Any issues litsted in goby's codeclimate.
  • Play around goby and report any bug you find.
  • Write benchmarks for goby (we really need this and really haven't have time to do it yet 😢)
  • Help us document built in class and libraries' api, see the guideline

If you're interested in lexeing/parsing, please check token, lexer, ast and parser packages

If you're interested in compiler, check bytecode specifications and bytecode package's tests for some compiled examples.

If yor're interested in VM's structure, please contact me directly since a lot things haven't been documented yet.

If you're a Ruby developer:

  • you can start with adding methods to built in classes like Array or Hash using Golang. And here's a guideline for contributing built in methods.
  • you can also porting Ruby's standard lib using Goby (not Go), see lib directory. You'll feel like you're just writing plain Ruby 😄

If you want to propose a feature, just open an issue with [feature request] prefix on title.

Note:

  • Before sending PR, you should perform make test on the root directory of the project to perform all tests (go test works only against goby.go file and will be incomplete for the test).
  • DB library tests requires Postgresql to be opened and export port 5432

Setup Environment

$GOBY_ROOT

By default Goby finds standard libs in /usr/local/goby when you install it via homebrew. But if you want to develop Goby or you installed Goby from source, you might want to set $GOBY_ROOT to Goby's project root so you can use latest libs. Add the following line to your shell config file, either ~/.bashrc, ~/.bash_profile, or ~/.zshrc if you're using zsh.

export GOBY_ROOT=$GOPATH/src/github.com/goby-lang/goby

The most common messages you'll see if you do not set $GOBY_ROOT right are 'library not found'. For example:

require 'net/http'
# => Internal Error: open lib/net/http/response.gb: no such file or directory