Skip to content

Commit

Permalink
IntelliJ Extension: Fix shared library paths (#352)
Browse files Browse the repository at this point in the history
* Fix sharedlib paths
  • Loading branch information
infiniteregrets authored Sep 6, 2022
1 parent aaf34c9 commit fb69d99
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- Fix bug where VS Code extension would crash on startup due to new configuration values not being the correct type.
- Unset DYLD_INSERT_LIBRARIES/LD_PRELOAD when creating the agent. Closes [[#330](https://github.com/metalbear-co/mirrord/issues/330)].
- Fix NullPointerException in IntelliJ Extension. Closes [[#335](https://github.com/metalbear-co/mirrord/issues/335)].

- FIx dylib/so paths for the IntelliJ Extension. Closes [[#337](https://github.com/metalbear-co/mirrord/pull/352)].
## 2.12.0
### Added
- Add more configuration values to the VS Code extension.
Expand Down
33 changes: 14 additions & 19 deletions intellij-ext/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repositories {
}
dependencies {
implementation("io.kubernetes:client-java:16.0.0") {
exclude(group="org.slf4j", module = "slf4j-api")
exclude(group = "org.slf4j", module = "slf4j-api")
}
}

Expand Down Expand Up @@ -69,31 +69,26 @@ tasks {

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription.set(
projectDir.resolve("README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
projectDir.resolve("README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
)
}

prepareSandbox {
doLast {
copy {
from(file("$projectDir/libmirrord_layer.dylib"))
into(file("$buildDir/idea-sandbox/config"))
}
copy {
from(file("$projectDir/libmirrord_layer.so"))
into(file("$buildDir/idea-sandbox/config"))
}
from(file("$projectDir/libmirrord_layer.dylib")) {
into(pluginName.get())
}
from(file("$projectDir/libmirrord_layer.so")) {
into(pluginName.get())
}
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ data class MirrordDefaultData(val ldPreloadPath: String, val dylibPath: String,
}

private fun getSharedLibPath(libName: String): String {
return Paths.get(PathManager.getConfigPath(), libName).toString()
return Paths.get(PathManager.getPluginsPath(), "mirrord", libName).toString()
}

0 comments on commit fb69d99

Please sign in to comment.