samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 242 forks source link

Fix to ensure we only publish snapshots compiled with openjdk-8. #1376

Closed tfenne closed 5 years ago

tfenne commented 5 years ago

Description

With the travis builds now running on multiple Java versions, whichever one finishes last wins at publishing the snapshot build. This is problematic as there are situations where compiling on Java10 (targeting Java 1.8) still causes issues. Specifically there are changes to ByteBuffer to make some methods return ByteBuffer where in Java 8 they returned Buffer, and at runtime this causes link/no-such-method problems running on Java 8!

The solution is only to publish if the Java Home is set to openjdk-8.

Checklist

tfenne commented 5 years ago

@lbergelson I'd appreciate a quick thumbs up/down on this as I'm blocked from using the snapshot release with my latest two PRs until I fix this. Given the bash code only executes when on master, I will have to merge this just to test it, and if it doesn't work may have to push to master to fix it :(

codecov-io commented 5 years ago

Codecov Report

Merging #1376 into master will not change coverage. The diff coverage is n/a.

@@             Coverage Diff             @@
##              master     #1376   +/-   ##
===========================================
  Coverage     67.864%   67.864%           
  Complexity      8303      8303           
===========================================
  Files            564       564           
  Lines          33744     33744           
  Branches        5657      5657           
===========================================
  Hits           22900     22900           
  Misses          8659      8659           
  Partials        2185      2185
tfenne commented 5 years ago

Thanks @lbergelson!