Skip to content

Commit a2bd47a

Browse files
committed
Include blog on Scala LSP meeting
1 parent b42c511 commit a2bd47a

File tree

1 file changed

+187
-0
lines changed

1 file changed

+187
-0
lines changed

blog/_posts/2018-02-14-tooling.md

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
---
2+
layout: blog-detail
3+
post-type: blog
4+
by: Jon Pretty
5+
title: "Towards A Brighter Tooling Future for Scala"
6+
---
7+
8+
# Towards A Brighter Tooling Future for Scala
9+
10+
Scala has, for its entire existence, been on the back foot with its tooling
11+
support. This was true when the language first arrived in 2004 as little more
12+
than a command-line compiler, through 2010 when Typesafe's (now Lightbend's)
13+
push for commercial adoption took an early focus on improving the Scala IDE for
14+
Eclipse, through to today, as the tooling experience is very much improved
15+
thanks in part to the work of JetBrains on IntelliJ, but still lags behind the
16+
tooling support some other languages enjoy.
17+
18+
People care about language tools, and it says a lot for Scala that its success
19+
has come without ever having had the best tooling. But a better development
20+
experience in other languages has always made their grass seem greener, and
21+
over the years has undoubtedly limited the adoption of Scala.
22+
23+
Now, in 2018, there have been some developments primarily outside of the Scala
24+
community which present an new opportunity to change that.
25+
26+
## The Language Server Protocol
27+
28+
The language server protocol (LSP) initiative, started by Microsoft, but
29+
already seeing wide adoption, is a language-agnostic protocol for allowing
30+
tools which consume information about code ("clients", such as IDEs) to
31+
communicate with compilers and other tools which can provide that information
32+
("servers", or as the protocol describes them, "language smartness providers").
33+
The LSP proposal has had early successes and has collected a lot of momentum
34+
behind it. So it's no surprise that there's already a lot of enthusiasm within
35+
the Scala community around the idea.
36+
37+
During discussions in the last Scala Center Advisory Board meeting, one of the
38+
Scala Center sponsors proposed that the Scala Center could support the
39+
initiative, so we scheduled a meeting in January to get the ball rolling.
40+
41+
With a many players from both commercial and open-source backgrounds already
42+
involved in tool development for Scala, we wanted to make sure that all the
43+
developers who had already contributed significantly to Scala's tooling could
44+
attend, but without having so many attendees as to make the meeting
45+
unmanageable. So we privately invited about fifty people, mostly suggested by
46+
the Advisory Board members.
47+
48+
This "closed doors" approach for the initial meeting was a practical
49+
compromise, made just for this one-off meeting. There are certainly other
50+
people in the community who have contributed to tooling who didn't get the
51+
chance to attend. To those we overlooked: sorry! we certainly want to include
52+
everyone who cares deeply about Scala's tooling, but it wasn't possible to run
53+
a meeting with more than about thirty attendees.
54+
55+
## The Initial Meeting
56+
57+
The goals of this first meeting were, nevertheless, modest.
58+
59+
Firstly, with a number of different existing Scala tools which could play a
60+
part in Scala's LSP story, almost nobody in the meeting was familiar with them
61+
all, so to get everyone to a common understanding of the ecosystem, the largest
62+
part of the meeting was spent hearing different tool authors speak about their
63+
tools, and how they might play a part in the jigsaw.
64+
65+
Secondly, we wanted to decide upon what our next steps should be, and how the
66+
Scala Center could help the initiative. This was a task of setting up a
67+
framework in which decisions about the Scala LSP initiative could be made in
68+
future, in a way which the majority of people supported.
69+
70+
During the meeting, we heard presentations on
71+
[Scalameta](http://scalameta.org/) and SemanticDB,
72+
[scalameta/language-server](https://github.com/scalameta/metals),
73+
[Bloop](https://github.com/scalacenter/bloop),
74+
[SBT](https://www.scala-sbt.org/),
75+
[Pants](https://www.pantsbuild.org/index.html), [Bazel](https://bazel.build/),
76+
[Ensime](https://github.com/ensime), [IntelliJ
77+
IDE](https://www.jetbrains.com/idea/), [Scala IDE](http://scala-ide.org/),
78+
[Dotty IDE](http://guillaume.martres.me/ide_paper.pdf) (Visual Studio Code),
79+
and [TASTY](http://goo.gl/Mn6EhH).
80+
81+
Another important premise for the meeting was that the tooling should be, as
82+
much as possible, compiler-agnostic. That is to say, we should need to use
83+
a different protocol to work with Scala 2.11 or 2.12 or Dotty, and nor should
84+
users receive a different front-end experience for any Scala-like language.
85+
This support for other compilers is important for two reasons, even though the
86+
vast majority of current users run Scalac.
87+
88+
Firstly, compilers like Dotty and [Rsc] want to hit the ground running with
89+
their tooling support; waiting another decade for a new tooling ecosystem to be
90+
invented is not an option. When the time comes for Scala users to upgrade to
91+
Dotty, nobody wants the additional barrier of having to upgrade their build
92+
tool, documentation tools or IDE at the same time. They want a seamless
93+
transition. That's much easier to achieve by considering other compilers *now*
94+
than would be later.
95+
96+
The second reason is that there is a huge amount of excitement and enthusiasm
97+
around these new compilers, and we want to channel that into the Scala LSP
98+
initiative, and take advantage of the commitment from these other developers to
99+
pull together towards a common goal.
100+
101+
In the meeting we heard representations from the project leads of the Scalac
102+
compiler, Dotty, Rsc and Hydra about any unique features of their compiler
103+
implementations that might have any bearing on the LSP initiative.
104+
105+
We didn't have time during the meeting for much detailed discussion, though the
106+
attendees talked about a number of ideas and concerns around what shape the
107+
initiative should take and how it should proceed. One distinction that was
108+
clear throughout the discussion was the need to separate a Scala implementation
109+
of the LSP (the protocol as described my Microsoft), from a more general "build
110+
server protocol" which would allow for the exchange of other information
111+
specific to Scala-like languages, like dependencies and classpaths, and this
112+
is reflected the main outcome of the discussion.
113+
114+
Minutes for the meeting are available in the
115+
[scalacenter/tooling-working-groups
116+
repository](https://github.com/scalacenter/tooling-working-groups/blob/master/meetings/2018-01-17/minutes.md)
117+
118+
## Next Steps
119+
120+
I made a proposal during the meeting that the next steps should include the
121+
election of two working groups to take forward ideas for an implementation of
122+
LSP for Scala, and a second "protocols" group for defining other non-LSP
123+
protocols for Scala. These groups should have,
124+
125+
- 6-8 members in each
126+
- some overlap in membership between the two groups
127+
- a mix of experts (more experience than free time) and enthusiasts (more free
128+
time than experience)
129+
- diverse representation of a variety of existing projects
130+
- at least one member from the Scala Center
131+
132+
As an open-source project, the dynamics of a disparate collection of developers
133+
is often better suited to innovation than shipping working software by a
134+
deadline, and a large part of the challenge will be to keep everyone on track,
135+
despite the freedom that Open Source grants us. We hope that that leadership
136+
can come from the Scala Center.
137+
138+
## Becoming a Working Group Member
139+
140+
Sitting as a member on either of the working groups is an opportunity to
141+
participate and influence an exciting area of development for Scala, and will
142+
be a position of some respect and privilege. But bootstrapping these groups in
143+
a way that is fair is harder than it might at first seem: the nature of our
144+
initial meeting meant that not everyone could be involved, but we do not want
145+
to exclude anyone from the opportunity to sit on these working groups.
146+
147+
We feel that it is very important to include a combination of experience and
148+
energy in both working groups, so whilst the expertise of their members will be
149+
essential to their success, a willingness to participate and contribute are
150+
also extremely valuable selection criteria, and anyone lacking experience but
151+
having a strong desire to be involved and dedicated to the cause should not
152+
hesitate to seek candidacy: that commitment will be very valuable to the
153+
working groups.
154+
155+
Candidates to the working group should be nominated by opening a pull request
156+
to the [scalacenter/tooling-working-groups
157+
repository](https://github.com/scalacenter/tooling-working-groups), following
158+
the [instructions described
159+
here](https://github.com/scalacenter/tooling-working-groups/blob/master/nominations/README.md).
160+
161+
## Election Process
162+
163+
If the Scala community had a list of its members, we could invite each member
164+
to vote on the working group members, but of course, that's not how the
165+
community works. Equally, we do not want to open an election up to anything
166+
that could be so trivially compromised as an online poll.
167+
168+
We will therefore take an imperfect but pragmatic approach and open voting only
169+
to those members of the Scala community who are willing to devote a small
170+
amount of their time to participating in a series of live votes, conducted
171+
online, which will take place on Wednesday, 28 February at 6pm GMT. Full
172+
details of the process will be published here, soon.
173+
174+
I will be giving a keynote about the future of Scala Tooling at [Scala
175+
Sphere](http://scala.sphere.it/) in April, a large conference in Kraków
176+
dedicated to making Scala developer tools better, now in its third year. I hope
177+
to be making some exciting announcements there about our prospects for vastly
178+
improved tooling support for Scala! Meanwhile, the working groups will have a
179+
challenging task ahead of them, but with a their collective experience, the
180+
energy and enthusiasm Scala's tooling contributors, and the support of the
181+
entire community, we can be more optimistic about that future than ever before.
182+
183+
184+
185+
186+
187+

0 commit comments

Comments
 (0)