morphonets / SNT

The ImageJ framework for quantification of neuronal anatomy
https://imagej.net/plugins/snt
GNU General Public License v3.0
42 stars 18 forks source link

Prepare v4.3.0 release #212

Open tferr opened 11 months ago

tferr commented 11 months ago

The next release (v4.3.0) has major changes, notably: minimum Java11 requirement, several changes to auto-tracing and path refining, plus a whole slew of bug-fixes/patches/tweaks. I suspect somethings may break, and it would be useful to plan ahead. Things that we should do:

@carshadi, agree? comments?

carshadi commented 11 months ago

Sounds good to me, I'll look into the Windows bundle

tferr commented 10 months ago

Awesome! We can use SNT-v4.3.0-pre-release1 (mapped to 746b1d2de6ad7e40585298252a0efe315c660324) as a freeze point. It includes some minor improvements I had laying around on stalled branches, and more recent work I needed: tweaks to auto-tracing and Weka integration:

carshadi commented 10 months ago

@tferr when I try to open Rec. Viewer, I get this error on Windows 11

Caused by: java.lang.UnsatisfiedLinkError: Couldn't load library 'gluegen_rt'
    at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:634)
    at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
    at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:107)
    at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:488)
    at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:427)
    at com.jogamp.common.os.Platform$1.run(Platform.java:321)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at com.jogamp.common.util.SecurityUtil.doPrivileged(SecurityUtil.java:82)
    at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
    at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
    at org.jzy3d.chart.Settings.detectProfile(Settings.java:28)
    at org.jzy3d.chart.Settings.<init>(Settings.java:13)
    at org.jzy3d.chart.Settings.getInstance(Settings.java:58)
    at sc.fiji.snt.viewer.Viewer3D.<init>(Viewer3D.java:351)
    at sc.fiji.snt.viewer.Viewer3D.<init>(Viewer3D.java:370)
    at sc.fiji.snt.viewer.Viewer3D.<init>(Viewer3D.java:381)
    at sc.fiji.snt.viewer.Viewer3D.<init>(Viewer3D.java:415)
    at sc.fiji.snt.SNTUI$SNTViewer3D.<init>(SNTUI.java:4258)
    at sc.fiji.snt.SNTUI$1RecWorker.doInBackground(SNTUI.java:1922)
    at sc.fiji.snt.SNTUI$1RecWorker.doInBackground(SNTUI.java:1917)
    at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)

According to https://jogamp.org/wiki/index.php?title=Maven , the native libraries for all platforms are included with the following maven dependencies

 <dependencies>
    <dependency>
      <groupId>org.jogamp.gluegen</groupId>
      <artifactId>gluegen-rt-main</artifactId>
      <version>2.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.jogamp.jogl</groupId>
      <artifactId>jogl-all-main</artifactId>
      <version>2.3.2</version>
    </dependency>
  </dependencies>

I tested it in https://github.com/morphonets/SNT/commit/8c9d5f31e6e7c960e1be4cbce80288fdade93272 and it seems to work.

tferr commented 10 months ago

Bummer and weird. That 2.3.2 is the last official version from 2015(!). If I recall correctly, there was patched 2.4.0 version released earlier last year that was pushed to Maven by Jzy3D. I think Curtis worked on that so that our parent scijava pom would use that instead. My understanding is that the 2.4.0 version is the one currently in use by Fiji (JDK8) on all platforms. I predict downgrading it may cause conflicts elsewhere!? Shall we bring this up on Zulip?

carshadi commented 10 months ago

I see, yeah we should definitely bring this up

tferr commented 10 months ago

@carshadi , are you able to test Curtis's suggestion: https://imagesc.zulipchat.com/#narrow/stream/327238-Fiji/topic/Problems.20with.20JOGL.20dependencies.20on.20Windows.2011/near/413230673?

carshadi commented 10 months ago

This works for me

tferr commented 10 months ago

Curtis' fix added: Let's target https://github.com/morphonets/SNT/releases/tag/SNT-v4.3.0-pre-release2 (21ea56bbfd1b03b744eedf6cfe2662d285d3f1b6)

elect86 commented 8 months ago

Hello Tiago, could you publish the 4.3.0-pre-release2?

I'd like to update the Scijava pom and get rid of the exclusions about org.jzy3d:jzy3d-emul-gl and org.jzy3d:jGL

tferr commented 8 months ago

Hi @elect86, I don't seem to be able to do a release. I get this error weird javadoc-related error that I cannot make sense, specially since javadoc is disabled in the pom. Also mvn javadoc:javadoc | grep error detects nothing. Do you know what is causing this?

BUILD FAILURE ``` ❯ ../scijava-scripts/release-version.sh --skip-version-check --skip-license-update 4.3.0-beta-2 From https://github.com/morphonets/SNT * branch main -> FETCH_HEAD ========================================================================== NOTE: pom.xml.releaseBackup was committed to source control. Removing now. ========================================================================== fatal: pathspec 'pom.xml.releaseBackup' did not match any files openjdk 21.0.2 2024-01-16 LTS OpenJDK Runtime Environment Zulu21.32+17-CA (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Zulu21.32+17-CA (build 21.0.2+13-LTS, mixed mode, sharing) [INFO] Scanning for projects... [INFO] [INFO] -------------------------< org.morphonets:SNT >------------------------- [INFO] Building SNT 4.2.2-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-release-plugin:3.0.1:prepare (default-cli) @ SNT --- [INFO] starting prepare goal, composed of 17 phases: check-poms, scm-check-modifications, check-dependency-snapshots, create-backup-poms, map-release-versions, input-variables, map-development-versions, rewrite-poms-for-release, generate-release-poms, run-preparation-goals, scm-commit-release, scm-tag, rewrite-poms-for-development, remove-release-poms, run-completion-goals, scm-commit-development, end-release [INFO] 1/17 prepare:check-poms [INFO] 2/17 prepare:scm-check-modifications [INFO] Verifying that there are no local modifications... [INFO] ignoring changes on: **/pom.xml.releaseBackup, **/pom.xml.next, **/pom.xml.tag, **/pom.xml.branch, **/release.properties, **/pom.xml.backup [INFO] Executing: /bin/sh -c cd '/home/tferr/code/SNT' && 'git' 'rev-parse' '--show-prefix' [INFO] Working directory: /home/tferr/code/SNT [INFO] Executing: /bin/sh -c cd '/home/tferr/code/SNT' && 'git' 'status' '--porcelain' '.' [INFO] Working directory: /home/tferr/code/SNT [WARNING] Ignoring unrecognized line: ?? release.properties [INFO] 3/17 prepare:check-dependency-snapshots [INFO] Checking dependencies and plugins for snapshots ... [INFO] 4/17 prepare:create-backup-poms [INFO] Creating pom.xml backup with .releaseBackup suffix [INFO] 5/17 prepare:map-release-versions [INFO] 6/17 prepare:input-variables [INFO] 7/17 prepare:map-development-versions [INFO] 8/17 prepare:rewrite-poms-for-release [INFO] Transforming pom.xml SNT 'SNT'... [INFO] 9/17 prepare:generate-release-poms [INFO] Not generating release POMs [INFO] 10/17 prepare:run-preparation-goals [INFO] Executing goals 'clean verify'... [INFO] openjdk 21.0.2 2024-01-16 LTS [INFO] OpenJDK Runtime Environment Zulu21.32+17-CA (build 21.0.2+13-LTS) [INFO] OpenJDK 64-Bit Server VM Zulu21.32+17-CA (build 21.0.2+13-LTS, mixed mode, sharing) [INFO] [INFO] Scanning for projects... [INFO] [INFO] [INFO] [INFO] -------------------------< org.morphonets:SNT >------------------------- [INFO] [INFO] Building SNT 4.3.0-beta-2 [INFO] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] [INFO] [INFO] --- maven-clean-plugin:3.3.1:clean (default-clean) @ SNT --- [INFO] [INFO] Deleting /home/tferr/code/SNT/target [INFO] [INFO] [INFO] [INFO] --- maven-enforcer-plugin:3.3.0:enforce (enforce-rules) @ SNT --- [INFO] [INFO] Skipping Rule Enforcement. [INFO] [INFO] [INFO] [INFO] --- build-helper-maven-plugin:3.4.0:regex-property (sanitize-version) @ SNT --- [INFO] [INFO] [INFO] [INFO] --- build-helper-maven-plugin:3.4.0:regex-property (guess-package) @ SNT --- [INFO] [INFO] [INFO] [INFO] --- buildnumber-maven-plugin:3.2.0:create (default) @ SNT --- [INFO] [INFO] Executing: /bin/sh -c cd '/home/tferr/code/SNT' && 'git' 'rev-parse' '--verify' 'HEAD' [INFO] [INFO] Working directory: /home/tferr/code/SNT [INFO] [INFO] Storing buildNumber: 82d854ce4a66355f680c1a2746ce7237bd4b5bb5 at timestamp: 1710428171774 [INFO] [INFO] Executing: /bin/sh -c cd '/home/tferr/code/SNT' && 'git' 'symbolic-ref' 'HEAD' [INFO] [INFO] Working directory: /home/tferr/code/SNT [INFO] [INFO] Storing scmBranch: main [INFO] [INFO] [INFO] [INFO] --- scijava-maven-plugin:2.2.0:set-rootdir (set-rootdir) @ SNT --- [INFO] [INFO] Setting rootdir: /home/tferr/code/SNT [INFO] [INFO] [INFO] [INFO] --- jacoco-maven-plugin:0.8.10:prepare-agent (jacoco-initialize) @ SNT --- [INFO] [INFO] argLine set to -javaagent:/home/tferr/.m2/repository/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10-runtime.jar=destfile=/home/tferr/code/SNT/target/jacoco.exec [INFO] [INFO] [INFO] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ SNT --- [INFO] [INFO] Copying 86 resources from src/main/resources to target/classes [INFO] [INFO] [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ SNT --- [INFO] [INFO] Compiling 313 source files to /home/tferr/code/SNT/target/classes [INFO] [INFO] /home/tferr/code/SNT/src/main/java/sc/fiji/snt/analysis/MultiTreeStatistics.java: /home/tferr/code/SNT/src/main/java/sc/fiji/snt/analysis/MultiTreeStatistics.java uses or overrides a deprecated API. [INFO] [INFO] /home/tferr/code/SNT/src/main/java/sc/fiji/snt/analysis/MultiTreeStatistics.java: Recompile with -Xlint:deprecation for details. [INFO] [INFO] [INFO] [INFO] --- maven-resources-plugin:3.3.1:testResources (default-testResources) @ SNT --- [INFO] [INFO] Not copying test resources [INFO] [INFO] [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ SNT --- [INFO] [INFO] Not compiling test sources [INFO] [INFO] [INFO] [INFO] --- maven-surefire-plugin:3.1.2:test (default-test) @ SNT --- [INFO] [INFO] Tests are skipped. [INFO] [INFO] [INFO] [INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ SNT --- [INFO] [INFO] Building jar: /home/tferr/code/SNT/target/SNT-4.3.0-beta-2.jar [INFO] [INFO] [INFO] [INFO] >>> maven-source-plugin:3.3.0:jar (attach-sources-jar) > generate-sources @ SNT >>> [INFO] [INFO] [INFO] [INFO] --- maven-enforcer-plugin:3.3.0:enforce (enforce-rules) @ SNT --- [INFO] [INFO] Skipping Rule Enforcement. [INFO] [INFO] [INFO] [INFO] --- build-helper-maven-plugin:3.4.0:regex-property (sanitize-version) @ SNT --- [INFO] [INFO] [INFO] [INFO] --- build-helper-maven-plugin:3.4.0:regex-property (guess-package) @ SNT --- [INFO] [INFO] [INFO] [INFO] --- buildnumber-maven-plugin:3.2.0:create (default) @ SNT --- [INFO] [INFO] [INFO] [INFO] --- scijava-maven-plugin:2.2.0:set-rootdir (set-rootdir) @ SNT --- [INFO] [INFO] [INFO] [INFO] --- jacoco-maven-plugin:0.8.10:prepare-agent (jacoco-initialize) @ SNT --- [INFO] [INFO] argLine set to -javaagent:/home/tferr/.m2/repository/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10-runtime.jar=destfile=/home/tferr/code/SNT/target/jacoco.exec [INFO] [INFO] [INFO] [INFO] <<< maven-source-plugin:3.3.0:jar (attach-sources-jar) < generate-sources @ SNT <<< [INFO] [INFO] [INFO] [INFO] [INFO] [INFO] --- maven-source-plugin:3.3.0:jar (attach-sources-jar) @ SNT --- [INFO] [INFO] Building jar: /home/tferr/code/SNT/target/SNT-4.3.0-beta-2-sources.jar [INFO] [INFO] [INFO] [INFO] --- jacoco-maven-plugin:0.8.10:report (jacoco-site) @ SNT --- [INFO] [INFO] Skipping JaCoCo execution due to missing execution data file. [INFO] [INFO] [INFO] [INFO] --- maven-javadoc-plugin:3.5.0:jar (attach-javadocs) @ SNT --- [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] BUILD FAILURE [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Total time: 17.876 s [INFO] [INFO] Finished at: 2024-03-14T10:56:28-04:00 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.5.0:jar (attach-javadocs) on project SNT: Execution attach-javadocs of goal org.apache.maven.plugins:maven-javadoc-plugin:3.5.0:jar failed: Unable to derive module descriptor for /home/tferr/.m2/repository/org/jzy3d/jzy3d-native-jogl-awt/2.2.1/jzy3d-native-jogl-awt-2.2.1.jar: jzy3d.native.jogl.awt: Invalid module name: 'native' is not a Java identifier -> [Help 1] [INFO] [ERROR] [INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [INFO] [ERROR] [INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles: [INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException [ERROR] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.899 s [INFO] Finished at: 2024-03-14T10:56:28-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.1:prepare (default-cli) on project SNT: Maven execution failed, exit code: 1 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException The release preparation step failed -- look above for errors and fix them. Use "mvn javadoc:javadoc | grep error" to check for javadoc syntax errors. ```
elect86 commented 8 months ago

