{"id":155284,"date":"2021-06-17T14:27:58","date_gmt":"2021-06-17T13:27:58","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=go&#038;p=155284"},"modified":"2022-05-23T18:02:29","modified_gmt":"2022-05-23T17:02:29","slug":"goland-2021-2-eap-build-4-is-here","status":"publish","type":"go","link":"https:\/\/blog.jetbrains.com\/zh-hans\/go\/2021\/06\/17\/goland-2021-2-eap-build-4-is-here","title":{"rendered":"GoLand 2021.2 EAP Build #4 Is Here!"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"800\" height=\"400\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2021\/06\/Blog_Image_GoLand.png\" alt=\"\" class=\"wp-image-155309\"\/><\/figure>\n\n\n\n<p>GoLand 2021.2 EAP Build #4 is out.&nbsp;<\/p>\n\n\n\n<p>You can get this EAP build via the Toolbox App, download it from our website, use a snap package (for Ubuntu), or get it right in GoLand by selecting <em>Automatically check updates for Early Access Program<\/em> in <em>Preferences \/ Settings | Appearance &amp; Behavior | System Settings | Updates<\/em>.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a href=\"https:\/\/www.jetbrains.com\/go\/nextversion\/\" class=\"ek-link jb-download-button\" target=\"_blank\" rel=\"noopener\">Download GoLand 2021.2 EAP #4<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Support for converting a slice to an array pointer<\/h2>\n\n\n\n<p>The Go 1.17 release date is approaching, and in this version, it will be possible to <a href=\"https:\/\/tip.golang.org\/doc\/go1.17#language\" target=\"_blank\" rel=\"noopener\">convert a slice to an array pointer<\/a>. Before, it was only possible to do this kind of conversion with the help of the <em>unsafe<\/em> package, which allows stepping around type safety in Go.&nbsp;<\/p>\n\n\n\n<p>As the 1.17 <a href=\"https:\/\/tip.golang.org\/ref\/spec#Conversions_from_slice_to_array_pointer\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\">draft release notes<\/a> say:&nbsp;<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Converting a slice to an array pointer yields a pointer to the underlying array of the slice. If the length of the slice is less than the length of the array, a run-time panic occurs.<\/p><\/blockquote>\n\n\n\n<p>Since Go 1.17 will allow you to convert a slice into an array pointer, GoLand will not mark these conversions as errors. To do this, change GOROOT to \u201cGo 1.17beta1\u201d in <em>Preferences\/Settings | Go<\/em>.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1500\" height=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2021\/07\/go-117.gif\" alt=\"\" class=\"wp-image-164309\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Generic support for web-types<\/h2>\n\n\n\n<p>There are some important changes for front-end technologies in this build. We are introducing a new version of web-types \u2013 an open-source standard for documenting various web frameworks. Its initial version was focused only on Vue.js support. <a href=\"https:\/\/blog.jetbrains.com\/zh-hans\/webstorm\/2021\/01\/web-types\">This blog post<\/a> from the WebStorm team describes web-types in more detail.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1500\" height=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/05\/image-32.png\" alt=\"\" class=\"wp-image-248854\"\/><\/figure>\n\n\n\n<p>With this release, we want to build a new architecture to make it easier to support new JavaScript frameworks and extend support for the existing ones. There might be some regressions around Vue.js support while the migration is still in progress. We\u2019re hoping to stabilize this functionality in the next couple of weeks. Please let us know if you spot any issues!&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Support for TypeScript types in JSDoc comments<\/h2>\n\n\n\n<p>GoLand now properly supports the TypeScript syntax used within JSDoc comments in your <em>.js<\/em> files. Support for some syntactic constructs, such as union types, has already been available for a while.&nbsp;<\/p>\n\n\n\n<p>With this release, the existing support has been reworked and expanded. The IDE recognizes more syntactic constructs, and we\u2019ve fixed a lot of known issues, too. For example, optional properties in <em>@typedef <\/em>declarations are now supported.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1500\" height=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/05\/image-33.png\" alt=\"\" class=\"wp-image-248865\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Intelligent spelling and grammar checks in Go files<\/h2>\n\n\n\n<p>We\u2019ve also enabled intelligent spelling and grammar checks in Go files by default. These checks are provided by the Grazie plugin, which is bundled with the IDE. To adjust the settings, go to <em>Preferences\/Settings | Editor | Proofreading | Grammar<\/em>, where you will find the <em>Scope<\/em>, <em>Rules<\/em>, and <em>Exceptions<\/em> sections.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1500\" height=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/05\/grazie.png\" alt=\"\" class=\"wp-image-248889\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Other improvements and bug-fixes<\/h2>\n\n\n\n<p>\u2013 <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/GO-11233\" target=\"_blank\" rel=\"noopener\">GO-11233<\/a> \u2013 GoLand will suggest creating new Go modules projects in the ~\/<em>GolandProjects<\/em> directory.&nbsp;<\/p>\n\n\n\n<p>\u2013 <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/GO-10730\" target=\"_blank\" rel=\"noopener\">GO-10730<\/a> \u2013 <em>-coverpkg<\/em> is not added when running tests on <em>.\/&#8230;<\/em>; this temporary fix is needed because of <a href=\"https:\/\/github.com\/golang\/go\/issues\/23910\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\">this issue with Go<\/a>.&nbsp;<\/p>\n\n\n\n<p>That\u2019s all for today. You can find the complete list of improvements for this EAP build in the <a href=\"https:\/\/confluence.jetbrains.com\/display\/GOLAND\/GoLand%2B212.4321.4%2BRelease%2BNotes\" class=\"ek-link\" target=\"_blank\" rel=\"noopener\">release notes<\/a>. Please tell us what you think about our new features. You can share your feedback here in the comments, on <a href=\"https:\/\/twitter.com\/golandide\" target=\"_blank\" rel=\"noopener\">Twitter<\/a>, or in the <a href=\"https:\/\/invite.slack.golangbridge.org\/\" target=\"_blank\" rel=\"noopener\">Gophers Slack<\/a> #goland channel. You can also open a ticket in <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/GO\" target=\"_blank\" rel=\"noopener\">our issue tracker<\/a>.<\/p>\n","protected":false},"author":1254,"featured_media":150564,"comment_status":"closed","ping_status":"closed","template":"","categories":[826],"tags":[6569,600],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/go\/155284"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/go"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/go"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1254"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=155284"}],"version-history":[{"count":10,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/go\/155284\/revisions"}],"predecessor-version":[{"id":248900,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/go\/155284\/revisions\/248900"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/150564"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=155284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=155284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=155284"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=155284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}