Skip to content

Commit

Permalink
Update dependencies for Big Sur (facebook#2580)
Browse files Browse the repository at this point in the history
* Update JNA to resolve framework loading issue on Big Sur

java-native-access/jna#1215

* Remove workaround initializing JNA early

java-native-access/jna#652

This issue was resolved and property SIZE does not exist with JNA version 5.6.0.

* Update NuProcess to 2.0.1 for compatibility with JNA

* Build NuProcess with openjdk version "1.8.0_275"

jetty/jetty.project#3244

* Cherry pick a2912b9

facebook@a2912b9
  • Loading branch information
jasonnam authored and shepting committed Nov 11, 2021
1 parent 6f92257 commit 28b5ea0
Show file tree
Hide file tree
Showing 52 changed files with 139 additions and 73 deletions.
22 changes: 11 additions & 11 deletions .idea/libraries/buck_lib.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions .idea/libraries/jna.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions .idea/libraries/jna_4_5_1.xml

This file was deleted.

11 changes: 11 additions & 0 deletions .idea/libraries/jna_5_6_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions .idea/libraries/jna_platform.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions buck.iml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
<orderEntry type="library" name="eden" level="project" />
<orderEntry type="library" name="java-thrift-dependencies" level="project" />
<orderEntry type="library" name="xz-java-1.5" level="project" />
<orderEntry type="library" name="jna-4.5.1" level="project" />
<orderEntry type="library" name="jna-platform-4.5.1" level="project" />
<orderEntry type="library" name="jna-5.6.0" level="project" />
<orderEntry type="library" name="jna-platform-5.6.0" level="project" />
<orderEntry type="library" name="diffutils-1.3.0" level="project" />
<orderEntry type="library" name="okio" level="project" />
<orderEntry type="library" name="okhttp" level="project" />
Expand Down
12 changes: 6 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@
<include name="jackson/jackson-module-kotlin-2.9.9.jar" />
<include name="kotlin/kotlin-reflect.jar" />
<include name="android/sdklib-25.3.0.jar" />
<include name="nailgun/nailgun-server-1.0.0.jar" />
<include name="jna/jna-4.5.1.jar" />
<include name="jna/jna-platform-4.5.1.jar" />
<include name="nailgun/nailgun-server-1.0.1.jar" />
<include name="jna/jna-5.6.0.jar" />
<include name="jna/jna-platform-5.6.0.jar" />
<include name="sqlite/sqlite-jdbc-3.20.0.jar" />
<include name="bazel/bazel_deploy.jar" />
<include name="remote-apis/remote-apis.jar" />
Expand All @@ -168,7 +168,7 @@

<fileset dir="${third-party.dir}/java" id="third-party.jars">
<patternset refid="third-party.jars.private"/>
<include name="ObjCBridge/ObjCBridge.jar" />
<include name="ObjCBridge/java-objc-bridge-1.1-SNAPSHOT.jar" />
<include name="aapt2-proto/aapt2-proto-0.4.0.jar" />
<include name="android/common-25.3.0.jar" />
<include name="android/layoutlib-api-25.3.0.jar" />
Expand Down Expand Up @@ -229,14 +229,14 @@
<include name="kotlinx-metadata-jvm/kotlinx-metadata-jvm-0.1.0.jar" />
<include name="jsr/javax.inject-1.jar" />
<include name="jsr/jsr305.jar" />
<include name="nuprocess/nuprocess-1.2.4.jar" />
<include name="nuprocess/nuprocess-2.0.1.jar" />
<include name="objenesis/objenesis-1.2.jar" />
<include name="okhttp/okhttp-3.11.0.jar" />
<include name="okhttp/okhttp-tls-3.11.0.jar" />
<include name="okio/okio-1.13.0.jar" />
<include name="opencensus/opencensus-api-0.24.0.jar" />
<include name="opencensus/opencensus-contrib-grpc-metrics-0.24.0.jar" />
<include name="oshi/oshi-core-3.3-SNAPSHOT.jar" />
<include name="oshi/oshi-core-5.2.5.jar" />
<include name="pf4j/pf4j-2.0.0-SNAPSHOT.jar" />
<include name="protobuf/protobuf-java-3.7.0.jar" />
<include name="protobuf/protobuf-java-util-3.7.0.jar" />
Expand Down
12 changes: 6 additions & 6 deletions programs/classpaths
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ third-party/java/jackson/jackson-datatype-jdk8-2.9.7.jar
third-party/java/jackson/jackson-module-kotlin-2.9.9.jar
third-party/java/jdom/jdom-2.0.6.jar
third-party/java/jetty/jetty-all-9.4.9.v20180320-uber.jar
third-party/java/jna/jna-4.5.1.jar
third-party/java/jna/jna-platform-4.5.1.jar
third-party/java/jna/jna-5.6.0.jar
third-party/java/jna/jna-platform-5.6.0.jar
third-party/java/jopt-simple/jopt-simple-4.6.jar
third-party/java/json-simple/json-simple-1.1.1.jar
third-party/java/jsr/javax.inject-1.jar
third-party/java/jsr/jsr305.jar
third-party/java/kxml2/kxml2-2.3.0.jar
third-party/java/nailgun/nailgun-server-1.0.0.jar
third-party/java/nuprocess/nuprocess-1.2.4.jar
third-party/java/ObjCBridge/ObjCBridge.jar
third-party/java/nailgun/nailgun-server-1.0.1.jar
third-party/java/nuprocess/nuprocess-2.0.1.jar
third-party/java/ObjCBridge/java-objc-bridge-1.1-SNAPSHOT.jar
third-party/java/objenesis/objenesis-1.2.jar
third-party/java/okhttp/okhttp-3.9.0.jar
third-party/java/okio/okio-1.13.0.jar
third-party/java/oshi/oshi-core-3.3-SNAPSHOT.jar
third-party/java/oshi/oshi-core-5.2.5.jar
third-party/java/opencensus/opencensus-api-0.24.0.jar
third-party/java/opencensus/opencensus-contrib-grpc-metrics-0.24.0.jar
third-party/java/pf4j/pf4j-2.0.0-SNAPSHOT.jar
Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/cli/BuckDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class BuckDaemon {
*
* <p>See: https://github.com/java-native-access/jna/issues/652
*/
public static final int JNA_POINTER_SIZE = Pointer.SIZE;
public static final int JNA_POINTER_SIZE = Native.POINTER_SIZE;

private static final int AFTER_COMMAND_AUTO_GC_DELAY_MS = 5000;
private static final int SUBSEQUENT_GC_DELAY_MS = 10000;
Expand Down
4 changes: 2 additions & 2 deletions src/com/facebook/buck/cli/MainRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.sun.jna.Pointer;
import com.sun.jna.Native;
import java.io.Closeable;
import java.io.FileNotFoundException;
import java.io.IOException;
Expand Down Expand Up @@ -284,7 +284,7 @@ public final class MainRunner {
*
* <p>See: https://github.com/java-native-access/jna/issues/652
*/
public static final int JNA_POINTER_SIZE = Pointer.SIZE;
public static final int JNA_POINTER_SIZE = Native.POINTER_SIZE;

private static final Optional<String> BUCKD_LAUNCH_TIME_NANOS =
Optional.ofNullable(System.getProperty("buck.buckd_launch_time_nanos"));
Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/util/ProcessHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static ProcessHelper getInstance() {
try {
LOG.verbose("Getting process tree...");
OperatingSystem os = OSHI.getOperatingSystem();
OSProcess[] processes = os.getProcesses(100, OperatingSystem.ProcessSort.NEWEST);
List<OSProcess> processes = os.getProcesses(100, OperatingSystem.ProcessSort.NEWEST);
for (OSProcess process : processes) {
tree.add(process);
}
Expand Down
3 changes: 2 additions & 1 deletion third-party/java/ObjCBridge/BUCK
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
prebuilt_jar(
name = "ObjCBridge",
binary_jar = "ObjCBridge.jar",
binary_jar = "java-objc-bridge-1.1-SNAPSHOT.jar",
licenses = [
"LICENSE",
],
source_jar = "java-objc-bridge-1.1-SNAPSHOT-sources.jar",
visibility = ["PUBLIC"],
deps = [
"//third-party/java/jna:jna",
Expand Down
Binary file removed third-party/java/ObjCBridge/ObjCBridge.jar
Binary file not shown.
14 changes: 12 additions & 2 deletions third-party/java/ObjCBridge/README.facebook
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Project: Java Objective-C Bridge
Version: Git revision c22107743c2751f1fbaef3f509d59683f16adb60
Release Date: 2014-08-06
Version: Git revision c38d607820e18bdc607067457ba6680a6277f7cd
Release Date: Sun Nov 3 19:35:06 2019 +0100
Website: https://github.com/shannah/Java-Objective-C-Bridge/
License: Apache 2.0
Description: JNA library to allow Java programs to invoke Objective-C APIs
Instructions:
brew install maven
brew install gpg
gpg --gen-key
git clone https://github.com/shannah/Java-Objective-C-Bridge.git
cd Java-Objective-C-Bridge
Edit pom.xml (or apply patch.diff)
Change <maven.compiler.target> to version 8
Change <maven.compiler.source> to version 8
mvn clean install -Drelease=true
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified third-party/java/ObjCBridge/libjcocoa.dylib
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.libjcocoa.dylib</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
27 changes: 27 additions & 0 deletions third-party/java/ObjCBridge/patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/pom.xml b/pom.xml
index 76d7547..50fef9a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,8 +40,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.target>11</maven.compiler.target>
- <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>8</maven.compiler.target>
+ <maven.compiler.source>8</maven.compiler.source>
<xcodeScheme>Debug</xcodeScheme>
</properties>

diff --git a/src/main/java/ca/weblite/objc/Proxy.java b/src/main/java/ca/weblite/objc/Proxy.java
index 0654519..7aba1f5 100644
--- a/src/main/java/ca/weblite/objc/Proxy.java
+++ b/src/main/java/ca/weblite/objc/Proxy.java
@@ -501,7 +501,6 @@ public class Proxy implements Peerable {
*/
@Override
public String toString(){
- System.out.println("The peer is "+getPeer());
if ( getPeer() == null ){
return "null";
}
8 changes: 4 additions & 4 deletions third-party/java/jna/BUCK
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
prebuilt_jar(
name = "jna",
binary_jar = "jna-4.5.1.jar",
binary_jar = "jna-5.6.0.jar",
licenses = [
"LICENSE",
],
source_jar = "jna-4.5.1-sources.jar",
source_jar = "jna-5.6.0-sources.jar",
visibility = ["PUBLIC"],
)

prebuilt_jar(
name = "jna-platform",
binary_jar = "jna-platform-4.5.1.jar",
binary_jar = "jna-platform-5.6.0.jar",
licenses = [
"LICENSE",
],
source_jar = "jna-platform-4.5.1-sources.jar",
source_jar = "jna-platform-5.6.0-sources.jar",
visibility = ["PUBLIC"],
)
4 changes: 2 additions & 2 deletions third-party/java/jna/README.facebook
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ README for JNA

URL: https://github.com/java-native-access/jna
Downloaded From:
http://central.maven.org/maven2/net/java/dev/jna/jna/4.5.1/
http://central.maven.org/maven2/net/java/dev/jna/jna-platform/4.5.1/
https://search.maven.org/artifact/net.java.dev.jna/jna/5.6.0/jar
https://search.maven.org/artifact/net.java.dev.jna/jna-platform/5.6.0/jar
License: Apache 2.0 and LPGL 2.1 dual license
Binary file removed third-party/java/jna/jna-4.5.1-sources.jar
Binary file not shown.
Binary file removed third-party/java/jna/jna-4.5.1.jar
Binary file not shown.
Binary file added third-party/java/jna/jna-5.6.0-javadoc.jar
Binary file not shown.
Binary file added third-party/java/jna/jna-5.6.0-sources.jar
Binary file not shown.
Binary file added third-party/java/jna/jna-5.6.0.jar
Binary file not shown.
Binary file removed third-party/java/jna/jna-platform-4.5.1-sources.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions third-party/java/nailgun/BUCK
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
prebuilt_jar(
name = "nailgun",
binary_jar = "nailgun-server-1.0.0.jar",
binary_jar = "nailgun-server-1.0.1.jar",
licenses = [
"LICENSE",
],
source_jar = "nailgun-server-1.0.0-sources.jar",
source_jar = "nailgun-server-1.0.1-sources.jar",
visibility = [
"//src/com/facebook/buck/cli:cli",
"//src/com/facebook/buck/cli/exceptions/handlers:handlers",
Expand Down
7 changes: 4 additions & 3 deletions third-party/java/nailgun/README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
nailgun-server-1.0.0.jar and nailgun-server-1.0.0-sources.jar were
built from https://github.com/facebook/nailgun
Repository: https://github.com/facebook/nailgun
URL: https://search.maven.org/artifact/com.facebook/nailgun-server/1.0.1/jar
Version: 1.0.1

To regenerate these jars:
Build Instructions:

0) install maven (brew install maven)
1) git clone https://github.com/facebook/nailgun
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions third-party/java/nuprocess/BUCK
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
prebuilt_jar(
name = "nuprocess",
binary_jar = "nuprocess-1.2.4.jar",
binary_jar = "nuprocess-2.0.1.jar",
licenses = [
"LICENSE",
],
source_jar = "nuprocess-1.2.4-sources.jar",
source_jar = "nuprocess-2.0.1-sources.jar",
visibility = ["PUBLIC"],
deps = [
"//third-party/java/jna:jna",
Expand Down
Loading

0 comments on commit 28b5ea0

Please sign in to comment.