You can't Import a Bazel Project when using IntelliJ IDEA Remote Development

See original GitHub issue

JetBrains has announced a new “Remote Development” mode for IntelliJ IDEA. In this mode, you connect via SSH to a host running a headless copy of IntelliJ.

https://www.jetbrains.com/remote-development/ https://www.jetbrains.com/help/idea/remote-development-a.html https://www.jetbrains.com/help/idea/remote-development-overview.html https://www.jetbrains.com/help/idea/faq-about-remote-development.html

Under this mode of development, you can’t create a new IntelliJ project. The “remote development” connection dialog won’t allow you to submit it without specifying the location of an existing project.

As a result, in order to set up a Bazel project, I had to:

  • VNC into my Ubuntu host
  • Install a full copy of IntelliJ on the host
  • “Import Bazel Project” on the host
  • Back on the guest, connect remotely to the host and point to the generated .ijwb folder

That’s disappointing, especially since the best practice is not to check in the .ijwb folder, but only check in .bazelproject files and generate .ijwb from those.

At a minimum, https://ij.bazel.build/docs/bazel-plugin.html should be updated to document this painful workaround. Ideally, at some point, it should be possible to “Import Bazel Project” remotely, without VNCing into the host and doing it there.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:12
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Zettencommented, Mar 3, 2022

Another workaround may be to provide some documented way to generate the .ijwb folder from the command line, so at least we can just SSH in and avoid installing the full graphical desktop plus IntellIJ for a one-time setup task.

Perhaps the plugin could be used in the host IDE to generate a copy-pasteable command which can be run manually in the workspace (similar to the remote JVM debug args), just to bootstrap the IntellIJ project config so it can be imported as an existing IJ project rather than a Bazel project.

1reaction
illera88commented, Nov 14, 2022

In that case this issue as well as https://github.com/bazelbuild/intellij/issues/3775 should be closed right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing a Project - IntelliJ with Bazel
Choose Import Bazel project from the Welcome screen. First, you need to select an existing workspace root (the directory containing the WORKSPACE file)....
Read more >
Remote Development support : BAZEL-48 - YouTrack
GTW-1061 Installing Bazel plugin for Clion on host causes error "Failed to get IDE status in 60 seconds. Probably IDE backend is stuck"....
Read more >
Bazel plugin integration is broken — toolbar and menu not ...
The problem is not that I can't open a new project and generate .clwb automatically - there is a known workaround to use...
Read more >
Stay local, let your IDE do remote work for you! | The CLion Blog
The recording of our webinar Remote Development with CLion is ... this project and you'll then be ready to start working remotely with...
Read more >
Add items to your project | IntelliJ IDEA Documentation
Learn how to add more items to your project: create new folders, add new files, import existing files and modules.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found