Skip to content

Improve Agent-Search for projects in WSL with IntelliJ running on Windows - #11

Open
jonasPoehler wants to merge 1 commit into
ebean-orm-tools:masterfrom
FOCONIS:enh/wsl-support
Open

Improve Agent-Search for projects in WSL with IntelliJ running on Windows#11
jonasPoehler wants to merge 1 commit into
ebean-orm-tools:masterfrom
FOCONIS:enh/wsl-support

Conversation

@jonasPoehler

Copy link
Copy Markdown

Initial Problem
My current setup consists of IntelliJ being installed on Windows natively but my projects using Ebean are located in a WSL distribution including any code execution. Up to now, the plugin tried to locate a ebean-agent*.jar file in the home directory of the user executing Idea, but here a devide comes up with WSL usage. Following the current logic, the agent-jar would have to be placed in the Windows home directory for the plugin to find it, but the JDK in WSL potentially can't access it.

Proposed Solution
Place the ebean agent jar in the user home directoy of the WSL distribution containing the opened project and let the plugin discover the file there. I tried to build a least invasive, but still functioning solution for this, by first checking if the project is a WSL project and adding the distributions home directoy to the agent search path.

Further thoughts
While the WSLDistribution/WslPath API used for implementing this solution is available in the currently used Idea platform version (2022.3), the jars indexed by intellij itself might not (at least for me), resulting in poor IDE support for the plugin code itself. The plugin builds normally with gradle and runs on IDEA 2026.1 and 2026.2 and should run on older versions. However, the problem itself could also come up with other setups where remote development is being used aside from WSL. A "proper" solution for that would be having to port the plugin onto a newer platform version and implement Split Mode. Let me know if this is something you would be interested in or if this would be overkill for a plugin of this size. I can offer my support with this, since our workflows might increase the usage of remote development with IntelliJ in the foreseeable future with WSL the first big use case.

…hen a project is opened in WSL with IntelliJ running on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant