From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: store reference detection (was Re: JARs and reference scanning) Date: Mon, 08 May 2017 09:06:05 +0200 Message-ID: <87vapbkeua.fsf@elephly.net> References: <87a876pwaq.fsf@gmail.com> <8760hr7mwl.fsf@gmail.com> <20170426.135333.1620868924745053745.post@thomasdanckaert.be> <87fugu6jzg.fsf@gnu.org> <59022E86.1020709@crazy-compilers.com> <8760hjig4r.fsf@gnu.org> <590F179B.4060306@crazy-compilers.com> <87zieotnzr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7ckM-0005qE-Sz for guix-devel@gnu.org; Mon, 08 May 2017 03:06:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7ckJ-0004xl-Mr for guix-devel@gnu.org; Mon, 08 May 2017 03:06:18 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7ckJ-0004xU-EO for guix-devel@gnu.org; Mon, 08 May 2017 03:06:15 -0400 In-reply-to: <87zieotnzr.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Chris Marusich Cc: guix-devel@gnu.org Chris Marusich writes: > There are probably many ways to accomplish that. For example, in Java, > perhaps we could implement a custom classloader. Or maybe we could > patch the built-in class loading mechanism [1]. Similarly, in Python > there are also ways to customize the import mechanism [2]. Perhaps Perl > also has a similar mechanism? Jar files can be told to import classes from another Jar by adding it to the “Class-Path” field of the Jar’s manifest. Here’s an example: https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html I don’t know if this mechanism permits the use of absolute paths, but it’s worth a try. I should note that this doesn’t help with store reference detection, because the manifest will be part of the compressed Jar. But if this works we could avoid propagation for Java packages. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net