JetBrains has introduced Workspaces for its IntelliJ IDEA Java and Kotlin IDE, enabling multiple projects in separate repositories to be managed together – meeting a user request first made over 13 years ago.
The feature has been added to IDEA as a plugin called Multi-Project Workspace, though it’s not yet available for other IntelliJ IDEs based on IDEA – such as PyCharm or Android Studio. JetBrains described the Workspaces feature as work in progress, and intends to make it a part of the core IDE when it is ready.
Software engineer Andrey Belyaev, along with developer advocate Aleksey Stukalov, described the plugin as a way of getting the benefits of a monorepo without its disadvantages. A monorepo is a single repository that contains all the projects that form an application. According to their post, JetBrains once believed that this approach removed the requirement for Workspaces. With a monorepo, all developers can see all the projects – even those they are not working on. The IDE makes it easy to navigate the codebase and find references – for example when the application is composed of multiple microservices.
Large monorepos introduce issues of their own, though. Problems include poor performance, difficulty applying fine-grained permissions, and coordination issues if different projects have different release cycles. Another issue is fragility – “If just one project within the monorepo is broken, the whole monorepo is treated as broken,” lamented Belyaev and Stukalov.
A Workspace stores references to projects, but each project remains independent and can be in its own repository. A project may also be part of more than one Workspace.
It’s worth noting that JetBrains IDEs already support projects composed of multiple modules – where a module can have its own Java SDK and language level, different from that of the project, or even use a different language such as Python or PHP. It is confusing because what JetBrains calls “modules” might be equivalent to “projects” in other IDEs.
Limitations in the current Workspace plugin include the need to create new run configurations for each project after it is imported, no support for project renaming, and lack of settings synchronization between a project and its Workspace.
Future plans include “making Workspaces a first-class citizen in all IDEs” along with smooth debugging across projects and the ability to store and share Workspaces in version control systems. “The Workspaces feature is far from finished,” admitted Belyaev and Stukalov.
The Workspace plugin is already attracting favorable reviews. “OMG about damn time. Not having this was such a cognitive burden,” said one developer. Others are impatient to see it extended to other IDEs, with comments such as “Only for IDEA, not available for example [in] WebStorm where I have backend and frontend written in TS. Good idea but could it be available for other IDE?” In response, Belyaev confirmed the plan to roll it out to other IDEs, but asked for time to “fix the most annoying issues.”