Skip to content

Commit c03e3c0

Browse files
authored
Merge pull request scala#10898 from SethTisue/bye-bye-jna-hello-jni
REPL: JLine: stop using deprecated JNA
2 parents 12f5987 + 6c3d9bf commit c03e3c0

File tree

7 files changed

+7
-254
lines changed

7 files changed

+7
-254
lines changed

build.sbt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ val scalacheckDep = "org.scalacheck" %% "scalacheck"
4141
val jolDep = "org.openjdk.jol" % "jol-core" % "0.16"
4242
val asmDep = "org.scala-lang.modules" % "scala-asm" % versionProps("scala-asm.version")
4343
val jlineDep = "org.jline" % "jline" % versionProps("jline.version") classifier "jdk8"
44-
val jnaDep = "net.java.dev.jna" % "jna" % versionProps("jna.version")
45-
val jlineDeps = Seq(jlineDep, jnaDep)
4644
val testInterfaceDep = "org.scala-sbt" % "test-interface" % "1.0"
4745
val diffUtilsDep = "io.github.java-diff-utils" % "java-diff-utils" % "4.12"
4846
val compilerInterfaceDep = "org.scala-sbt" % "compiler-interface" % "1.10.3"
@@ -533,9 +531,9 @@ lazy val compiler = configureAsSubproject(project)
533531
description := "Scala Compiler",
534532
libraryDependencies += asmDep,
535533
libraryDependencies += diffUtilsDep,
536-
// These are only needed for the POM:
534+
// This is only needed for the POM:
537535
// TODO: jline dependency is only needed for the REPL shell, which should move to its own jar
538-
libraryDependencies ++= jlineDeps,
536+
libraryDependencies += jlineDep,
539537
buildCharacterPropertiesFile := (Compile / resourceManaged).value / "scala-buildcharacter.properties",
540538
Compile / resourceGenerators += generateBuildCharacterPropertiesFile.map(file => Seq(file)).taskValue,
541539
// this a way to make sure that classes from interactive and scaladoc projects
@@ -588,7 +586,6 @@ lazy val compiler = configureAsSubproject(project)
588586
|org.jline.style.*;resolution:=optional
589587
|org.jline.terminal;resolution:=optional
590588
|org.jline.terminal.impl;resolution:=optional
591-
|org.jline.terminal.impl.jna.*;resolution:=optional
592589
|org.jline.terminal.spi;resolution:=optional
593590
|org.jline.utils;resolution:=optional
594591
|org.jline.builtins;resolution:=optional
@@ -633,7 +630,7 @@ lazy val replFrontend = configureAsSubproject(project, srcdir = Some("repl-front
633630
.settings(fatalWarningsSettings)
634631
.settings(publish / skip := true)
635632
.settings(
636-
libraryDependencies ++= jlineDeps,
633+
libraryDependencies += jlineDep,
637634
name := "scala-repl-frontend",
638635
)
639636
.settings(
@@ -1170,7 +1167,7 @@ lazy val scalaDist = Project("scalaDist", file(".") / "target" / "scala-dist-dis
11701167
(htmlOut ** "*.html").get ++ (fixedManOut ** "*.1").get
11711168
}.taskValue,
11721169
Compile / managedResourceDirectories := Seq((Compile / resourceManaged).value),
1173-
libraryDependencies ++= jlineDeps,
1170+
libraryDependencies += jlineDep,
11741171
apiURL := None,
11751172
fixPom(
11761173
"/project/name" -> <name>Scala Distribution Artifacts</name>,
@@ -1332,7 +1329,7 @@ lazy val dist = (project in file("dist"))
13321329
.settings(commonSettings)
13331330
.settings(
13341331
bspEnabled := false,
1335-
libraryDependencies ++= jlineDeps,
1332+
libraryDependencies += jlineDep,
13361333
mkBin := mkBinImpl.value,
13371334
mkQuick := Def.task {
13381335
val cp = (testP / IntegrationTest / fullClasspath).value
@@ -1347,11 +1344,7 @@ lazy val dist = (project in file("dist"))
13471344
Compile / packageBin := {
13481345
val targetDir = (ThisBuild / buildDirectory).value / "pack" / "lib"
13491346
val jlineJAR = findJar((Compile / dependencyClasspath).value, jlineDep).get.data
1350-
val jnaJAR = findJar((Compile / dependencyClasspath).value, jnaDep).get.data
1351-
val mappings = Seq(
1352-
(jlineJAR, targetDir / "jline.jar"),
1353-
(jnaJAR, targetDir / "jna.jar"),
1354-
)
1347+
val mappings = Seq((jlineJAR, targetDir / "jline.jar"))
13551348
IO.copy(mappings, CopyOptions() withOverwrite true)
13561349
targetDir
13571350
},

doc/LICENSE.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ limitations under the License.
2525
This software includes projects with the following licenses,
2626
which are also included in the `licenses/` directory:
2727

28-
### [Apache License](http://www.apache.org/licenses/LICENSE-2.0.html)
29-
This license is used by the following third-party libraries:
30-
31-
* JNA
32-
3328
### [BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
3429
This license is used by the following third-party libraries:
3530

doc/License.rtf

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ Unless required by applicable law or agreed to in writing, software distributed
4040
\f0\b0\fs28 \cf2 This software includes projects with the following licenses, which are also included in the\'a0\cb5 licenses/\cb1 \'a0directory:\
4141
\pard\pardeftab720\sl300\partightenfactor0
4242

43-
\f1\b \cf3 \
44-
\pard\pardeftab720\sl360\sa320\partightenfactor0
45-
{\field{\*\fldinst{HYPERLINK "http://www.apache.org/licenses/LICENSE-2.0.html"}}{\fldrslt \cf3 Apache License}}\cf2 \
46-
\pard\pardeftab720\sl360\sa320\partightenfactor0
47-
48-
\f0\b0 \cf2 This license is used by the following third-party libraries:\
49-
\pard\tx220\tx720\pardeftab720\li720\fi-720\sl360\partightenfactor0
50-
\ls1\ilvl0\cf2 \kerning1\expnd0\expndtw0 {\listtext \uc0\u8226 }\expnd0\expndtw0\kerning0
51-
JNA\
52-
\pard\pardeftab720\sl300\partightenfactor0
53-
5443
\f1\b \cf3 \
5544
\pard\pardeftab720\sl360\sa320\partightenfactor0
5645
{\field{\*\fldinst{HYPERLINK "http://www.opensource.org/licenses/bsd-license.php"}}{\fldrslt \cf3 BSD License}}\cf2 \

doc/licenses/apache_jna.txt

Lines changed: 0 additions & 205 deletions
This file was deleted.

0 commit comments

Comments
 (0)