Skip to content

Commit ec1dcb6

Browse files
author
extempore
committed
Updated jline build to use xsbt 0.9.9 and rebuilt, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25034 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
1 parent 3abf201 commit ec1dcb6

File tree

11 files changed

+72
-55
lines changed

11 files changed

+72
-55
lines changed

lib/jline.jar

224 Bytes
Binary file not shown.

src/jline/TEST-NOTE.txt

-4
This file was deleted.

src/jline/build.sbt

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
seq(ProguardPlugin.proguardSettings :_*)
2+
3+
name := "jline"
4+
5+
organization := "org.scala-lang"
6+
7+
version := "2.10.0-SNAPSHOT"
8+
9+
scalaVersion := "2.9.0-1"
10+
11+
// Only need these because of weird testing jline issues.
12+
retrieveManaged := true
13+
14+
parallelExecution in Test := false
15+
16+
libraryDependencies ++= Seq(
17+
"org.fusesource.jansi" % "jansi" % "1.4",
18+
"com.novocode" % "junit-interface" % "0.7" % "test->default"
19+
)
20+
21+
javacOptions ++= Seq("-target", "1.5")
22+
23+
proguardOptions ++= Seq(
24+
"-dontshrink",
25+
"-keep class *",
26+
"-keepdirectories"
27+
)
28+
29+
proguardInJars := Nil
30+
31+
makeInJarFilter ~= { prevFilter =>
32+
val jansiFilter = List(
33+
"!META-INF/MANIFEST.MF",
34+
"org/fusesource/hawtjni/runtime",
35+
"org/fusesource/hawtjni/runtime/Callback.class",
36+
"org/fusesource/hawtjni/runtime/Library.class",
37+
"!org/fusesource/hawtjni/**",
38+
"!META-INF/maven/org.fusesource.hawtjni",
39+
"!META-INF/maven/org.fusesource.jansi",
40+
"!META-INF/maven/org.fusesource.hawtjni/**",
41+
"!META-INF/maven/org.fusesource.jansi/**"
42+
).mkString(",")
43+
// In sbt 0.9.8 the scala-library.jar line was not necessary,
44+
// but in 0.9.9 it started showing up here. Who knows.
45+
file =>
46+
if (file startsWith "jansi-") jansiFilter
47+
else if (file == "scala-library.jar") "!**"
48+
else prevFilter(file)
49+
}

src/jline/manual-test.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Apparently the jline bundled with sbt interferes with testing some
4+
# changes: for instance after changing the keybindings I kept seeing
5+
# failures until I realized what was happening and bypassed sbt, like this.
6+
7+
java -cp lib_managed/jar/com.novocode/junit-interface/junit-interface-0.5.jar:lib_managed/jar/junit/junit/junit-4.8.1.jar:lib_managed/jar/org.fusesource.jansi/jansi/jansi-1.4.jar:lib_managed/jar/org.scala-tools.testing/test-interface/test-interface-0.5.jar:target/scala-2.9.0.1/test-classes:target/scala-2.9.0.1/jline_2.9.0-1-2.10.0-SNAPSHOT.jar \
8+
org.junit.runner.JUnitCore scala.tools.jline.console.EditLineTest

src/jline/project/build.properties

-8
This file was deleted.

src/jline/project/build/JlineProject.scala

-35
This file was deleted.

src/jline/project/plugins/Plugins.scala

-5
This file was deleted.

src/jline/project/plugins/build.sbt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resolvers += "Proguard plugin repo" at "http://siasia.github.com/maven2"
2+
3+
libraryDependencies <<= (libraryDependencies, appConfiguration) { (deps, app) =>
4+
deps :+ "com.github.siasia" %% "xsbt-proguard-plugin" % app.provider.id.version
5+
}

src/jline/project/plugins/project/build.properties

-3
This file was deleted.

src/jline/src/main/java/scala/tools/jline/console/ConsoleReader.java

+9
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,15 @@ int getKeyForAction(final Operation op) {
11201120
return getKeyForAction(op.code);
11211121
}
11221122

1123+
public void printBindings() {
1124+
System.out.println("printBindings(): keyBindings.length = " + keyBindings.length);
1125+
for (int i = 0; i < keyBindings.length; i++) {
1126+
if (keyBindings[i] != Operation.UNKNOWN.code) {
1127+
System.out.println("keyBindings[" + i + "] = " + keyBindings[i]);
1128+
}
1129+
}
1130+
}
1131+
11231132
/**
11241133
* Reads the console input and returns an array of the form [raw, key binding].
11251134
*/

src/jline/src/test/java/scala/tools/jline/console/ConsoleReaderTestSupport.java

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ private int getKeyForAction(final short logicalAction) {
6565
int action = console.getKeyForAction(logicalAction);
6666

6767
if (action == -1) {
68+
console.printBindings();
6869
fail("Keystroke for logical action " + logicalAction + " was not bound in the console");
6970
}
7071

0 commit comments

Comments
 (0)