<p>Hi all,</p>
<p>I'm very excited to announce a new episode in the life of the Go plugin for IntelliJ.</p>
<p>About three years ago, Sergey Ignatov and Alexander Zolotov (working at JetBrains back then) started a major rewrite of the plugin that took it to a working state. Since then they've made more than 3000 commits, working day and night and even weekends to make sure that Go programmers have a good experience with the existing plugin.</p>
<p>Back then, the plugin had little over 80K downloads. Now it’s got more than 640K downloads, the Go community is growing at an impressive rate, and there’s a high demand for a better developer experience compared to everything else available. Noting all this, JetBrains has decided to put its full support behind it and create a world class editor which will deliver the same quality and functionality that you may be familiar with in their other IDEs like IntelliJ IDEA, PyCharm, etc.</p>
<p>Today, they've just announced their new dedicated Go IDE codenamed Gogland, which picks up where the open-source plugin left off and introduces a number of changes with many many more to come.</p>
<p>To name a few of these exciting new features:</p>
<ul>
<li>type comparison features
<ul>
<li>go to inheritor structures</li>
<li>go to super interfaces</li>
<li>type based "smart completion"</li>
</ul></li>
<li>extract function refactoring</li>
<li>built-in formatter equal to gofmt</li>
<li>sub-tests support (running, navigation, gutters)</li>
<li>tests debugging</li>
<li>semantic highlighting and parameter name hints</li>
<li>more Inspections and Quickfixes</li>
</ul>
<p>The IDE is currently in private beta and while it's under heavy development, it's already in a very good shape. On my current setup, with a GOPATH of over 7 GB of Go sources only, it takes about 5 minutes to have it fully indexed (a one-time operation). The IDE starts in less than 10 seconds with the project ready to be edited.</p>
<p>If you wish to become an early adopter of the IDE or get more information about it, please go to its dedicated page, <a href="https://www.jetbrains.com/go/">https://www.jetbrains.com/go/</a>. You also have a chance to give the final name for the IDE, so I encourage you to join in.</p>
<p>Finally, I'd like to thank Sergey and Alexander and all the other contributors for all their hard work on this. It's been wonderful to work with them on this project.</p>
<p>Edit: the list of differences between the open-source plugin and Gogland: <a href="https://www.jetbrains.com/help/go/1.0/faq.html#d3e52">https://www.jetbrains.com/help/go/1.0/faq.html#d3e52</a></p>
<p>Kind regards,</p>
<p>Florin</p>
<hr/>**评论:**<br/><br/>m3wm3wm3wm: <pre><p>Intelligo.</p></pre>andradei: <pre><p>IntelliG</p></pre>: <pre><p>[deleted]</p></pre>natefinch: <pre><p>This is not an appropriate comment for this forum.</p></pre>defmacro-jam: <pre><p>[deleted] doesn't even follow JetBrains' IDE naming convention.</p></pre>DeedleFake: <pre><p>And people think that 'Go' is unsearchable. Google won't even care about those brackets.</p></pre>watr: <pre><p>Intelligo sounds like a disease... what about G-UNITelli ?</p></pre>Dummies102: <pre><p>it only affects the gogland though</p></pre>Yojihito: <pre><blockquote>
<p>built-in formatter equal to gofmt</p>
</blockquote>
<p>What was wrong with gofmt that it needed a replacement?</p></pre>dlsniper: <pre><p>The way the IDE works does not allow for a good interaction with gofmt and provide a great development experience.</p></pre>Yojihito: <pre><p>I thought gofmt is a service with an API, you put code in, it gives formatted code out, done. I'm in no way versed with the internals of Jetbrains but every editor (Eclipse, VSCode) I used just included gofmt this way?</p></pre>masklinn: <pre><p>I expect they'd want to keep internal edition state like folds and selection, which is probably easy (or at least possible) if they use the Platform's built-in formatting tools but bordering on impossible if they have to pass raw text to an external tool, plus they'd have to reprocess it for coloration & linting & al.</p>
<p>Also as an other commenter notes, the built-in formatter can be automatically applied to codegen or templates, or to only a subset of the edition buffer.</p></pre>danredux: <pre><p>Curious to hear the reasoning. As far as I know the "go" package and subpackages in std would give you the more fine-grained control over formatting etc, without needing to write a whole parser or anything...</p></pre>masklinn: <pre><p>They have to write a parser either way in order to perform structural analysis & linking (search type/symbol, jump to definition, …), syntax highlighting, suggestions, fixers & refactorings Jetbrains IDEs are known for.</p>
<p>And here again I expect the Platform has a pretty significant set of tools to build a parser integrated with the rest of the system.</p></pre>danredux: <pre><p>I would have thought it would be easier to use the stdlib Go parser to implement all of those things, though? It already parses and tell you what symbols you're looking at, you could very efficiently search the AST, etc. I understand not wanting to exec binaries like gofmt and parse the stdout, that's ugly and slow, but using an existing library to do all the heavy lifting just seems logical to me.</p></pre>masklinn: <pre><blockquote>
<p>I would have thought it would be easier to use the stdlib Go parser to implement all of those things, though? […] using an existing library to do all the heavy lifting just seems logical to me.</p>
</blockquote>
<ol>
<li><p>Parsing is far from "all the heavy lifting", especially for Jetbrains (russian developers apparently say that Jetbrains cooks parsers for breakfast), I'm sure they've got extensive tooling to facilitate that.</p></li>
<li><p>And Go was written specifically to be fast and easy to parse, understand that Jetbrains has their own Swift, PHP, SQL or C++ parsers (in fact IIRC they've got two of that one, as the ReSharper C++ and the CLion teams independently implemented theirs).</p></li>
<li><p>Furthermore the Go parser is written in Go, requiring JNI bindings to CGO bindings to Go, that's a fair amount of complexity for what it is.</p></li>
<li><p>Finally Jetbrains IDEs need lots of deep contextual knowledge of the code for syntactic and flow analysis, code rewriting (refactoring), code generation, and things which just don't make sense in the language parser like <em>language injection</em> where a Go string is parsed and analysed as SQL.</p>
<p>This is all infrastructure which already exists, having been built in the platform over 15 years or so, it "just" needs a parser fitting in.</p></li>
</ol>
<p>Thus writing their own parsers is the most natural course of action, it lets the new system fit right in the platform's ecosystem, and allows them to benefit from improvements to the core platform without a mismatch between an external parser and their own tool.</p>
<p>Plus it gives them freedom of movement, they're not beholden to an external group, though they're paying that in playing catch-up when the language changes.</p></pre>bl00dshooter: <pre><blockquote>
<p>I would have thought it would be easier to use the stdlib Go parser to implement all of those things, though?</p>
</blockquote>
<p>I believe this IDE, like all other Jetbrains products, is written in Java, not Go. </p></pre>dlsniper: <pre><p>I'll reply in more detail in a couple of hours.</p></pre>dlsniper: <pre><p>I think <a href="/u/masklinn">/u/masklinn</a> had a very good explanation above. There's also another reason. Cursor jumping is irritating when having an external program format the source as the IDE can't reuse the position in the file correctly anymore. Moreover, the formatting is done on the fly which means that you rarely will need to format anyway.
Finally, the Platform already offers the tools needed to handle the formatting so it makes sense to use it.</p></pre>uzimonkey: <pre><p>Well it better work <em>exactly</em> like gofmt does. I've had problems with editors wanting to format code one way and stylecops another way and it's just not good. If you're going this route it really does need to behave exactly like gofmt.</p></pre>dlsniper: <pre><p>When it will be released in stable I'm sure it's going to be 100% identical, otherwise JetBrains would not mention it :)</p></pre>natefinch: <pre><p>When they do that, can they publish a spec about what exactly gofmt does? It irks me that there's no written spec for it.</p></pre>dlsniper: <pre><p>I'll pass the question along. We've asked the Go devs a long while ago about a formal spec and the answer was that the spec is in the implementation and that's enough.</p></pre>natefinch: <pre><p>That would be awesome. I totally disagree that the implementation is good enough. If it's not good enough for the language, it seems like it should not be good enough for the standard formatting for the language.</p></pre>onwuka: <pre><p>I sympathize with the thought though. A spec means it is possible that gofmt doesn't confirm to a spec it created (a bug) which would be awkward. Right now whatever it does is the law. </p></pre>natefinch: <pre><p>That has happened with the language itself - where the implementation deviated from the spec. So, you decide which one wins (usually the implementation for backwards compatibility) and then you fix the other one.</p>
<p>It would mean that alternate implementations of gofmt, like the one jetbrains is building, could ensure they match the spec.</p></pre>NikkoTheGreeko: <pre><p>Atom seems to be able to do it just fine.</p></pre>callcifer: <pre><p>Without losing cursor position and folding?</p></pre>NikkoTheGreeko: <pre><p>I haven't noticed any interruptions. Every time I hit save it runs gofmt and I keep working without any hiccup.</p></pre>Mandack: <pre><p>Atom also does not offer the amount of info, refactorings etc. typical JetBrains IDEs do.</p></pre>NikkoTheGreeko: <pre><p>Ok, stay on topic. We are talking about gofmt.</p></pre>cheptsov: <pre><p>the built-in formatter works with selected text and is also applied when code generation.</p></pre>dobegor: <pre><p>Absolutely excited.
Just get HiDPI support on Linux properly (FONTS, fix 'em).
<3</p></pre>XMLHttpWTF: <pre><p>On the latest GNOME, if you up the font-scaling in <code>gnome-tweak-tool</code>, I find the IntelliJ products fine on a 4k screen.</p></pre>BadMoonRosin: <pre><p>"Go... <em>gland</em>"? That a rather... uh, biological sounding name.</p></pre>PaluMacil: <pre><p>It's only a project codename, not a product name, but it is a bit odd to English speakers. The FAQ points out that it's an island off Finland and sounds a little like Kotlin.</p></pre>jarnix: <pre><p>To French speakers too...</p></pre>rberenguel: <pre><p>Catalan/Spanish, too</p></pre>AlekSilver: <pre><p>It's an island near Kotlin. <a href="https://en.wikipedia.org/wiki/Gogland">https://en.wikipedia.org/wiki/Gogland</a></p></pre>BorgClown: <pre><p>Gonad it is, then.</p></pre>sh41: <pre><p>On the topic of names, what about simply "Goland"? A piece of land for Go. Simple, no awkward second 'g'.</p></pre>kariudo: <pre><p>I love JetBrains' IDEs and their VS extensions, but yeah... that name is not so English friendly... </p></pre>neopointer: <pre><p>I hope there will be a community edition of this IDE since it looks like the open source plugin is gonna die.</p></pre>mixedCase_: <pre><p>There won't be, apparently.</p></pre>VedVid: <pre><p>Yeah, most probably won't be, but... there is small hope, I think. In FAQ they stated that <em>pricing [will be] similar to PhpStorm, PyCharm, RubyMine</em>. Sounds like they are considering PyCharm as not free IDE, but there is Community Edition available for download.</p></pre>mixedCase_: <pre><p>I don't think there's any "hope" here. They're no longer making newer IDEs free. If there was to be a community edition, it would be on the FAQ.</p></pre>dlsniper: <pre><p>I'm not going to get into the details of pricing and licensing as I don't have any knowledge of them. But based on the FAQ, if they price this in the same range as PyCharm et al smaller IDEs I think it will make the IDE quite approachable as a price paid per month (around €20 / month right now).</p>
<p>If you spend all your time developing Go apps, I think it's a reasonable price. They are spending all their time to develop a product, fix all the bugs, add features and so on.</p>
<p>If you don't like paying JetBrains, I suggest trying to donate to people like Dominik Honnef <a href="https://www.patreon.com/dominikh" rel="nofollow">https://www.patreon.com/dominikh</a> who are doing a lot of work in the open-source community to give developers tools like go-statickcheck or go-mode.el. Aside from VSCode and I maybe Atom, I don't think any other editor out there for which the developers are paid to work on and the only tool that I can think of as being paid for is guru.</p></pre>Skyr0: <pre><p>They still update the Python plugin even though they have PyCharm. </p></pre>dlsniper: <pre><p>There will be a Go plugin for the paid IDEs, but in the beginning of 2017. The opensource plugin will not get the new features tho. </p></pre>Greymarch: <pre><p>If this new IDE will let me run AND debug my go code in MacOS inside the IDE, I will be a rabid user of this IDE.</p>
<p>Right now, I am trying to use Visual Studio Code to run and debug my code inside VSC on MacOS, and it's giving me all kinds of problems. Delve is really, really buggy on MacOS.</p></pre>nomadProgrammer: <pre><p>Webstorm with go plug in works fine</p></pre>Greymarch: <pre><p>I have IntelliJ with the Go plug-in. It does not allow debugging on MAC-OS. I specifically mentioned MacOS in my first post.</p></pre>callcifer: <pre><blockquote>
<p>If this new IDE will let me run AND debug my go code in MacOS inside the IDE, I will be a rabid user of this IDE.</p>
</blockquote>
<p>You can already do that, today, with the IDEA Go plugin.</p></pre>Greymarch: <pre><p>The IDEA GO plugin WILL NOT run and debug golang code inside the IDE FOR MAC-OS. It requires installation of delve on MacOS, which is extremely buggy. You can follow these wiki issues at the delve github project to understand the underlying problem. This problem still exists with IntelliJ and the current IntelliJ Go plug-in.</p>
<p><a href="https://github.com/derekparker/delve/issues" rel="nofollow">https://github.com/derekparker/delve/issues</a></p></pre>callcifer: <pre><p>Ah, sorry. I'm on Linux and I thought it'd work the same way on OS X. </p></pre>unimpaired: <pre><p>Gog-land? Go-gland? Google-land?</p>
<p>The name...
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传