From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: For a slimmer GHC Date: Thu, 29 Oct 2015 20:17:35 +0100 Message-ID: <87io5pa3hs.fsf@gnu.org> 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]:46364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrshh-0004cX-N1 for guix-devel@gnu.org; Thu, 29 Oct 2015 15:17:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrshe-0002oh-Uc for guix-devel@gnu.org; Thu, 29 Oct 2015 15:17:41 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrshe-0002od-RV for guix-devel@gnu.org; Thu, 29 Oct 2015 15:17:38 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:33954 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1Zrshd-0001ie-M1 for guix-devel@gnu.org; Thu, 29 Oct 2015 15:17:38 -0400 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel Hello! GHC is insanely large, 1.2G for its closure, most of which is itself: --8<---------------cut here---------------start------------->8--- store item total s= elf /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2 1209.7 = 860.5 71.1% /gnu/store/k6r37137lfpg3l3igi50c7lj2za7kqly-ld-wrapper-0 153.7 = 0.0 0.0% /gnu/store/czs63sm4l0s4a56ab38dqvkx19yzylbq-perl-5.16.1 141.2 = 49.2 4.1% /gnu/store/hddjjpkfvwaf1j1q3qwpvby0rid3k8by-gcc-4.9.3 138.1 = 77.3 6.4% /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc 120.2 = 42.6 3.5% /gnu/store/fmxxkrpwajcnb9cyncgh4f4z6ybknl1g-guile-2.0.11 109.0 = 16.1 1.3% /gnu/store/y5psndwpbbkjrf856x757psb708y62dn-binutils-2.25.1 82.5 = 44.6 3.7% /gnu/store/mnwjrkbfzkb5ifhqf8hssf3cxfvg11l6-coreutils-8.24 77.8 = 13.8 1.1% /gnu/store/fzp98iyq7a2i4d4siw0ab0y0wa95vv8k-readline-6.3 68.6 = 1.2 0.1% [...] $ du -ms /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/ 871 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/ $ du -ms /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.1= 0.2/ 871 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/ --8<---------------cut here---------------end--------------->8--- The main problem is that, for each module, we have three variants: --8<---------------cut here---------------start------------->8--- $ du -ms /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-= 7.10.2/trans_3eG64VdP2vzGjP6wJiCp5X/* 3 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/tra= ns_3eG64VdP2vzGjP6wJiCp5X/Control 1 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/tra= ns_3eG64VdP2vzGjP6wJiCp5X/Data 5 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/tra= ns_3eG64VdP2vzGjP6wJiCp5X/libHStransformers-0.4.2.0-3eG64VdP2vzGjP6wJiCp5X.a 2 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/tra= ns_3eG64VdP2vzGjP6wJiCp5X/libHStransformers-0.4.2.0-3eG64VdP2vzGjP6wJiCp5X-= ghc7.10.2.so 7 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/tra= ns_3eG64VdP2vzGjP6wJiCp5X/libHStransformers-0.4.2.0-3eG64VdP2vzGjP6wJiCp5X_= p.a --8<---------------cut here---------------end--------------->8--- What about removing all the .a? Would that be OK? On that topic I found but it=E2=80=99s n= ot clear to me whether this is relevant here. At worst we can add a phase that removes these files. A secondary issue is documentation: There=E2=80=99s a =E2=80=9Cdoc=E2=80=9D= output, but =E2=80=98ghc:out=E2=80=99 depends on =E2=80=98ghc:doc=E2=80=99: --8<---------------cut here---------------start------------->8--- $ guix gc --references /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10= .2/ | grep doc /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc $ du -ms /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc 47 /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc $ grep -r r539jrq7jk9vkmm1255i5jqs7skn4fag /gnu/store/1iwl222h2qw80fyr57= 8sdjdki0pbcjm0-ghc-7.10.2 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/packa= ge.conf.d/process-1.2.3.0-f0287ac288afc0705be775d1adda59ee.conf:haddock-int= erfaces: /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc/share/d= oc/ghc/html/libraries/process-1.2.3.0/process.haddock /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/packa= ge.conf.d/process-1.2.3.0-f0287ac288afc0705be775d1adda59ee.conf:haddock-htm= l: /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc/share/doc/ghc= /html/libraries/process-1.2.3.0 /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/packa= ge.conf.d/Cabal-1.22.4.0-43c3ae30d75ac742e521d26b63721876.conf:haddock-inte= rfaces: /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc/share/do= c/ghc/html/libraries/Cabal-1.22.4.0/Cabal.haddock /gnu/store/1iwl222h2qw80fyr578sdjdki0pbcjm0-ghc-7.10.2/lib/ghc-7.10.2/packa= ge.conf.d/Cabal-1.22.4.0-43c3ae30d75ac742e521d26b63721876.conf:haddock-html= : /gnu/store/r539jrq7jk9vkmm1255i5jqs7skn4fag-ghc-7.10.2-doc/share/doc/ghc/= html/libraries/Cabal-1.22.4.0 --8<---------------cut here---------------end--------------->8--- Any idea if we could avoid references to the =E2=80=9Cdoc=E2=80=9D output i= n these *.conf files? For instance, if there=E2=80=99s a variable like, say, =E2=80=98HADDOCK_PATH=E2=80=99, we can certainly remove the hardcoded refer= ences Federico, Paul, Eric, =E2=80=A6 thoughts? :-) Thanks, Ludo=E2=80=99.