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

Pause Gradle initialisation until Hermit has installed all packages. #51

Merged
merged 1 commit into from May 12, 2022

Conversation

jvmakine
Copy link
Collaborator

@jvmakine jvmakine commented May 12, 2022

This prevents errors of Invalid JDK when a user opens a project referring to a hermit managed JDK that is not on disk yet.

This also adds a new hermit status: installing

Closes #33

GradleExecutionAwares are run in a single thread sequentially. So, we can just register one before the main initialiser that verifies the Gradle JVM, and pause the thread until Hermit has finished running.

This API was only introduced in 2021.2.1 release released on 7/2021. So, unfortunately, we must drop updates to older IntelliJ versions to enable this.

@jvmakine jvmakine force-pushed the juho/post-startup branch 2 times, most recently from e5ba02f to e92c869 Compare May 12, 2022 05:49
Enabled,
Failed
Disabled, // Hermit is not in use
Installing, // Installing Hermit packages to the system

Choose a reason for hiding this comment

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

Nice!

This prevents errors of Invalid JDK when a user opens a project referring to a hermit managed JDK that is not on disk yet
@jvmakine jvmakine merged commit c984296 into main May 12, 2022
@jvmakine jvmakine deleted the juho/post-startup branch May 12, 2022 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants