Reproducing bugs without Stack
Michael Sloan
mgsloan at gmail.com
Sun Jan 20 06:26:53 UTC 2019
I don't have a good answer to your overall question, particularly when
reproducing the issue necessarily requires a large set of build
dependencies. However, one thing that may be helpful is to use `stack
build --cabal-verbose`. This will pass `--verbose` when running
Setup.hs, and ghc invocations are included in its verbose output.
Assuming your terminal's current dir is the package that the ghc
invocation is building, and the dependencies are built, you can run
paste the ghc invocation after `stack exec -- ` and it should work.
So, for example:
```
stack exec -- /home/mgsloan/.stack/programs/x86_64-linux/ghc-8.6.3/bin/ghc
--make -no-link -fbuilding-cabal-package ...
```
Then, perhaps you can try removing arguments of the ghc invocation to
attempt to arrive at a more minimal reproduction.
-Michael
On Sat, Jan 19, 2019 at 9:08 PM Eric Crockett <ecrockett0 at gmail.com> wrote:
>
> Devs,
>
> I use Stack for all of my Haskell development. I recently ran into several bugs, which I suspected to be GHC bugs. In the process of creating new tickets, I noticed a banner reading "Please try to provide reproduction instructions which do not require "Stack"." The request is reasonable to help weed out bugs in Stack itself, but I could use some advice on how to do that.
>
> In particular, I'm having trouble reproducing bugs related to profiling. For example, #16182 is about runtime crashes with the -hr profiling option. This was clearly a GHC bug rather than a problem with stack, yet I have so far been unable to produce the bug without Stack. Similarly, for #16166, I filed the ticket, then after failing to reproduce the bug with cabal, assumed it must be a stack bug. Fortunately, RyanGlScott noticed and was able to confirm that it is in fact a GHC bug. Ryan explained that my problem reproducing with cabal is due to differences in the profiling options used by stack and cabal.
>
> In summary, it would be helpful to have some instructions on how to take a bug produced using Stack to one produced without. For example, if `stack build [--profile] foo` produces a compile bug, how should I use cabal to definitively determine if the bug is a problem with Stack or GHC? Presumably it would begin with `cabal sandbox init`. Are there special options to put in the cabal.config file so that cabal uses the same profiling options as stack? Will those options be used when building all dependencies?
>
> Thanks,
> Eric Crockett
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
More information about the ghc-devs
mailing list