Am 24.04.2017 um 00:57 schrieb Chris Marusich: > Chris Marusich <cmmarus...@gmail.com> writes: > >> Speaking of JAR files, shouldn't we try to avoid them entirely? My >> understanding is that they are compressed files, which means the Guix >> daemon won't be able to scan them for references. I don't know if it's >> easy to use Maven to build a project without putting the build output >> into a JAR file, though. > For the record, I looked into this a little more. I was mistaken: JAR > files are not necessarily compressed. In fact, it seems [1][2] that it > should always be possible to make un-compressed JARs. So, perhaps the > Guix daemon will not have trouble scanning JARs for references, after > all. (Whether or not any references will actually be retained in the > JARs produced by Maven is another question; I don't know the answer.)
I have to admit that I do not know at all how the reference scanning and dependency-tracking in the store works. Regarding the jar-files ny understanding is: - JAR-files are Zip-files with additional data (as Ricardo already stated) - Zip-files can be used to store data without compressions (I assume this is what you are refering to). - My experience is that the contents of the JAR file can also be *unpacked* into the file-system, so not archives would be needed. Some Java guy might know better. I'm not sure it this is desired at all, though. - My understanding is that Java normally does not have any reference from one package (or jar-file) to another one. There is no such thing like "rpath" but is more like Python or Perl where the garbage collector AFAIK can not track references either. - According to [3, 2] the MANIFEST.INF file *may* specify a Class-Path containing the relative paths to other Jar-files. If this would help we *could* add references here, but the entry-length is limited to 65353 bytes, so we might hit this limit with the long paths of the store. - Fedora forbids to use this Class-Path entry in MANIFEST files [1]. - If it helps the garbage collector, we could add some ".dependencies" file alongside each Java package. But we don't do this for Python or Perl, either. [1] https://fedoraproject.org/wiki/Packaging:Java#No_class-path_in_MANIFEST.MF [2] https://en.wikipedia.org/wiki/JAR_(file_format)#Dependencies [3] http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Manifest -- Regards Hartmut Goebel | Hartmut Goebel | h.goe...@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |