diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be73f31..9ad4c02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,13 +12,23 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - ghidra: ["11.3"] + ghidra: ["11.3", "11.3.1", "11.3.2"] include: - ghidra: "11.3" ghidra-url: "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3_build/ghidra_11.3_PUBLIC_20250205.zip" ghidra-sha256: "73b42cec587f370bfef49809ae55d2c7a3db689e8f164a1e7d7b8de295b6359f" ghidra-filename: "ghidra_11.3_PUBLIC_20250205.zip" ghidra-folder: "ghidra_11.3_PUBLIC" + - ghidra: "11.3.1" + ghidra-url: "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3.1_build/ghidra_11.3.1_PUBLIC_20250219.zip" + ghidra-sha256: "bcda0a9de8993444766cc255964c65c042b291ddaf6c50d654e316e442b441fa" + ghidra-filename: "ghidra_11.3.1_PUBLIC_20250219.zip" + ghidra-folder: "ghidra_11.3.1_PUBLIC" + - ghidra: "11.3.2" + ghidra-url: "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3.2_build/ghidra_11.3.2_PUBLIC_20250415.zip" + ghidra-sha256: "99d45035bdcc3d6627e7b1232b7b379905a9fad76c772c920602e2b5d8b2dac2" + ghidra-filename: "ghidra_11.3.2_PUBLIC_20250415.zip" + ghidra-folder: "ghidra_11.3.2_PUBLIC" env: GHIDRA_INSTALL_DIR: /home/runner/ghidra/${{ matrix.ghidra-folder }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa66db..d4c7e43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [5.0.0] - 2025-04-25 +### Changed + - Upgrade to JRuby 10.0.0.0 (Ruby 3.4.2) + - Upgrade to Groovy 4.0.26 + - Upgrade to Kotlin 2.1.20 + +### Fixed + - Ruby console errors on non-Windows systems related to the terminal not using + the typical STDIN file descriptor. + - Kotlin engine startup now includes a warm-up evaluation so that the first + user expression does not have to wait for this. + + ## [4.2.0] - 2025-02-14 ### Changed - Upgrade to JRuby 9.4.12.0 (Ruby 3.1.4) diff --git a/build.gradle b/build.gradle index 5239088..f75d810 100644 --- a/build.gradle +++ b/build.gradle @@ -19,12 +19,12 @@ plugins { } dependencies { - implementation('org.jruby:jruby-complete:9.4.12.0') + implementation('org.jruby:jruby-complete:10.0.0.0') implementation('org.clojure:clojure:1.12.0') - implementation('org.apache.groovy:groovy:4.0.25') - implementation('org.apache.groovy:groovy-groovysh:4.0.25') + implementation('org.apache.groovy:groovy:4.0.26') + implementation('org.apache.groovy:groovy-groovysh:4.0.26') testImplementation('junit:junit:4.13.2') - runtimeOnly('org.jetbrains.kotlin:kotlin-scripting-jsr223:2.1.10') + runtimeOnly('org.jetbrains.kotlin:kotlin-scripting-jsr223:2.1.20') } test { diff --git a/src/main/java/com/goatshriek/rubydragon/kotlin/KotlinGhidraInterpreter.java b/src/main/java/com/goatshriek/rubydragon/kotlin/KotlinGhidraInterpreter.java index 4cf622c..d7ff607 100644 --- a/src/main/java/com/goatshriek/rubydragon/kotlin/KotlinGhidraInterpreter.java +++ b/src/main/java/com/goatshriek/rubydragon/kotlin/KotlinGhidraInterpreter.java @@ -208,6 +208,17 @@ public void initInteractiveInterpreter() { setVariables.forEach((name, value) -> { engine.put(name, value); }); + + // evaluate a dummy expression to warm up the engine + // without this, the first expression evaluated by the user will take + // much longer to come back + try { + engine.eval("\"warm up\""); + } catch (ScriptException e) { + + errWriter.append("could not warm up Kotlin interpreter \n"); + errWriter.flush(); + } } /** diff --git a/src/main/resources/scripts/ruby-init.rb b/src/main/resources/scripts/ruby-init.rb index 068b7f4..c03df8b 100644 --- a/src/main/resources/scripts/ruby-init.rb +++ b/src/main/resources/scripts/ruby-init.rb @@ -1,4 +1,13 @@ +# before we require irb, we need to make sure that io-console uses the stub +# console, since the STDIN stream we are using isn't a normal terminal +host_os = RbConfig::CONFIG['host_os'] +RbConfig::CONFIG['host_os'] = 'windows' + require 'irb' + +# now that irb has loaded, we can switch the host os back +RbConfig::CONFIG['host_os'] = host_os + require 'irb/completion' # allow java-like package names, and import irb and completions