Intellij: 2020.3 support

Created on 29 Sep 2020  路  30Comments  路  Source: bazelbuild/intellij

Tracking issue for IntelliJ 2020.3, just released in EAP: https://blog.jetbrains.com/idea/2020/09/intellij-idea-2020-3-eap/.

IntelliJ new IDE version support

Most helpful comment

Any progress on this? We are all eagerly awaiting this.

All 30 comments

I've created PR #2246 that compiles and works with IJ 2020.3 for me.

Would be nice if the repo maintainers could review #2246 asap!

Any progress on this? We are all eagerly awaiting this.

As you might have seen from some of the pull requests (e.g. #2332, #2383, #2381), we're currently working on 2020.3 compatibility but are not done yet. For 2020.3, we'll not only have to care about code compatibility but will also need to integrate with the new Welcome wizard.

You can from now (commit 3f59039740164013e9b97c2efa65ff46553feb561) on use the plugin in a preview version with 2020.3. In the new welcome wizard, you will have to click on the three dots on the top right to import a bazel project. As @alice-ks mentioned, we are working on integrating properly with the new welcome wizard.

You can from now (commit 3f59039740164013e9b97c2efa65ff46553feb561) on use the plugin in a preview version with 2020.3. In the new welcome wizard, you will have to click on the three dots on the top right to import a bazel project. As @alice-ks mentioned, we are working on integrating properly with the new welcome wizard.

@AlexeyGy I have fetched all changes from repo, but git show 3f59039740164013e9b97c2efa65ff46553feb561 tells there is no such commit. Nevertheless I have tried to build a plugin for IDEA and for CLion (with corresponding changes in BUILD files) and have failed. Could you estimate when we get official support for 2020.3, especially CLion ?

I think the sha was messed up during the copying of the commit here. Anyways, on the latest Master you can build for 2020.3:

bazel build //ijwb:ijwb_bazel_zip --define=ij_product=intellij-canary

The plugin will be built as bazel-bin/ijwb/ijwb_bazel.zip

CLion will take a bit more time unfortunately.

Are there any plans to make an official release with 2020.3 support anytime soon?

We've uploaded an (still early access) 2020.3-compatible version to the beta plugin repository. Add
https://plugins.jetbrains.com/plugins/list?channel=beta to your list of plugin repositories to be able to see and use it.

image

Does the beta release intentionally drop support for Go? I didn't see it called out in any issues.

Someone on my team is getting this error

image

We definitely did not drop support for Go. I've run a quick test and had no problems. Are you sure that the colleague was not using Intellij Community Edition? Go is Ultimate-Edition (or Goland) only.

@aa250816 I know you have the ultimate edition, can you verify that you have your license activated when you hit that error?

I've just cloned the project fresh and attempted the import Bazel Project flow again. When getting to the project view step go isn't listed under the additional_languages list. If I add it manually the error above prevents me from finishing the process. If copy the .ijwb folder from a previous version of the plugin the bazel plugin options appear during startup while intellij indexes but as it finishes all bazel options disappear. I am using the intellij ultimate edition.

Versions:
Intellij 2020.3.3 Ultimate Edition
Bazel plugin: 2021.03.16.0.1
Go Plugin: 203.7717.11
image

I can confirm the issue reported by @aa250816.

When I attempt to import my .bazelproject I first get:

The following issues were found:

Could not parse: 'ts_config_rules:'

Removing that section proceeds to declare that additional_language's of javascript, typescript and finally go are all unsupported. (removing each exposing the next error)

Versions:
Intellij 2020.3.3 Ultimate Edition
Bazel plugin: 2021.03.16.0.1

@phb @aa250816
Can you reproduce with the following minimal repo?
https://github.com/AlexeyGy/bazel-go

@AlexeyGy I can load the project just fine and I can't see any obvious problems. However if I remove the .ijwb folder and try to import it again, then I can
1) Accept the default .bazelproject file (no additional language) => works fine
2) Attempt to add 'go' as an additional language (or javascript, or typescript) it doesn't (same error)

I don't know if the default template is generated based on what is available, but the ones that are in the template file (android, dart, kotlin, python, scala) all work fine.