Would you mind if I give it a try myself?

tferr commented 8 months ago

Not at all, go ahead! Do you need anything from me?

elect86 commented 8 months ago

so far no

elect86 commented 8 months ago

may I update to the latest Scijava pom 38.0.0-SNAPSHOT?

tferr commented 8 months ago

Sure!

On Thu, Mar 14, 2024, 11:46 Giuseppe Barbieri @.***> wrote:

may I update to the latest Scijava pom 38.0.0-SNAPSHOT?

— Reply to this email directly, view it on GitHub https://github.com/morphonets/SNT/issues/212#issuecomment-1997764018, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASTWDBFTGHVDOAN2QMRGQLYYHA3VAVCNFSM6AAAAABA7ANWFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXG43DIMBRHA . You are receiving this because you were mentioned.Message ID: @.***>

elect86 commented 8 months ago

Could you add me to the repo so that I can create a new branch and work from there instead of forking?

elect86 commented 8 months ago

Which tests are supposed to pass with Maven? Because I'm getting weird errors on my machine

Otherwise what passes so far with Gradle is this

Screenshot from 2024-03-15 10-46-49

tferr commented 8 months ago

@elect86, just sent you the invite. let me know if it something else is needed.

Which tests are supposed to pass with Maven?

The tests that call SNTService fail because of those net.imagej.patcher.LegacyInjector.preinit(); errors. I can only get those to work on the IDE when I add --add-opens java.base/java.lang=ALL-UNNAMED. I will probably have to re-write those tests. I added this to the pom after looking around on SO, and I convinced myself that worked to to make the release-script happy.

