Skip to content
Iulian (not Lulian)
Go back

ScalaSphere impressions

One of the best Scala conferences of past year just happened. Here are my impressions.

ScalaSphere was, hands-down, the Scala conference where I watched the most talks in the past few years. The energy and excitement were real and I’ll summarize my main impressions in this blog (fully aware that I can’t do justice to the whole atmosphere, vibe and Polish hospitality). If you want my advice, book early for next year’s session!

Back in September 2015 I deplored the state of Scala tooling and the little attention they gather in most Scala conferences. Probably trying to prove me wrong, the good people of VirtusLab decided to organize a full conference dedicated to Scala development tools. Meet ScalaSphere: 2 days, single track, finishing off with a Hackathon for your favorite tool! There were 180 registrations, and I think the first morning saw the full bunch, with a few standing-room talks.

IDE and No IDE

It’s only fair to start with the elephant in the room: IDEs. Whatever your favorite IDE is, you’d agree that they have evolved greatly in the past few years (caveat: I’m biased). All major IDEs were present: Pavel Fatin represented the IntelliJ platform, Sam Halliday and Rory Graves for Ensime, and Wiesław Popielarski for Scala IDE.

NO-IDE

No Scala IDE showdown is complete without the no-IDE camp, and we had a great lightning talk by Dave Gurnell showing how to get by without an actual IDE: a capable editor, bookmarks for documentation (downloaded locally for your low-latency pleasure), application launcher, Dash and grep is all you need!

Web-based (hosted) IDEs made an appearence via Rory’s lightning talk: Scalanator is a training platform based on Code Mirror and Ensime meant at bringing a hands-on approach to Scala schooling: code directly in the browser and get quick feedback on your progress. My personal take on Web-based IDEs: they couldn’t produce a killer feature yet, but could be useful in certain segments, such as training or code review. Training is particularly appealing, as zero-hassle setup is paramount and projects are small and self-contained.

Scala Refactoring

scala-refactoring is one of the oldest Scala libraries in tools-space and powers both the Eclipse plugin and Ensime. It is based on the presentation compiler, so in principle it should have access to the most precise type information possible under the sun. Unfortunately, it is plagued by many bugs that trace to a common source: Scala type-checker desugarings. Mathias Langer has done an amazing job in the past year by squashing bug after bug, marking the best refactorings we’ve ever had in Scala IDE for a while.

In his talk Matthias highlighted the difficulties and challenges in working with the presentation compiler. His verdict: we need a common model for Scala source that is close enough to surface syntax (concrete syntax) and put an end to error-prone and incomplete heuristics when printing trees and un-desugaring them.

Scala.Meta will save us all!


Scala.Meta

The first day was definitely under the sign of scala.meta, so Eugene gets a full section. Scala tooling is sufferring greatly from the lack of reusable tools. The Scala compiler itself (via the presentation compiler) has severe shortcomings that appeared in all talks except Pavel’s (IntelliJ decided to write their own type-checker):

Eugene’s work is the holy grail of Scala development tools: a single model for Scala code, based on concrete syntax trees suitable for source transformations, with semnatic information (notably, types). The project is still under heavy development, but it can already handle purely syntactic tasks (such as automatic formatting). Next step: converters from existing type-checkers (think: different versions of the Scala compiler, Dotty, IntelliJ) to the new lingua-franca of the Scala world!

This last step proved to be problematic, and Eugene’s talk, and the later brainstorming session — more about that later — have toned down our expectations. We can summarize this as “there is no magic”: the first point makes a come-back: the converter needs to solve exactly the same problem as all tool writers, and there seem to be fundamental limitations in what can be achieved. A couple of ideas:

// type: (File, String) => String
def readFile(f: File, encoding = "UTF-8"): String = //...

// a sane invariant is that
// Apply.args.size == Apply.fun.type.params.size
// but typing the sugared application has only one argument
readFile(new File("README.md"))

En bref, hope is still there, but Eugene has some tough work ahead. The whole community counts on it and needs it.


An ad-hoc brainstorming session

As the first day drew to a close and my tired brain was dreaming of a beer to wash it all out, there was “one more thing” to be done: since all Eclipse plugin developers were under the same roof, we’d have a planning session.

What happened instead became the highlight of this conference: we had an all-hands meeting with practically all tool authors in the same room! IntelliJ, Ensime, Scala.Meta, Eclipse, Scala Refactoring and even Dotty were up to some serious brainstorming for the greater Scala good!

It all stated with the stringent problem of Scala refactorings: how can we improve their reliabilty, in the short-term and the long-term?

This should be the subject of a whole post in itself (hopefully a joint one), suffice to say: there’s some cool stuff coming out, and the Free Monad might be part of it (this is Karma)!


Other tools

What else? Sbt had a couple of appearances, but unfortunately I missed Nepomuk’s talk so I can’t speak conclusively about auto-plugins.

Coursier is a library for dependency fetching entirely written in Scala that aims to fix Sbt. It’s easy to use programmatically, it’s really fast, and has an Sbt plugin. Keep an eye on it, it may solve one of the main complaints against Sbt: slow resolution.

Simon Ochsenreither talked about challenges in cleaning up the Scala specification and its corresponding implementation, focusing on two corner cases: automatic import of java.lang._ and numeric promotions. A good primer on language design and the challenges of maintaing compatibility but evolving the language. At this point in Scala’s evolution my personal take is that compatibility is, in the vast majority of cases, a more worthy goal than purity.

Simon Schäffer’s talk on an uber-platform to supersede them all was an ambitious overview of our field and the futile cycle of innovation and reinvention of the wheel. Thought provoking, and the kind of ambitious talk that gets one dreaming of a better future. Personally I’m not sure if I like the perspective of a single tooling platform for everyone (.NET tried and got the closest to that goal). Watch it for yourself once talks are online!

Lukas Wegmann showed a pretty awesome search tool: a Hoogle for Scala. Search Scala libraries for a specific type! Say, you need to get from a sequence to a set? type in Seq[A] => Set[A] and let Scala Search answer that for you. If we can have it index most popular Scala libraries this will become indispensable. Even better, this should integrate with IDEs and suggest completions based on the type context (something we actually had but fell into oblivion once the author graduated).

Honorable mention

Rapture is a library for everyday Scala programming. It has nothing to do with Scala tools, as noted by Haoyi Li, but Jon did a great job at showing clear use-cases, elegant APIs and sense of humor! Watch it when its out, especially if you deal with i18n. I’d definitely give it a go in my next project.

Not watched

I missed a few talks during the second day, so appologies for not covering “Play-Swagger: Swagger support for the Play Framework” and “Custom deployments with Sbt plugins and sbt-native-packager”.


Panel: In the wind of change

Unfortunately, the panel had only nice people so no controversial, outrageous claims that lead to a heated discussion! Something to be fixed next year! Sbt came up several times, with everyone trying to be nice and look at the “good parts”. Definitely, Sbt should have been represented at this conference.


Conclusion

The conference was fantastic, and I will definitely return. The whole conference was organized in a very short time, and understandbly missed important pieces of the ecosystem (such as Sbt) whose main authors live across the ocean. All in all, a great success, and kudos to VirtusLab for a great job!


Share this post:

Previous Post
Abstracting exception handlers in Scala