@AlexeyGy @phb I got the same thing. If I remove the .ijwb folder and import bazel project from scratch I can't select go or any other language not listed under additional_languages.
image

Confirmed the bug! Looks like we simply do not detect go as an available language. I'm looking into fixing it.

The bug was my bad. Normally we have the release process and script upload automated. However, for the beta version, I did a manual build and upload. The mistake was that I had built using

  • --define=ij_product=intellij-latest
    instead of
  • define=ij_product=intellij-ue-latest

This meant that the version in the beta channel was only including Community Edition (CE) languages. I've just done a fresh upload and JS/TS&Go support should be back in. Before you ask: building the plugin for CE is pretty pointless (for end users but helpful for CI) since it gracefully degrades to CE-features in case the user only has CE installed even when using the UE build.

Works now, thank you!

We've uploaded an (still early access) 2020.3-compatible version to the beta plugin repository. Add
https://plugins.jetbrains.com/plugins/list?channel=beta to your list of plugin repositories to be able to see and use it.

image

@AlexeyGy I have added beta repository to CLion 2020.3.3, but there is still no Bazel plugin in the list. Is it supposed to be there or CLion is still incompatible ? If so, when do you plan to support CLion 2020.3 ?

Trying the plugin from the Beta repo in Goland 2020.3.3

It loads and produces a "Bazel" menu betweeen "Window" and "Help", and a File-> Import Bazel Project... menu item.

However, the Bazel menu disappears as soon as the IDE finishes loading, so I can't Sync the project

I think you should reconsider how the plugin is implemented if each IntelliJ version results in incompatibilities that take months to unravel. Maybe provide the basic import capability and the build file editor as separate plugins, since the latter seems to be the source of most problems?

Every time I try out Bazel, this plugin is incompatible with the IntelliJ version I have installed, because by the time compatibility has been restored, the next IntelliJ release is already out. This leaves a bad impression for any company considering Bazel, as IDE support is one of the first things you'll consider when choosing your build system.

Yes, this is a real problem for Bazel adoption, along with the lack of integration with IDEs other than IntelliJ. As an open source project, it's hard to ask contributors to downgrade their IntelliJ version to a months-old release to install the plugin.

I understand that even Google has limited engineering resources and their internal IntelliJ version is pinned, making timely upstream support less of a priority, but it would be good to hear anything from their side on how they plan to deal with this going forward. 2020.3 still isn't released as a stable version...

We understand your pain and see that this is an issue. In the past weeks, we've looked into ways to improve the situation and have some ideas for it. One main obstacle we currently see is that the plugin can't move past the IntelliJ versions we use internally. That's solvable and something we intend to address in the next weeks.

In the past weeks, we've looked into ways to improve the situation and have some ideas for it.

Maybe you could share those in https://github.com/bazelbuild/intellij/issues/2314? I'm sure others would be happy to add their ideas too. The JetBrains team might give advice as well if you ping them. I've seen several internal API usages in the codebase and maybe they could provide more stable alternatives.

Maybe you could share those in #2314? I'm sure others would be happy to add their ideas too.

Those ideas are tightly connected with many internal details and hence not publicly shareable. Let's get back to #2314 after we untangled the Bazel plugin a bit from our internal processes.

The JetBrains team might give advice as well if you ping them. I've seen several internal API usages in the codebase and maybe they could provide more stable alternatives.

We talked with people from JetBrains in the last weeks and especially touched the aspect of internal API usages. With some usages, they could directly help us. Some other usages are unfortunately not so easy to replace yet.

From the current commit, you can build the plugin for clion 2020.3:
bazel build //clwb:clwb_bazel_zip --define=ij_product=clion-beta

With our next release, we'll also upload the CLion version as well as the IntelliJ version of the plugin to the JetBrains marketplace.

Now onwards to 2021.1 support in #2406

We just pushed a version of the plugin which is compatible with IntelliJ 2020.3 to the public plugin repository. The version for CLion 2020.3 is still pending review from JetBrains but should appear for you soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cmluciano picture cmluciano  路  9Comments

sundermann picture sundermann  路  5Comments

jschaf picture jschaf  路  4Comments

KaoruDev picture KaoruDev  路  3Comments

ruudud picture ruudud  路  8Comments