-
Notifications
You must be signed in to change notification settings - Fork 78
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
Incorrect version of native library? #93
Comments
Ah no, I guess I was unaware of that file needing to be updated. It should reflect the same version. |
This is a temporary fix; this file needs to source the version from the same place that the Maven release tasks do. See #93
I updated this so it will match for 1.3.2 but this is just a temporary fix... we need to get this version sourced from the same place as the Maven build or it will get stale again. |
I have to revert this because the prebuilt JNI stubs all are set up with the old "1.2" version, so changing this manually will cause them to not be found and we will unpack new versions of them. I will open a PR to fix the versioning issue correctly, but it will be messy. |
This reverts commit eb475ee. The version used here is stale, but it matches the filenames of the prebuilt native stubs. We can't change it here without also rebuilding all those libraries renaming them (pushing the problem to next release) or eliminating version numbers from the packaged stubs. See #93.
Here is a diff I started to do this, but I think we should look into the maven native plugin and helper library for doing this, rather than having all these weird builds and version numbers floating around: diff --git a/pom.xml b/pom.xml
index fc3258d..b57b69e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -224,6 +224,7 @@
<property name="dist.dir" value="${project.build.directory}" />
<property name="build.dir" value="${project.build.directory}" />
<property name="build.classes.dir" value="${project.build.outputDirectory}" />
+ <property name="jffi.version" value="${project.version}" />
<ant antfile="version.xml" dir="." target="-generate-version-source" />
</tasks>
<sourceRoot>
diff --git a/version.xml b/version.xml
index 14889e3..9a99cfe 100644
--- a/version.xml
+++ b/version.xml
@@ -1,7 +1,4 @@
<project name="version" default="default" basedir=".">
- <property name="jffi.version.major" value="1"/>
- <property name="jffi.version.minor" value="3"/>
- <property name="jffi.version.micro" value="2"/>
<target name="-generate-version-source" depends="">
<echo message="Generating Version.java"/>
<mkdir dir="${build.classes.dir}"/>
@@ -12,11 +9,16 @@
public final class Version {
private Version() {}
@Native
- public static final int MAJOR = ${jffi.version.major};
+ public static final String VERSION = "${jffi.version}".replace("-SNAPSHOT", "");
+
+ private static final String[] VERSION_COMPONENTS = VERSION.split(".");
+
@Native
- public static final int MINOR = ${jffi.version.minor};
+ public static final int MAJOR = Integer.valueOf(VERSION_COMPONENTS[0]);
@Native
- public static final int MICRO = ${jffi.version.micro};
+ public static final int MINOR = Integer.valueOf(VERSION_COMPONENTS[1]);
+ @Native
+ public static final int MICRO = Integer.valueOf(VERSION_COMPONENTS[2]);
}
</echo>
</target> |
This was disabled over a decade ago, perhaps to avoid building the native library for every mvn package. This is a first step to getting these tests enabled, which would have prevented the regression almost caused by naively fixing jnr#93.
The latest jffi has been released as 1.3.1, but native jffi library is still on 1.2.8 (defined in version.xml). Is this intentional or a mistake?
The text was updated successfully, but these errors were encountered: