Re: Scala error when trying to build latest version of pilon
Hi Andreas, On 18/12/2021 08:52, Andreas Tille wrote: Hi Pierre, Am Fri, Dec 17, 2021 at 11:27:50PM +0100 schrieb Pierre Gruet: I have just uploaded latest upstream version of pilon to unstable, together with a fix for the scala issues showing up. Normally we would have had to update scala from 2.11 to 2.13, but here the fix was very short to write. Thanks a lot! Sorry, I mixed up the changelog entries a bit because I forgot to pull from Salsa before working on the package, but now on Salsa everything is right. :-) Anyway, for sure the right thing would be to upgrade Scala. Yep. We need this anyway. Right! This email is the opportunity to ask you a question: I saw you were the initial sponsor of sbt, the Scala Build Tool. The source package was accepted with a lot of embedded jars inside. Do you remember if you had some discussion with FTP Masters about it before they accepted the package? Arguably this is costly to avoid in such a setting, where we need Scala dependencies to build a tool that builds Scala programs... I vaguely remember that the bootstrapping process required some discussion with ftpmaster but I forgot the details. Since the discussion was long ago I think it needs to be taken up again if needed. No problem! Thanks for confirming this discussion took place. Admittedly we would have to hold it again when upgrading the packages. I am regularly spending time collecting the repositories with the sources of those embedded jars. Some are hard to find. Still, I think this is a necessary (but huge) step to go on packaging all the Scala stuff. I am interested in this, because I regularly give some time to improving the state of the Scala ecosystem in Debian, and sbt if central in it. It would be really great if you could update Scala since we will face issues over and over with other recent software using it. Indeed...! I also see it more and more often. Warm regards, Same to you Andreas. Best, -- Pierre
Re: Scala error when trying to build latest version of pilon
Hi Pierre, Am Fri, Dec 17, 2021 at 11:27:50PM +0100 schrieb Pierre Gruet: > I have just uploaded latest upstream version of pilon to unstable, together > with a fix for the scala issues showing up. Normally we would have had to > update scala from 2.11 to 2.13, but here the fix was very short to write. Thanks a lot! > Sorry, I mixed up the changelog entries a bit because I forgot to pull from > Salsa before working on the package, but now on Salsa everything is right. :-) > > > Anyway, for sure the > > > right thing would be to upgrade Scala. > > > > Yep. We need this anyway. > > Right! > This email is the opportunity to ask you a question: I saw you were the > initial sponsor of sbt, the Scala Build Tool. The source package was > accepted with a lot of embedded jars inside. Do you remember if you had some > discussion with FTP Masters about it before they accepted the package? > Arguably this is costly to avoid in such a setting, where we need Scala > dependencies to build a tool that builds Scala programs... I vaguely remember that the bootstrapping process required some discussion with ftpmaster but I forgot the details. Since the discussion was long ago I think it needs to be taken up again if needed. > I am interested in this, because I regularly give some time to improving the > state of the Scala ecosystem in Debian, and sbt if central in it. It would be really great if you could update Scala since we will face issues over and over with other recent software using it. > Warm regards, Same to you Andreas. -- http://fam-tille.de
Re: Scala error when trying to build latest version of pilon
Hi Andreas, On 09/09/2021 14:21, Andreas Tille wrote: Hi Pierre, thanks a lot for your educated answer. On Thu, Sep 09, 2021 at 12:48:33PM +0200, Pierre Gruet wrote: Any hint how to fix this? Well, /maybe/ we could patch this last pilon version to use Scala 2.11 with it... but I see there were quite a lot of changed in pilon seemingly related to newer Scala [3,4], so I am unsure we would succeed. Regarding pilon we are not in a hurry. Its just one of the packages with broken watch file I'm touching step by step. I have just uploaded latest upstream version of pilon to unstable, together with a fix for the scala issues showing up. Normally we would have had to update scala from 2.11 to 2.13, but here the fix was very short to write. Sorry, I mixed up the changelog entries a bit because I forgot to pull from Salsa before working on the package, but now on Salsa everything is right. Anyway, for sure the right thing would be to upgrade Scala. Yep. We need this anyway. Right! This email is the opportunity to ask you a question: I saw you were the initial sponsor of sbt, the Scala Build Tool. The source package was accepted with a lot of embedded jars inside. Do you remember if you had some discussion with FTP Masters about it before they accepted the package? Arguably this is costly to avoid in such a setting, where we need Scala dependencies to build a tool that builds Scala programs... I am interested in this, because I regularly give some time to improving the state of the Scala ecosystem in Debian, and sbt if central in it. This is one thing I would like to do and discuss with the Java team, will try to do it quite soon... This would be cool. Please do not waste time with patching pilon meanwhile. Kind regards Andreas. Warm regards, -- Pierre
Re: Scala error when trying to build latest version of pilon
Hi Pierre, thanks a lot for your educated answer. On Thu, Sep 09, 2021 at 12:48:33PM +0200, Pierre Gruet wrote: > > Any hint how to fix this? > > Well, /maybe/ we could patch this last pilon version to use Scala 2.11 with > it... but I see there were quite a lot of changed in pilon seemingly related > to newer Scala [3,4], so I am unsure we would succeed. Regarding pilon we are not in a hurry. Its just one of the packages with broken watch file I'm touching step by step. > Anyway, for sure the > right thing would be to upgrade Scala. Yep. We need this anyway. > This is one thing I would like to do and discuss with the Java team, will > try to do it quite soon... This would be cool. Please do not waste time with patching pilon meanwhile. Kind regards Andreas. -- http://fam-tille.de
Re: Scala error when trying to build latest version of pilon
Hi Andreas, Le 09/09/2021 à 08:31, Andreas Tille a écrit : Hi Pierre (and others) when trying to build the latest version of pilon[1] I get: ... scalac -classpath /usr/share/java/htsjdk.jar -d pilon.jar src/main/scala/org/broadinstitute/pilon/* src/main/scala/org/broadinstitute/pilon/BamFile.scala:24: error: object jdk is not a member of package scala import scala.jdk.CollectionConverters._ ^ src/main/scala/org/broadinstitute/pilon/BamFile.scala:65: error: value asScala is not a member of java.util.List[htsjdk.samtools.SAMSequenceRecord] val seqs = r.getFileHeader.getSequenceDictionary.getSequences.asScala ^ src/main/scala/org/broadinstitute/pilon/BamFile.scala:96: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator val reads = r.queryUnmapped.asScala.filter(validateRead(_)).toList ^ src/main/scala/org/broadinstitute/pilon/BamFile.scala:119: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator possible cause: maybe a semicolon is missing before `value asScala'? (region.start-1) max 0, (region.stop+1) min region.contig.length).asScala ^ src/main/scala/org/broadinstitute/pilon/PileUpRegion.scala:22: error: object jdk is not a member of package scala import scala.jdk.CollectionConverters._ ^ src/main/scala/org/broadinstitute/pilon/BamFile.scala:297: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator for (read <- r.iterator.asScala) { ^ src/main/scala/org/broadinstitute/pilon/BamFile.scala:341: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator val reads = r.queryOverlapping(region.name, region.start, region.stop).asScala.filter(validateRead(_)).toList ^ src/main/scala/org/broadinstitute/pilon/Scaffold.scala:31: error: object jdk is not a member of package scala import scala.jdk.CollectionConverters._ ^ src/main/scala/org/broadinstitute/pilon/PileUpRegion.scala:136: error: value asScala is not a member of java.util.List[htsjdk.samtools.CigarElement] val cigarElements = cigar.getCigarElements.asScala ^ src/main/scala/org/broadinstitute/pilon/Scaffold.scala:351: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator for (read <- reader.iterator.asScala if (!read.getReadUnmappedFlag)) { ^ 10 errors found make[1]: *** [debian/rules:10: override_dh_auto_build] Fehler 1 Unfortunately this is because upstream has just begun using Scala files from Scala 2.13.* (typically, the scala.jdk package) whereas we only have Scala 2.11 in Debian. If I remember correctly, the main blocker with Scala 2.12 or more is we need sbt [2], which needs Scala 2.12... I should have a look again, but it seems we will have to do some bootstrap at some point. Any hint how to fix this? Well, /maybe/ we could patch this last pilon version to use Scala 2.11 with it... but I see there were quite a lot of changed in pilon seemingly related to newer Scala [3,4], so I am unsure we would succeed. Anyway, for sure the right thing would be to upgrade Scala. This is one thing I would like to do and discuss with the Java team, will try to do it quite soon... Kind regards Andreas. [1] https://salsa.debian.org/med-team/pilon Best regards, Pierre [2] https://tracker.debian.org/pkg/sbt [3] https://github.com/broadinstitute/pilon/commit/74371e9e62b0d51f3273935a88e30f92208bd91e [4] https://github.com/broadinstitute/pilon/commit/9d55013cedae575f141ff74415cc577ce2c7900a