Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go, pls stop breaking my editor – Rebecca Stambler
Search
GopherCon Russia
April 13, 2019
Programming
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go, pls stop breaking my editor – Rebecca Stambler
GopherCon Russia
April 13, 2019
More Decks by GopherCon Russia
See All by GopherCon Russia
Go Profiling from Bottom Up - Felix Geisendörfer
gopherconrussia
0
250
Learning Unsung Gotchas of Go - Rashmi Nagpal
gopherconrussia
1
300
Прозрачный gRPC-proxy один-ко-многим - Андрей Смирнов
gopherconrussia
0
170
Из Python в Go и обратно - Андрей Минкин
gopherconrussia
0
180
Оптимизация работы с PostgreSQL в Go: от 50 до 5000 RPS - Иван Осадчий
gopherconrussia
0
210
Пакет embed: распаковка знаний - Илья Данилкин
gopherconrussia
0
280
За пару мгновений до main() - Олег Ковалев
gopherconrussia
0
160
Тестирование в Go c Ginkgo и Gomega - Александр Егурнов
gopherconrussia
0
150
Building an Autoscaling HTTP Proxy for Kubernetes - Aaron Schlesinger
gopherconrussia
0
160
Other Decks in Programming
See All in Programming
JavaDoc 再入門
nagise
0
290
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
160
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.1k
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
220
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3k
AI時代のUIはどこへ行く?その2!
yusukebe
19
6.7k
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
840
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
310
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.7k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
310
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.5k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.1k
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
We Are The Robots
honzajavorek
0
240
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
300
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
820
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
The Pragmatic Product Professional
lauravandoore
37
7.3k
So, you think you're a good person
axbom
PRO
2
2.1k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Documentation Writing (for coders)
carmenintech
77
5.4k
How to Talk to Developers About Accessibility
jct
2
220
Designing Powerful Visuals for Engaging Learning
tmiket
1
400
Transcript
Go, pls stop breaking my editor MOSCOW, RUSSIA APRIL 13
2019 REBECCA STAMBLER
None
None
None
Go,
Go, please stop breaking my editor!
Rebecca Stambler Software Engineer, Google @stamblerre
None
None
None
None
None
My editor isn’t working!
My editor isn’t working! • There are many different editors
and many different features
VSCode Goland Vim
My editor isn’t working! • There are many different editors
and many different features • Many features are slow
My editor isn’t working! • There are many different editors
and many different features • Many features are slow • New Go releases break features
None
My editor isn’t working! • There are many different editors
and many different features
User triggers go-to-definition
User triggers go-to-definition VSCode Go extension
User triggers go-to-definition VSCode Go extension godef
User triggers go-to-definition VSCode Go extension godef
User triggers go-to-definition VSCode Go extension godef VSCode opens file
at the specified position
godef gopkgs go-outline go-symbols VSCode guru gorename gomodifytags goplay Go
extension
godef gopkgs go-outline go-symbols VSCode guru gorename gomodifytags goplay impl
gotype-live gocode gogetdoc goimports goreturns goformat golint Go extension
godef gopkgs go-outline go-symbols VSCode guru gorename gomodifytags goplay impl
gotype-live gocode gogetdoc goimports goreturns goformat golint gotests gometalinter staticcheck golangci-lint revive fillstruct dlv godoctor Go extension
godef gopkgs go-outline go-symbols guru gorename gomodifytags goplay impl gotype-live
gocode gogetdoc goimports goreturns goformat golint gotests gometalinter staticcheck golangci-lint revive fillstruct dlv godoctor
My editor isn’t working! • There are many different editors
and many different features • Many features are slow
Command-line tools
Command-line tools • Most of these tools work on 1
request per process
Command-line tools • Most of these tools work on 1
request per process • The tool has to parse your file and type-check your dependencies EVERY TIME!
My editor isn’t working! • There are many different editors
and many different features • Many features are slow • New Go releases break features
An example
An example: gocode • A tool for autocompletion
An example: gocode • A tool for autocompletion • Go
1.10 broke nsf/gocode
An example: gocode • A tool for autocompletion • Go
1.10 broke nsf/gocode • Fixed in mdempsky/gocode
An example: gocode • A tool for autocompletion • Go
1.10 broke nsf/gocode • Fixed in mdempsky/gocode • And then...Go modules
An example: gocode • A tool for autocompletion • Go
1.10 broke nsf/gocode • Fixed in mdempsky/gocode • And then...Go modules • Resulting in stamblerre/gocode
Takeaways • At this rate, we will have a version
of gocode for every version of Go
Takeaways • At this rate, we will have a version
of gocode for every version of Go • Your tools shouldn’t break when you upgrade
Why did gocode keep breaking?
Why did gocode keep breaking? • When Go changes, tools
change
Why did gocode keep breaking? • When Go changes, tools
change • When go build changes, tools change more
Why did gocode keep breaking? • When Go changes, tools
change • When go build changes, tools change more • Tools copy the behavior of the Go compiler
foo.go
foo.go github.com/stamblerre/foo
foo.go github.com/stamblerre/foo a c b dependencies
None
How will we fix your editor?
How will we fix your editor? 1. Stop tools from
breaking every 6 months
How will we fix your editor? 1. Stop tools from
breaking every 6 months 2. Support a set of features for all editors
How will we fix your editor? 1. Stop tools from
breaking every 6 months
gocode
go/packages gocode
go/packages gocode Which build system am I running in?
go/packages gocode Which build system am I running in? go
1.10 go 1.11 gb go 1.12
go/packages • Reduces the maintenance burden
go/packages • Reduces the maintenance burden • When a new
Go release comes out, fix the driver, not the tools
How will we fix your editor? 1. Stop tools from
breaking every 6 months 2. Support a set of features for all editors
Language Server Protocol A standardized protocol for communication between editors
and language servers
godef gopkgs go-outline go-symbols guru gorename gomodifytags goplay impl gotype-live
gocode gogetdoc goimports goreturns goformat golint gotests gometalinter staticcheck golangci-lint revive fillstruct dlv godoctor
Go language server
gopls
gopls • The Go language server
gopls • The Go language server • Owned and maintained
by the Go team and community
gopls • The Go language server • Owned and maintained
by the Go team and community • Currently in alpha
gopls • The Go language server • Owned and maintained
by the Go team and community • Currently in alpha • Pronounced “Go please”
gopls is faster • All features benefit from caching
gopls is faster • All features benefit from caching •
Completion is noticeably faster (less than 1 ms)
gopls is faster • All features benefit from caching •
Completion is noticeably faster (less than 1 ms) • Remains fast with modules
gopls is extensible • Adding new features is easier
gopls is extensible • Adding new features is easier •
Planned:
gopls is extensible • Adding new features is easier •
Planned: ◦ References, rename
gopls is extensible • Adding new features is easier •
Planned: ◦ References, rename ◦ More diagnostics (lint, custom, etc.)
gopls is extensible • Adding new features is easier •
Planned: ◦ References, rename ◦ More diagnostics (lint, custom, etc.) ◦ Quick fix suggestions
gopls is reliable
gopls is reliable • Testing framework
gopls is reliable • Testing framework • Go team ownership
gopls is reliable • Testing framework • Go team ownership
• Coordination with community
Information To install: golang.org/wiki/gopls
Information To install: golang.org/wiki/gopls To contribute: golang.org/wiki/golang-tools
Thank you • Go team members ◦ Ian Cottrell ◦
Peter Weinberger ◦ Michael Matloob • Go community members ◦ Paul Jolly ◦ Ramya Rao ◦ Billie Cleek ◦ And many more!
None
None
None
Image credits • Gopher image by Ashley McNamara • Fire
extinguisher image via strikefirstusa.com • Icons via flaticon.com, made by Freepik