Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 2c05d07

Browse files
committed
v2: first round of code review addressed
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent 198ee00 commit 2c05d07

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

build.sbt

+3-5
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ getProtoFiles := {
9393
println(s"Downloading and installing SDK$sdkMajor protocol buffer files...")
9494

9595
val bblfshProto = s"${protoDir}/github.com/bblfsh"
96-
val sdkProto = s"${bblfshProto}/sdk.${sdkMajor}"
96+
val sdkProto = s"${bblfshProto}/sdk/${sdkMajor}"
9797

9898
s"mkdir -p ${sdkProto}/protocol" !
9999

@@ -121,7 +121,7 @@ getLibuast := {
121121
s"mv ${os}-amd64 libuast" #&&
122122
"rm -rf src/main/resources/libuast" #&&
123123
"mv libuast src/main/resources" #&&
124-
"rm src/main/resources/libuast.so" #&&
124+
"rm src/main/resources/libuast/libuast.so" #&& // always a static build
125125
"rm -rf libuast" #&&
126126
"rm libuast-bin.tar.gz" !
127127
}
@@ -156,7 +156,7 @@ def compileUnix(sourceFiles: String) = {
156156
"-I" + javaHome + "/include/ " +
157157
"-I" + javaHome + "/include/darwin " +
158158
"-Isrc/main/resources/libuast " +
159-
"-Lsrc/main/resources/libuast " +
159+
"-Lsrc/main/resources/libuast " + // sic, must be in the classpath for the test
160160
"-l uast " +
161161
"-o src/main/resources/lib/libscalauast.dylib " +
162162
sourceFiles + " "
@@ -191,8 +191,6 @@ def crossCompileMacOS(sourceFiles: String): Unit = {
191191
}
192192

193193
val cmd = osxHome + "/bin/o64-clang++-libc++ -shared -Wall -fPIC -O2 -lxml2 -std=c++11 " +
194-
"-I" + osxHome + "/SDK/MacOSX10.11.sdk/usr/include/libxml2/ " +
195-
"-I" + osxHome + "/SDK/src/libuast-native/roles.c " +
196194
"-I" + osxHome + "/SDK/MacOSX10.11.sdk/usr/include/ " +
197195
"-I/usr/lib/jvm/java-8-openjdk-amd64/include " +
198196
"-I/usr/lib/jvm/java-8-openjdk-amd64/include/linux " +

src/main/native/org_bblfsh_client_v2_libuast_Libuast.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
#include "libuast.h"
77
#include "libuast.hpp"
88

9-
JavaVM *jvm; // FIXME(bzz): double-check and document
9+
// TODO(bzz): double-check and document. Suggestion and more context at
10+
// https://github.com/bblfsh/client-scala/pull/84#discussion_r288347756
11+
JavaVM *jvm;
1012

1113
jobject asJvmBuffer(uast::Buffer buf) {
1214
JNIEnv *env = getJNIEnv();

src/main/scala/org/bblfsh/client/v2/BblfshClient.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class BblfshClient(host: String, port: Int, maxMsgSize: Int) {
100100
}
101101

102102
object BblfshClient {
103-
val DEFAULT_MAX_MSG_SIZE = 100 * 1024 * 1024
103+
val DEFAULT_MAX_MSG_SIZE = 100 * 1024 * 1024 // bytes
104104

105105
val PreOrder = 0
106106
val PostOrder = 1

0 commit comments

Comments
 (0)