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

java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory. #379

Open
AlexanderBartash opened this issue Oct 9, 2024 · 6 comments

Comments

@AlexanderBartash
Copy link

AlexanderBartash commented Oct 9, 2024

Version: 2022.3.2.2

grammarKit {
    // The release version of the [Grammar-Kit](https://github.com/JetBrains/Grammar-Kit) to use.
    //jflexRelease = libs.versions.ideaJFlexPlugin

    // The version of the IntelliJ-patched JFlex, a [fork of JFlex](https://github.com/JetBrains/intellij-deps-jflex)
    // lexer generator for IntelliJ Platform API.
    //grammarKitRelease = libs.versions.ideaGrammarkitPlugin

    // Version of the IntelliJ to build the classpath for [org.jetbrains.grammarkit.tasks.GenerateParserTask]
    // and [org.jetbrains.grammarkit.tasks.GenerateLexerTask] tasks.
    // If provided, [grammarKitRelease] and [jflexRelease] properties are ignored as both dependencies will be provided
    // from the given IntelliJ IDEA release.
    intellijRelease = "242-EAP-SNAPSHOT"
}

or

grammarKit {
    // The release version of the [Grammar-Kit](https://github.com/JetBrains/Grammar-Kit) to use.
    //jflexRelease = libs.versions.ideaJFlexPlugin

    // The version of the IntelliJ-patched JFlex, a [fork of JFlex](https://github.com/JetBrains/intellij-deps-jflex)
    // lexer generator for IntelliJ Platform API.
    //grammarKitRelease = libs.versions.ideaGrammarkitPlugin

    // Version of the IntelliJ to build the classpath for [org.jetbrains.grammarkit.tasks.GenerateParserTask]
    // and [org.jetbrains.grammarkit.tasks.GenerateLexerTask] tasks.
    // If provided, [grammarKitRelease] and [jflexRelease] properties are ignored as both dependencies will be provided
    // from the given IntelliJ IDEA release.
    intellijRelease = "242.23339.11"
}
> Task :generateImpexParser FAILED
Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.intellij.ide.plugins.PluginEnabler.<clinit>(PluginEnabler.java:22)
	at com.intellij.core.CoreApplicationEnvironment.<init>(CoreApplicationEnvironment.java:79)
	at com.intellij.core.CoreApplicationEnvironment.<init>(CoreApplicationEnvironment.java:72)
	at org.intellij.grammar.LightPsi$MyParsing.<init>(LightPsi.java:152)
	at org.intellij.grammar.LightPsi.<clinit>(LightPsi.java:55)
	at org.intellij.grammar.Main.main(Main.java:38)
Caused by: java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory.
	at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:112)
	at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:82)
	at com.intellij.openapi.application.PathManager.getConfigPath(PathManager.java:365)
	at com.intellij.openapi.application.PathManager.getConfigDir(PathManager.java:353)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManagerKt$configFile$2.invoke(EarlyAccessRegistryManager.kt:27)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManagerKt$configFile$2.invoke(EarlyAccessRegistryManager.kt:26)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManagerKt.getConfigFile(EarlyAccessRegistryManager.kt:26)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManagerKt.access$getConfigFile(EarlyAccessRegistryManager.kt:1)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManagerKt$lazyMap$1.invoke(EarlyAccessRegistryManager.kt:33)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManagerKt$lazyMap$1.invoke(EarlyAccessRegistryManager.kt:30)
	at com.intellij.util.concurrency.SynchronizedClearableLazy._get_value_$lambda$1$lambda$0(SynchronizedClearableLazy.kt:41)
	at java.base/java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:210)
	at com.intellij.util.concurrency.SynchronizedClearableLazy.getValue(SynchronizedClearableLazy.kt:40)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManager.getString(EarlyAccessRegistryManager.kt:84)
	at com.intellij.openapi.util.registry.EarlyAccessRegistryManager.getBoolean(EarlyAccessRegistryManager.kt:75)
	at com.intellij.ide.plugins.DisabledPluginsState.<clinit>(DisabledPluginsState.kt:28)
	... 6 more
@YannCebron
Copy link
Member

What are you trying by using
intellijRelease = "242-EAP-SNAPSHOT"?
Does it work if you specify an actual release, not some snapshot?

@AlexanderBartash
Copy link
Author

AlexanderBartash commented Oct 14, 2024

No, I tried that in the second code snippet. I just saw that option and tried to use it, it did not work at all.

@YannCebron
Copy link
Member

And why do you need to specify intellijRelease ?

@AlexanderBartash
Copy link
Author

AlexanderBartash commented Oct 14, 2024

Because I want to have 1 property, which I use to build my plugin and also pass it to this plugin so that it downloads an appropriate version of GrammarKit to generate the code. Today I have 3 properties: IDE version, Grammar kit version, jflex version, all of which have to be kept in sync.

@YannCebron
Copy link
Member

Usually, just adjusting GrammarKit Gradle plugin version should be enough in most cases.

@AlexanderBartash
Copy link
Author

AlexanderBartash commented Oct 14, 2024

Well, in any case, I am ok with the way it works. I just saw a property, which seemed to be broken and reported it :)

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

No branches or pull requests

2 participants