Skip to content
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

fix: Detect Vaadin projects if dependencies are updated #97

Merged

Conversation

MarcinVaadin
Copy link
Member

@MarcinVaadin MarcinVaadin commented Sep 24, 2024

Currently Vaadin dependencies were detected only on post-startup activity. It might cause race condition between this event and indexed / refreshed module libraries.

This PR uses ModuleRootListener to detect library updates together with PostStartupActivity.

If project is indexed already by IntelliJ, ModuleRootListener is not triggered and PostStartupActivity detects Vaadin properly.
If new project is created, PostStartup happen before module is fully loaded with all dependencies and we need to use ModuleRootListener to detect Vaadin.

@MarcinVaadin MarcinVaadin changed the title fix: Use ModuleRootListener to detect Vaadin project fix: Detect Vaadin projects if dependencies are updated Sep 24, 2024
Copy link

Artifact build on last commit: distributions.zip.
For MacOS users: there is a zip inside this zip and Finder unzips them both at once. Use unzip distributions.zip from Terminal or check solution for Archive Manager.

Copy link

@czp13 czp13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Created a new Spring Boot project.
  2. Updated the pom.xml to include Vaadin.
  3. Then, I saw the following popups:
image
  1. The application started without any issues.

❓ I didn't see any specific message saying, "You have a Vaadin project, Vaadin plugin enabled," or something similar. I expected to, but it's probably fine this way.

So not sure where I could see, or check this log message:

   LOG.info("Vaadin detected in dependencies of " + event.project.name)

@MarcinVaadin
Copy link
Member Author

@czp13 If you see those popups it means plugin has started because Vaadin project has been detected. So it's ok.

@czp13
Copy link

czp13 commented Sep 25, 2024

@czp13 If you see those popups it means plugin has started because Vaadin project has been detected. So it's ok.

Okey,thanks :), then I will approve it if soonish no one else approves.

Copy link
Contributor

@mgarciavaadin mgarciavaadin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the weirdest project structures I could imagine and working perfectly. Good Job!

@MarcinVaadin MarcinVaadin merged commit 13df6d9 into main Sep 25, 2024
3 checks passed
@MarcinVaadin MarcinVaadin deleted the fix/check-vaadin-dependencies-on-module-root-changes branch September 25, 2024 10:15
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.

3 participants