Skip to content

Commit

Permalink
Fix .tool-versions and release verifyPlugin (#3630)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuataylor authored Aug 14, 2024
1 parent b3af046 commit 73014a4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: ./gradlew --stacktrace releaseQuoter
- name: Test with Gradle
run: ./gradlew --stacktrace test
runPluginVerifier:
verifyPlugin:
runs-on: ubuntu-latest

steps:
Expand All @@ -48,9 +48,9 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Plugin Verifier
run: ./gradlew --stacktrace runPluginVerifier
run: ./gradlew --stacktrace verifyPlugin
release:
needs: [ test, runPluginVerifier ]
needs: [ test, verifyPlugin ]
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: ./gradlew --stacktrace releaseQuoter
- name: Test with Gradle
run: ./gradlew --stacktrace test
runPluginVerifier:
verifyPlugin:
runs-on: ubuntu-latest

steps:
Expand Down
11 changes: 6 additions & 5 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
elixir 1.13.4-otp-24
erlang 24.3.4.6

# 17.0.12+7 / Azul Zulu: 17.52.17
# GitHub actions uses JBR 17
# 21.0.4+7 / Azul Zulu: 21.36.17
# GitHub actions uses JBR 21
# If using mise, you can change below to use JBR as well by doing (if version is 17.xxx)
# mise link java@jbrsdk_jcef-17.0.11-b1312.2-2024.2 /path/to/jbrsdk_jcef-17.0.11-xxx-xxx-b1207.24/Contents/Home
# Then setting it to `java jbrsdk_jcef-17.0.11-b1312.2-2024.2`
java zulu-17.52.17
# mac:
# mise link java@jbrsdk_jcef-21.0.3-b509.4-2024.2 /path/to/jbrsdk_jcef-21.0.3-xxx-xxx-b509.4/Contents/Home
# Then setting it to `java jbrsdk_jcef-21.0.3-b509.4-2024.2`
java zulu-21.36.17
28 changes: 13 additions & 15 deletions src/org/elixir_lang/sdk/elixir/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -531,23 +531,21 @@ ELIXIR_SDK_HOME
return if (!project.isDisposed) {
/* ModuleUtilCore.findModuleForPsiElement can fail with NullPointerException if the
ProjectFileIndex.SERVICE.getInstance(Project) returns {@code null}, so check that the
ProjectFileIndex is available first
*/
ProjectFileIndex is available first */
if (ProjectFileIndex.SERVICE.getInstance(project) != null) {
ApplicationManager.getApplication().executeOnPooledThread(Callable {
ReadAction.compute<Sdk?, Throwable> {
try {
val module = ModuleUtilCore.findModuleForPsiElement(psiElement)
if (module != null) {
mostSpecificSdk(module)
} else {
mostSpecificSdk(project)
}
} catch (_: AlreadyDisposedException) {
null
}
val module = try {
ReadAction.compute<Module, Throwable> {
ModuleUtilCore.findModuleForPsiElement(psiElement)
}
}).get()
} catch (_: AlreadyDisposedException) {
null
}

if (module != null) {
mostSpecificSdk(module)
} else {
mostSpecificSdk(project)
}
} else {
mostSpecificSdk(project)
}
Expand Down

0 comments on commit 73014a4

Please sign in to comment.