-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven plugin not always activated in large multi-root workspace #881
Comments
That seems like vscode-maven extension was not activated. Below is it's activation events: Lines 38 to 63 in c21885b
It's strange. As long as you have a pom.xml in your workspace, this extension should be activated automatically. You can check Ouput channel "Log (Extension Host)". There you have logs about extension activation. |
@Eskibear I found this log entry: We use a workspace with multiple folders. |
@Eskibear after some research in vscode, do I understand it correctly, that it is by design, that vscode only tries the search 7 seconds? In a multi root workspace this is often insufficient, as in my case where not all folders are maven plugins. Is the setting |
It will help if you provide some folders to exclude. This setting was introduced mainly to skip specific folders in polyglot projects like node_modules, somehow improving the performance. As a workaround for the moment, you can set
No, it's not going to work. It's common to place multiple maven projects flat under a root folder. And some developers are used to open that root folder, although we do suggest them to open each project as a workspace root folder. |
BTW, can you share which folder of you non-maven projects contains large number of files? Another thing we can do for sure is, to add the typical folder pattern into |
@Eskibear ok, based on what I investigated now is, that vscode-maven is not the only plugin that doesnt get activated:
Now, since I wanted to try a simple solution, I added a pom.xml in every root folder of the project in my multi root workspace so that the structure iis like this:
The issue remains supprisingly the same. I expected now, that a pom.xml will be found right away, but it isnt. Since I cannot share the project, here is a list with number of files and folders of the workspace that has the problem everytime:
One more thing I tried is to run a simple js script using glob pattern and measure execution time. Here's the script:
Here's the result for each pattern I tried:
Maybe that helps a bit, but since the plugin redhat.java already uses a non aggressive pattern it fails, too :-( |
Thanks for the detailed information. I think we might revisit the activation events and find ways to optimize for such cases. |
I have a similar (if not same) scenario. In my case it's not with a "large multi-root workspace". It's with a worksapce with 6 smalls projects (5 java/maven and 1 nodejs). As a workaround, I found that right clicking any |
@gian1200 fyi. |
It seems to be related to what was mentioned at #881 (comment) I opened and closed VSCode multiple times and the extension activated in some of them. When it didn't, it was due to a timeout, after 5-7 seconds (?).
|
This remains being an issue and happens even in very small projects. The timeout-based logic doesn't seem to properly work in workspaces with a lot of extensions, especially for Java projects which are slow to fully load with the language server and whatever else is needed. The "show effective pom" trick is luckily still working, but I'd love to be able to configure this timeout and set it to 30s or so for startup. |
Describe the bug
Hi, we have an issue on different developer notebooks that after re-/starting vscode the maven plugin is not working.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Maven view in explorer is visible and maven favorites do work as expected.
Environments (please complete the following information as much as possible):
Screenshots
Missing maven view in explorer:
Error executing maven favorites;
Additional context
If we go to the extension and open the maven plugin, then
disable
andenable
the plugin again without clicking reload button in the resulting vs code warning popup, then the maven view in explorer is visible and maven favorites start working until next restart of vscode.The text was updated successfully, but these errors were encountered: