From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: store reference detection (was Re: JARs and reference scanning) Date: Wed, 26 Apr 2017 12:31:36 -0700 Message-ID: <5310484E-90D4-4DB8-A266-D6DF0115448D@gmail.com> References: <87a876pwaq.fsf@gmail.com> <8760hr7mwl.fsf@gmail.com> <20170426.135333.1620868924745053745.post@thomasdanckaert.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3SfA-0006rg-0g for guix-devel@gnu.org; Wed, 26 Apr 2017 15:31:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3Sf6-0003aH-Sh for guix-devel@gnu.org; Wed, 26 Apr 2017 15:31:44 -0400 Received: from mail-pg0-x22b.google.com ([2607:f8b0:400e:c05::22b]:36360) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3Sf6-0003ZQ-MC for guix-devel@gnu.org; Wed, 26 Apr 2017 15:31:40 -0400 Received: by mail-pg0-x22b.google.com with SMTP id t7so4691336pgt.3 for ; Wed, 26 Apr 2017 12:31:40 -0700 (PDT) In-Reply-To: <20170426.135333.1620868924745053745.post@thomasdanckaert.be> 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: guix-devel@gnu.org, Thomas Danckaert , cmmarusich@gmail.com On April 26, 2017 4:53:33 AM PDT, Thomas Danckaert wrote: [=2E=2E=2E] >The code scanning for reference is in nix/libstore/references=2Ecc =2E = =20 >It looks for base32 hashes encoded as character strings in the=20 >binaries=2E > >Could/should this be generalized somehow? Apart from compression,=20 >store filenames encoded with 16-bit character encodings also cause=20 >problems (can happen with Qt or WxWidgets)=2E And the are probably=20 >more cases where it fails=2E > >Does it make sense to expand the reference detecting code (perhaps=20 >this would lead to too many different special cases?), or maybe=20 >provide a mechanism to force references when the daemon cannot detect=20 >them=2E I suppose you can always add a text file with a list of store=20 >items to the output, but maybe there's a more elegant way? > >Thomas The text file idea with the dependencies that Hartmut proposed seems an el= egant solution; it would make the reference searching process cheaper and a= vailable for any kind of format=2E