all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Saku Laesvuori <saku@laesvuori.fi>
To: Simon Tournier <zimon.toutoune@gmail.com>
Cc: help-guix@gnu.org, Lars-Dominik Braun <lars@6xq.net>
Subject: Re: GHC packages' inputs leak in guix shell
Date: Mon, 28 Aug 2023 22:15:08 +0300	[thread overview]
Message-ID: <20230828191508.bnscnwecoszkyqvk@X-kone> (raw)
In-Reply-To: <874jkjqtsx.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]

On Mon, Aug 28, 2023 at 01:40:14PM +0200, Simon Tournier wrote:
> Hi,
> 
> On Thu, 24 Aug 2023 at 19:16, Saku Laesvuori <saku@laesvuori.fi> wrote:
> >> > Running `guix shell --pure ghc-esqueleto -D ghc-bytestring-builder`
> >> > results in an environment that has the base64-bytestring package (from
> >> > ghc-base64-bytestring) visible, even though it is not listed on listed
> >> > the command line (ghc-bytestring-builder doesn't dependend on it). It
> >> > seems to "leak" from the inputs of ghc-esqueleto which does depend on
> >> > ghc-base64-bytestring.
> >> 
> >> What do you mean by “leak”?
> >
> > I would expect packages to keep their (non-propagated) inputs separate
> > from the environment I use. Here ghc-esqueleto makes it's haskell inputs
> > visible to the ghc in my environment.
> 
> Could you be more explicit?
> 
> The package ghc-base64-bytestring does not seems being propagated; the
> store item ghc-base64-bytestring does not appear in the profile
> generated by “guix shell”.

Yes, it is not propagated but it's still visible to ghc, which is not
something I would expect. I'd expect to not be able to import modules
from packages that are not in any of the active profiles.

> However,
> 
> --8<---------------cut here---------------start------------->8---
> $ guix shell -C ghc-esqueleto ghc gcc-toolchain -- ghci
> GHCi, version 9.2.5: https://www.haskell.org/ghc/  :? for help
> ghci> import Data.ByteString.Base64.URL.Lazy
> ghci> :t encode
> encode
>   :: Data.ByteString.Lazy.Internal.ByteString
>      -> Data.ByteString.Lazy.Internal.ByteString
> --8<---------------cut here---------------end--------------->8---
> 
> and instead, you would like:
> 
>     <no location info>: error:
>         Could not find module `Data.ByteString.Base64.URL.Lazy'
>         It is not a module in the current program, or in any known package.
> 
> Right?

Exactly.

> Well, I do not know if it is possible.  I guess it is because of this
> file:
> 
> --8<---------------cut here---------------start------------->8---
> $ find $(guix build ghc-esqueleto) -type f -print | grep base64
> /gnu/store/zqax59v1v537h26g0kypka6klaaahnqf-ghc-esqueleto-3.5.8.1/lib/ghc-9.2.5/ghc-esqueleto-3.5.8.1.conf.d/base64-bytestring-1.2.1.0-CQYLTs5ShsEFl2lwe4hRrI.conf
> --8<---------------cut here---------------end--------------->8---

I think that is most likely the reason. I don't think cabal has this
problem (I haven't actually used cabal much at all so this is just
speculation), so it could be possible to fix. Of course, cabal-install
and guix have different ways of packaging so it might also be
impossible.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-08-28 19:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15  6:51 GHC packages' inputs leak in guix shell Saku Laesvuori
2023-08-24  9:11 ` Simon Tournier
2023-08-24 16:16   ` Saku Laesvuori
2023-08-28 11:40     ` Simon Tournier
2023-08-28 19:15       ` Saku Laesvuori [this message]
2023-08-29  7:12       ` Lars-Dominik Braun
2023-08-29 20:30         ` Saku Laesvuori
2023-09-09 10:05           ` Saku Laesvuori
2023-10-04 18:26             ` bug#66347: GHC packages " Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230828191508.bnscnwecoszkyqvk@X-kone \
    --to=saku@laesvuori.fi \
    --cc=help-guix@gnu.org \
    --cc=lars@6xq.net \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.