stepcut / plugins

Dynamic linking and runtime evaluation of Haskell, and C, including dependency chasing and package resolution.
GNU Lesser General Public License v2.1
52 stars 17 forks source link

Cannot satisfy -package plugins #7

Open ghost opened 6 years ago

ghost commented 6 years ago

Tried to run a simple plugins eval example under stack 1.6.3, with plugins-1.5.7 added to extra-deps.

Tried running

module Main where

import System.Eval.Haskell

main :: IO ()
main =
  do
    i <- eval "1+2 :: Int" [] :: IO (Maybe Int)
    print i

and got:

$ scratch-exe
<command line>: cannot satisfy -package plugins
    (use -v for more information)
Nothing

I'm not quite sure where this message is being emitted from, any ideas of what I might have to add?

Thanks!

noughtmare commented 3 years ago

This is caused by the new way cabal does things. An ugly workaround is to run cabal v2-install --lib --package-env . plugins in the directory that you're working in (or cabal v2-install --lib plugins to install it globally, but that can cause other problems).

ivanperez-keera commented 8 months ago

I'm finding the same issue. I tried using sandboxes, but I'm met with:

$ cabal v1--exec -- ./PropC 
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - fake-package-0 (exe:script) (configuration changed)
Configuring executable 'script' for fake-package-0..
Preprocessing executable 'script' for fake-package-0..
Building executable 'script' for fake-package-0..

Main.hs:1:1: error: lexical error at character '\DEL'
  |
1 | ELF����������>����@�����@�������`;���������@�8�
  | ^