Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Reflective Access when Loading OpenCV #1727

Merged
merged 5 commits into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ jobs:
$ENGINE_DIST_DIR/bin/enso --run test/Database_Tests
$ENGINE_DIST_DIR/bin/enso --run test/Geo_Tests
$ENGINE_DIST_DIR/bin/enso --run test/Visualization_Tests
$ENGINE_DIST_DIR/bin/enso --run test/Image_Tests

- name: Test Engine Distribution (Windows)
shell: bash
Expand All @@ -247,6 +248,7 @@ jobs:
$ENGINE_DIST_DIR/bin/enso.bat --run test/Database_Tests
$ENGINE_DIST_DIR/bin/enso.bat --run test/Geo_Tests
$ENGINE_DIST_DIR/bin/enso.bat --run test/Visualization_Tests
$ENGINE_DIST_DIR/bin/enso.bat --run test/Image_Tests

# Publish
- name: Publish the Engine Distribution Artifact
Expand Down
6 changes: 6 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Enso Next

## Libraries

- Removed reflective access when loading OpenCV library
4e6 marked this conversation as resolved.
Show resolved Hide resolved
([#1727](https://github.com/enso-org/enso/pull/1727)). Illegal reflective
access operations were deprecated and will be denied in future JVM releases.

## Miscellaneous

- Adding a pipeline for automatic nightly builds - during the night after each
Expand Down
4 changes: 1 addition & 3 deletions std-bits/src/main/java/org/enso/image/Codecs.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.enso.image;

import org.enso.image.opencv.OpenCV;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfInt;
import org.opencv.imgcodecs.Imgcodecs;
Expand All @@ -12,8 +11,7 @@ public class Codecs {
public static final int READ_FLAG_EMPTY = -127;

static {
OpenCV.loadShared();
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
OpenCV.loadLocally();
}

/** An error occurred when reading a file. */
Expand Down
3 changes: 1 addition & 2 deletions std-bits/src/main/java/org/enso/image/data/Image.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
public class Image {

static {
OpenCV.loadShared();
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
OpenCV.loadLocally();
}

private static final byte MAX_SIGNED_BYTE = -1;
Expand Down
3 changes: 1 addition & 2 deletions std-bits/src/main/java/org/enso/image/data/Matrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
public class Matrix {

static {
OpenCV.loadShared();
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
OpenCV.loadLocally();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/Image_Tests/src/Codecs_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Standard.Test
polyglot java import java.lang.System as Java_System

fetch addr file =
Process.run_command "curl" [addr, "--silent", "--output", file.path]
Process.run "curl" [addr, "--silent", "--output", file.path]

spec =
is_ci = Java_System.getenv "CI" == "true"
Expand Down