Top Scala Library on GitHub

What are the top libraries used by some of the most popular Scala projects on GitHub? Based on analyzing 64,562 dependencies

In this post we turned to GitHub on a mission to find out what the most popular Scala libraries out there in the wild are. To answer this question we pulled 64,562 dependencies out of 7,321 of the most popular Scala repositories. This resulted in 5,627 unique libraries that these projects use, and we’re excited to share the top 100 with you today. Our next mission would be to benchmark beer consumption by brewery in Scala meetups. Well… maybe some other time.

With resemblance to the previous research we’ve done with Java libraries on GitHub, apart from the usual suspects, there are many interesting new trends showing up. We also compared the stats to the last round of results we pulled out about a year and a half ago. Now, let’s have a first look at the results and insights we’ve found.

The Top 20 Scala Libraries

Top 20 Scala Libraries

Data by Takipi

The Main Insights From the Top 100 Libraries List

(The full results are available right here)

1. The Scala ecosystem is moving fast. Super fast. 33 new entries to the top 100 list – Compared to our last analysis with Scala on GitHub, about a third of the list has changed. This tells us that apart from Typesafe’s frameworks, the community is alive and kicking, with tools like Scala.js and libraries like Shapeless.

2. Spark blows Hadoop out of the water – Unlike in Java where we have a flip version of this, Spark ranked at #45 and Hadoop at #95. Spark really made it big here, being a new addition to the top charts.

3. Play Framework is getting bigger coming up at #3 – This one is kind of amazing: 21.3% of the top Scala projects use Play as their framework of choice.

4. JavaScript <3 Scala – Compared to a year and a half ago, JavaScript-related libraries have taken many spots on the top chart by storm. Scala.js, the Scala to JS compiler is no longer experimental and it shows on the charts (#64). Other sbt plugins by Typesafe like jshint (#47), rjs (#44) and even CoffeeScript (#48) got in the top 50.

5. IntelliJ is the most popular Scala IDE – With the Eclipse and IntelliJ sbt plugins (sbteclipse-plugin and sbt-idea), we have here a chance to see that IntelliJ (14.3%) overtakes Eclipse (13.5%) as the favorite IDE by GitHub’s top Scala projects. These results are partial but give a good sense as to where the wind blows.

Find the Crap in Your Java App

Show me how >>

Fred

And… The usual suspects

1. 21 of the top libraries come from Typesafe – No surprises here, Typesafe’s team is contributing the most across projects like Akka, Play, Slick, sbt and core integrations with Scala.

2. Akka is strong at #9 – This time around we saw Akka in use by 857 projects, placing it in the top 10. If you haven’t had a chance to give it a go yet, here’s a great post implementing Romeo and Juliet as… Akka Actors of course.

3. Scalatest and junit lead the charts – Similar to Java, testing is huge in Scala. Scalatest takes the top of the chart with 2,521 projects (34.4%), and junit coming in on second with 1814 projects (24.8%). Flipping seats compared to last time, where junit was at the top. Many more testing and mocking libraries found their way to top spots on the chart.

4. Logback is the most popular logging library for Scala – Coming in at #5 and in use by 16% of the projects, Logback is definitely the top pick for Scala developers. The runner up is log4j with 4.9% coming in at #36.

5. Java Guava vs Scala Guava – Being one of the most popular libraries in Java, Google Guava which ranked at #4 in the Java version of this research, is down at #37 in Scala.

6. Scalaz is the Scala Guava – The extension to Scala’s core with additional functional programming constructs is in the top at #18.

7. H2 is the most popular database on the top 100 list – Coming in at #21, H2 outranked MySQL (#33), and PostgreSQL (#50). MongoDB didn’t make the list for Scala.

8. Jetty is more popular in Scala than in Java – On the results we drew from the Java projects on GitHub, Jetty came in at #66. While originally built for Java, we’re seeing that it’s more popular in Scala coming in at #26.

5 more entries worth mentioning

#27 – Bintray-sbt An sbt interface for publishing and resolving Bintray packages.

#60 – Paradise A plugin for several versions of Scala compilers. It is designed to reliably work with production releases of scalac, making latest macro developments available way before they end up in future versions Scala.

#65 – Webjars Client-side web libraries (e.g. jQuery & Bootstrap) packaged into JAR (Java Archive) files.

#81 – Shapeless A type class and dependent type based generic programming library for Scala.

#92 – sbt-ghpages gh-pages support for the sbt projects, allowing to host static websites on GitHub.

Top 100 Libraries by Type

Total Scala Library Imports by Type

Data by Takipi

To get a better sense of the the types of libraries that gather the most attention from the Scala community, we’ve plotted the top 100 by type and their number of uses in GitHub’s most popular Scala projects.

How did we find these numbers?

Let’s add some context to the stats: For starters we’ve pulled out as many Scala projects as we could from GitHub by stars. In the second step we extracted the ones that use either Maven or sbt for dependency management to gain quick access to their dependencies, this left us with 7,321 projects. Now that we had thousands of dependencies at hand, we crunched the data and got a total of 64,562 records of libraries in use with 5,627 unique libraries at hand. This means the average GitHub project in our dataset uses 8.8 external libraries. To make the analysis easier, we processed the stats for the top 100 libraries by the number of GitHub projects in which they appear, and added some classification by the type of library just for the heck of it.

The raw data is available right here and you’re welcome to take a look and make sure we didn’t miss any interesting insights.

And what about the top tools Scala developers use?

We’ve got you covered right here:
The Top 15 Tools Developers Use After Major Releases
How to See the Variable State That Leads to Error in Production

Seeing anything that we missed in the data? Please let us know in the comments section below.

email
Some kind of monster @ OverOps, GDG Haifa lead.
  • masgui

    Hey guys excellant post. Take a look at: github.com/metadoc and scala-ecosystem.herokuapp.com.

    • http://www.takipi.com/ Alex Zhitnitsky

      Thanks @masgui:disqus! Awesome visualization