Oh wow, that totally did it - didn't realize you could use location on
vendored projects, but that makes total sense:

resolver: lts-6.20
packages:
- .
- location: unix
  extra-dep: true
- location: serialport
  extra-dep: true
extra-deps: []
flags: {}

Thanks!

Mark

On Thu, Oct 6, 2016 at 10:22 PM, Michael Snoyman <mich...@snoyman.com>
wrote:

> I'm not a ghci expert, but perhaps marking those vendored libraries as
> extra-dep: true would help.
>
> On Fri, Oct 7, 2016, 8:21 AM Mark Fine <mark.f...@gmail.com> wrote:
>
>> I have a simple project that's vendoring in serialport and unix packages:
>>
>> resolver: lts-6.20
>> packages:
>> - '.'
>> - './unix'
>> - './serialport'
>> extra-deps: []
>> flags: {}
>>
>> *stack build* works fine:
>>
>> serialport-0.4.7: unregistering (missing dependencies: unix)
>> unix-2.7.2.0: unregistering (local file changes: System/Posix.hs 
>> System/Posix/ByteString.hs System/Posix/ByteString/FilePath.hsc 
>> System/Posix/Dire...)
>> unix-2.7.2.0: configure
>> unix-2.7.2.0: build
>> unix-2.7.2.0: copy/register
>> serialport-0.4.7: configure
>> serialport-0.4.7: build
>> serialport-0.4.7: copy/register
>> serial-0.0.0: configure
>> serial-0.0.0: build
>> serial-0.0.0: copy/register
>> Completed 3 action(s).
>>
>> *stack ghci* has linking errors:
>>
>> Using main module: 1. Package `serial' component exe:serial with main-is 
>> file: /Users/mark/repos/serial/main.hs
>> Configuring GHCi with the following packages: serial, serialport, unix
>> GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
>> [1 of 8] Compiling System.Hardware.Serialport.Types ( 
>> /Users/mark/repos/serial/serialport/System/Hardware/Serialport/Types.hs, 
>> interpreted )
>> [2 of 8] Compiling System.Posix.Terminal.Common ( 
>> /Users/mark/repos/serial/unix/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Posix/Terminal/Common.hs,
>>  interpreted )
>>
>> ByteCodeLink: can't find label
>> During interactive linking, GHCi couldn't find the following symbol:
>>   ghczuwrapperZC9ZCmainZCSystemziPosixziTerminalziCommonZCcfgetispeed
>> This may be due to you not asking GHCi to load extra object files,
>> archives or DLLs needed by your current session.  Restart GHCi, specifying
>> the missing library using the -L/path/to/object/dir and -lmissinglibname
>> flags, or simply by naming the relevant files on the GHCi command line.
>> Alternatively, this link failure might indicate a bug in GHCi.
>> If you suspect the latter, please send a bug report to:
>>   glasgow-haskell-b...@haskell.org
>>
>> [ 2 of 42] Compiling System.Posix.Terminal.Common ( 
>> /Users/mark/repos/serial/unix/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Posix/Terminal/Common.hs,
>>  interpreted )
>>
>> ByteCodeLink: can't find label
>> During interactive linking, GHCi couldn't find the following symbol:
>>   ghczuwrapperZC19ZCmainZCSystemziPosixziTerminalziCommonZCcfgetispeed
>> This may be due to you not asking GHCi to load extra object files,
>> archives or DLLs needed by your current session.  Restart GHCi, specifying
>> the missing library using the -L/path/to/object/dir and -lmissinglibname
>> flags, or simply by naming the relevant files on the GHCi command line.
>> Alternatively, this link failure might indicate a bug in GHCi.
>> If you suspect the latter, please send a bug report to:
>>   glasgow-haskell-b...@haskell.org
>>
>> [ 2 of 43] Compiling System.Posix.Terminal.Common ( 
>> /Users/mark/repos/serial/unix/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Posix/Terminal/Common.hs,
>>  interpreted )
>>
>> ByteCodeLink: can't find label
>> During interactive linking, GHCi couldn't find the following symbol:
>>   ghczuwrapperZC29ZCmainZCSystemziPosixziTerminalziCommonZCcfgetispeed
>> This may be due to you not asking GHCi to load extra object files,
>> archives or DLLs needed by your current session.  Restart GHCi, specifying
>> the missing library using the -L/path/to/object/dir and -lmissinglibname
>> flags, or simply by naming the relevant files on the GHCi command line.
>> Alternatively, this link failure might indicate a bug in GHCi.
>> If you suspect the latter, please send a bug report to:
>>   glasgow-haskell-b...@haskell.org
>>
>>
>> <no location info>:
>>     Could not find module ‘System.Hardware.Serialport’
>>     It is a member of the hidden package 
>> ‘serialport-0.4.7@seria_6XlGeNhayTj8u1Q5vnbF3w’.
>> Prelude>
>>
>> I see that both vendored projects have their own .stack-work's - is that
>> a source of issues? Is there a workaround where I can get *stack ghci* to
>> behave as well as *stack build* - things run great as executables, just
>> can't load the code in ghci.
>>
>> Also, I'd love to be able to bring in both of these projects as git
>> locations - but the unix library requires running *auto**reconf -i* in
>> it's directory, and it's not clear how I can manage that with a git
>> location (instead I'm vendoring them in with git submodules).
>>
>> Any help would be greatly appreciated!
>>
>> Mark
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "haskell-stack" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to haskell-stack+unsubscr...@googlegroups.com.
>> To post to this group, send email to haskell-stack@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/haskell-stack/CANRZ_fkafdAjGLUiUqnjPLSTP%
>> 2BzF6rpJaHScyV2pSgX45oCNwg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/haskell-stack/CANRZ_fkafdAjGLUiUqnjPLSTP%2BzF6rpJaHScyV2pSgX45oCNwg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haskell-stack+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-stack@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/haskell-stack/CANRZ_fnKDZpWsAusOzWbcYFsXUQQf9xoRvbVR7W1Ep3j%3DQGeiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to