elect86 commented 8 months ago

Indeed, much better now, those 3 looks ignored

image

tferr commented 8 months ago

Hm, not really. I had convinced myself all tests were passing with 3293439. Will need to look, but I'm in meeting all day. Won't be able to look into it immediately

elect86 commented 8 months ago

they all have @Ignore on them

elect86 commented 8 months ago

Anyway, if you want I can publish 4.3.0-pre-release3

If yes, shall I upgrade the pom-scijava to 38.0.0-SNAPSHOT, 38.0.0 or leave it to 37.0.0?

I just realized now it's a cyclic dep..

tferr commented 8 months ago

Sure go ahead. bumping it to 38.0.0-SNAPSHOT is probably a good idea. Which dependency is cyclic? SNT itself?

elect86 commented 8 months ago

SNT and the POM

elect86 commented 8 months ago

Published, thanks for your availability Tiago!

tferr commented 8 months ago

Awesome! Did you end up pushing something here? I don't seem to notice any new commits...

elect86 commented 8 months ago

In the meanwhile I was waiting for a reply I got eager to try and start working on the fork, then I though I changed the back the remote once I got the invite, but apparently I didn't, it's all here I can push to a gradle branch here, if you want, the publishing is hardcoded, but if needed, it can be polished and made it smart

elect86 commented 8 months ago

Pushed here as well