Skip to content

Commit

Permalink
Update docs on contributing
Browse files Browse the repository at this point in the history
Problem / Solution

The docs for contributions have gotten a bit out of date and were in
need of some touchups.

RB_ID=868780
  • Loading branch information
kevinoliver authored and jenkins committed Sep 7, 2016
1 parent bb18649 commit 5741396
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 11 deletions.
40 changes: 31 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ We'd love to get patches from you!
We are not currently publishing snapshots for TwitterServer's dependencies, which
means that it may be necessary to publish the `develop` branches of these
libraries locally in order to work on TwitterServer's `develop` branch. To do so
you can run `./bin/travisci` script and pass it an optional
`TRAVIS_SCALA_VERSION` environment variable. For example, the following command
locally publishes all the TwitterServer dependencies built for Scala 2.11.7.
you can use our build tool, [dodo](https://github.com/twitter/dodo).

```
TRAVIS_SCALA_VERSION=2.11.7 ./bin/travisci
``` bash
curl -s https://raw.githubusercontent.com/twitter/dodo/develop/bin/build | bash -s -- --no-test twitter-server
```

We are planning to begin publishing snapshots soon, which will make these steps
unnecessary. If you have any questions or run into any problems, please create
If you have any questions or run into any problems, please create
an issue here, tweet at us at [@finagle](https://twitter.com/finagle), or email
the Finaglers mailing list.

Expand Down Expand Up @@ -57,6 +54,31 @@ Travis CI more useful for development, but for now you don't need to worry if
it's failing (assuming that you are able to build and test your changes
locally).

## Compatibility

We try to keep public APIs stable for the obvious reasons. Often,
compatibility can be kept by adding a forwarding method. Note that we
avoid adding default arguments because this is not a compatible change
for our Java users. However, when the benefits outweigh the costs, we
are willing to break APIs. The break should be noted in the Breaking
API Changes section of the [changelog](CHANGES). Note that changes to
non-public APIs will not be called out in the [changelog](CHANGES).

## Java

While the project is written in Scala, its public APIs should be usable from
Java. This occasionally works out naturally from the Scala interop, but more
often than not, if care is not taken Java users will have rough corners
(e.g. `SomeCompanion$.MODULE$.someMethod()` or a symbolic operator).
We take a variety of approaches to minimize this.

1. Add a "compilation" unit test, written in Java, that verifies the APIs are
usable from Java.
2. If there is anything gnarly, we add Java adapters either by adding
a non-symbolic method name or by adding a class that does forwarding.
3. Prefer `abstract` classes over `traits` as they are easier for Java
developers to extend.

## Style

We generally follow [Effective Scala][es] and the [Scala Style Guide][ssg]. When
Expand Down Expand Up @@ -166,8 +188,8 @@ simplest solution is to create a symbolic link to `sphinx-build2` named
`sphinx-build` somewhere on your path.

Please note that any additions or changes to the API must be thoroughly
described in [ScalaDoc][8] comments. We will also happily consider pull
requests that improve the existing ScalaDocs!
described in [Scaladoc][8] comments. We will also happily consider pull
requests that improve the existing Scaladocs!

[0]: https://github.com/twitter/finagle/pull/267
[1]: https://github.com/twitter/twitter-server/issues?direction=desc&labels=Starter&sort=created&state=open
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ and is being actively developed and maintained.

Browse the [user guide](https://twitter.github.io/twitter-server/).

## Releases

[Releases](https://maven-badges.herokuapp.com/maven-central/com.twitter/twitter-server_2.11)
are done on an approximately monthly schedule. While [semver](http://semver.org/)
is not followed, the [changelogs](CHANGES) are detailed and include sections on
public API breaks and changes in runtime behavior.

## Getting involved

* Website: https://twitter.github.io/twitter-server/
* Source: https://github.com/twitter/twitter-server/
* Mailing List: [[email protected]](https://groups.google.com/forum/#!forum/finaglers)
* Chat: https://gitter.im/twitter/finagle

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ sbtsha128=1de48c2c412fffc4336e4d7dee224927a96d5abc
sbtrepo=http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch

if [ ! -f $sbtjar ]; then
echo "downloading $sbtjar" 1>&2
echo "downloading $PWD/$sbtjar" 1>&2
if ! curl --location --silent --fail --remote-name $sbtrepo/$sbtver/$sbtjar; then
exit 1
fi
fi

checksum=`openssl dgst -sha1 $sbtjar | awk '{ print $2 }'`
if [ "$checksum" != $sbtsha128 ]; then
echo "bad $sbtjar. delete $sbtjar and run $0 again."
echo "bad $PWD/$sbtjar. delete $PWD/$sbtjar and run $0 again."
exit 1
fi

Expand Down

0 comments on commit 5741396

Please sign in to comment.