Improve Agent-Search for projects in WSL with IntelliJ running on Windows - #11
Open
jonasPoehler wants to merge 1 commit into
Open
Improve Agent-Search for projects in WSL with IntelliJ running on Windows#11jonasPoehler wants to merge 1 commit into
jonasPoehler wants to merge 1 commit into
Conversation
…hen a project is opened in WSL with IntelliJ running on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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*.jarfile 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.