GoLand 2018.3 Beta: Change Signature refactoring, debugging Google App Engine, Testify, Go core dumps, and more

The upcoming GoLand 2018.3 release has reached the Beta milestone!

If you’re new to our release cycles, we announce a Beta when we’ve packed everything we plan to deliver in the major update. Since this moment and until the release date, our team is focused only on polishing everything off.

Download GoLand 2018.3 BETA

Compared with our Early Access builds, the Beta version is quite stable though it may still have bugs and other issues.

20183_beta

Let’s have a look at what the upcoming release will have inside!

Click on a topic below to learn more about a specific area you’re interested in, or read through the whole blog post to get yourself up to speed with all the new improvements:

New Change Signature refactoring and updates for Inline and Rename

The new Change Signature refactoring gives you many ways to modify a function, method, or method specification signature in just a few clicks! You can easily change their names and add, remove, reorder, and rename parameters. When you refactor a method specification, GoLand even asks you if you want implementations to be updated as well.

Change Signature Refactoring

The Refactoring Preview pane help make sure that every change in your code is safe. It lets you explore the results before they’re applied, and discard the change if anything goes wrong.

To learn more, read the detailed blog post about Change Signature and how it helps make safe and fast changes across your whole code base.

In addition, GoLand now highlights inlined code after applying the Inline refactoring to help you catch what has actually happened.

Inline refactoring with highlighting in action

The Rename refactoring gives you an insight into the potential conflicts that might be introduced by the renaming, if any. Conflicts are displayed in the Problems Detected window, where you can continue to explore them in the Conflicts tab, cancel, or proceed with the refactoring.

The symbol name conflicts are displayed in the Problems Detected window

Code inspections

The Unhandled Error code inspection alerts you about functions or methods that return an error whenever the error isn’t being checked.

Code inspection Unhandled Error

Unreachable code inspection detects parts of code that can never be executed.

Unreachable code inspection in action

The Function Call code inspection, which warns you if an expression should be converted into a function or a method call, now works in tandem with the Finish Call Expression quick-fix. This quick-fix adds the missing brackets and completes the expression.

Finish Call Expression quick-fix

Intention actions

The Add format string argument intention action generates a placeholder for any provided expression via a popup. It inserts the placeholder into a format string and passes the expression as an argument for the placeholder. Also, you can enable code folding for format strings that will replace placeholders with the corresponding arguments.

Intention Action Add Format string argument

The Generate Constructor intention action generates functions for creating values of the struct type.

Generate Constractor in action

The intention actions Generate getter/setter and Generate getter and setter now create boilerplate code and let you customize the pointer/non-pointer receiver type and its name.
These actions are also available via the Generate popup menu.

Generate getter and setter intention action creates boilerplate code

Code completion

GoLand 2018.3 adds method-like completion for functions. When you have value t of type T and write t.Foo, you can look through functions that accept value of type T as the first argument. Invoke basic completion twice (Ctrl+Space+Space) to see all of the available completion options.

Method-like Code Completion for functions in action

Code editor

As we continuously improve GoLand’s code editor, its capabilities grow and expand in different ways with each update. This release is no exception.

Go templates (html/template) now resolve variables and field chains. You can also take advantage of code completion and the Rename refactoring as you work with them.

Code completions and Rename refactoring in html file for Go templates

New gutter icons let you better spot shadowed/shadowing methods of embedded types. You can also navigate back and forth in one click, or by pressing ⌘U on macOS or Ctrl+U on Windows/Linux.

Go to shadowed methods action

Complete Current Statement now inserts the required trailing comma automatically in any composite literals (such as struct, slice, etc.) and puts a caret on the position of the next statement. Just press ⌘⇧↩ on Mac or Ctrl + Shift + Enter on Windows/Linux or select Edit | Complete Current Statement from the main menu.

Complete current statement action

GoLand supports multiline todo comments for Go, JavaScript, TypeScript, CSS, and SCSS.

Multiline todo comments in Go file

In GoLand 2018.3 Beta and further versions, you can exclude a specific set of files from the code actions Reformat code, Optimize imports, and Rearrange.

Add folder to the scope to disable there code formatting actions

Improved Search Everywhere popup

The Search Everywhere popup (Double Shift) gets a new UI and works faster thanks to an asynchronous approach. It also provides quick access to Go to type, Go to file, Go to symbol, and Find. Use the TAB key to switch between them.

Search Everywhere popup in action

Multiline code snippets in Find in Path and Replace in Path dialogs

The Find and Replace in Path dialogs are better at supporting multiline code snippets.

Replace in Path dialog

Debugger updates

The upcoming 2018.3 release improves the GoLand debugger in many different ways.

Debugging Google App Engine apps

GoLand now lets you easily run and debug Google App Engine applications locally. To expand our support, we’ve also added a new App Engine project template. Read this blog post to learn more.

Debugging Google App Engine Application

Debugger gets coding assistance

The debugger provides code completion, inspections, and quick-fixes for the Evaluate Expression dialog and the Watchers panel.

Debugger updates

Go core dumps

GoLand makes exploring core dumps easier without any third-party tools, because all you need to do is to select Run | Open Core Dump. Also, adjust Run configuration settings to create crash dumps automatically: just put GOTRACEBACK=crash to the Environment field.

Exploring core dump

Note that core dumps are available only on Linux machines by default. However, you can analyze memory dumps on any flavor of macOS, Windows, or Linux.

Mozilla rr support

We’ve added support for Mozilla rr in the debugger on Linux. The main idea of Mozilla rr is help you catch non-trivial bugs more easily. To learn more about how Mozilla rr works and how GoLand can help you use its features, read this blog post.

Debugging with Mozilla RR support

Diagram support

We support diagrams! Visualize and explore:

  • Go module dependencies (available only in the context menu of a go.mod file).
  • Imports and exports in-context in JavaScript and TypeScript projects.
  • Tables and their relationships in Databases and SQL.

Explore Go Modules dependency diagram

For more details, read this blog post.

Test Runner updates

Testify test framework

The upcoming GoLand 2018.3 supports Testify. It allows you to run suites and methods as regular test functions, directly from the editor. The Comparison Failure window helps explore diffs between expected and actual values for failed assertions.

run suites and methods as regular test functions right from the editor

Generate any test via the Generate popup menu

Empty test file, Test for function, Tests for file, and Tests for package are now available via the Generate popup menu.

Generate popup menu

VCS improvements

GitHub Pull Requests

The new Pull Requests tool window shows all pull requests from GitHub with their descriptions, current labels, changed files, and assignees. There, you can search by state, assignee, author, after, before, or use sorting. The IDE also helps you create a new local branch or open a pull request on GitHub.

Pull Requests window

Git submodules support

GoLand now supports Git submodules: when you clone repositories with the submodules, GoLand will not only clone the root repositories but also all of its submodules.

Tools

The Kubernetes plugin supports Helm

As you work with Helm resource template files, enjoy code completion, the Rename refactoring, code inspections, and quick-fixes. For more details, please read this blog post.

Docker

Docker supports CLI options for the build part in Docker run configurations.

New Build options field in Dockerfile run configuration

Accessibility improvements

We strive to make our IDEs accessible to everyone, and this update takes a big step in that direction.

High-contrast theme

We’ve added new a High-contrast theme, which can be accessed using the drop-down list from the theme options under Settings | Appearance & Behavior or just press Ctrl+`.

Opened editor in High Contrast Theme

Better support for screen readers

The IDE now allows line numbers, VCS annotations, breakpoints, and other gutter icons to be read by a screen reader.

Miscellaneous

Attach action is available via the Open Project popup

The Open Project popup now lets you attach a directory to already opened projects, so you can have as many opened projects in one GoLand instance as you want. Click File | Open, and choose the project you want to attach.

Attach button in Open Project popup

Drag-and-drop files and projects on the Welcome screen to open

Drag the folder to the IDE’s Welcome Screen from the desktop

Activity Monitor

The Activity Monitor shows how much CPU the various subsystems and plugins are consuming: Help | Activity Monitor.

Activity Monitor in action

Plugins Page

The Plugins page based in Settings | Plugins has been completely reworked, including all the functionality and UI. It helps much easier find necessary plugin searching by tags and sort the results by downloads, name, rating, featured, or updated.

Reworked Plugins page

That’s all! Download the Beta version from the website, via Toolbox App, or right from the IDE. Also, don’t hesitate to share your feedback with us: here in comments, in our Twitter, or our bug tracker.

This entry was posted in EAP, New Features and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *