<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 11 January 2015 at 14:35, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Overall I like this approach. One problem the old script suffered from was that its goals and, in particular, non-goals weren't clearly stated. Lets state the goal clearly:<div><br></div><div>  Goal: Be able to bootstrap a cabal-install binary of a bare GHC install from <a href="https://www.haskell.org/ghc/download" target="_blank">https://www.haskell.org/ghc/download</a></div><div>  Non-goal: Be able to bootstrap using a modified global package DB or using a user DB in an arbitrary state.</div></div></blockquote><div><br></div><div>I would like to add a goal:</div><div>Boostrap on a modified GHC install, as long as the global packages which come with GHC are not modified. It will ignore any packages added to global, or added to the user package database. I think this is useful for testing and for more convenient recovery if you delete cabal-install. (It already does this.)</div><div><br></div><div>I think it would be a good idea if the platforms it is expected to work on nailed down a bit more clearly as part of the goals also - not sure what to do about Linux, but we can say which versions of Windows and OSX it is tested on.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>The latter is a non-goal because doing that well requires a constraint solver. We've tried to to emulate that using regexes in the past and that has become more and more untenable. The goal is met by the new Bootstrap.hs by nailing down the exact version numbers to use.</div><div><br></div><div>Questions about Bootstrap.sh:</div><div><br></div><div> * Can we make it work in-tree? I tried it on master now and that didn't work (because it tried to install Cabal-1.23 from Hackage, which doesn't exist.) This is needed to we can run it on Travis to test it.</div></div></blockquote><div><br></div><div>This is on my todo for this to work automatically. I think it will be pretty easy.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> * We need to make sure it works on supported platforms: Linux, OS X, and Windows. This is mostly about testing.</div></div></blockquote><div><br></div><div>Can travis test on all these systems? What about e.g. Solaris or FreeBSD, which have had binary releases of GHC in the past?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> * How can I test it in the current state? As mentioned above, bootstrapping in the master branch didn't work.</div></div></blockquote><div><br></div><div>The current work-around needs a working cabal-install, run 'cabal sdist' in the Cabal/ dir, then copy the .tar.gz to cabal-install/ and the Bootstrap.hs will pick it up.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> * We should output a message once the install is done to tell the user how to use the bootstrapped binary. </div></div></blockquote><div><br></div><div>There is a small message, it can be changed/added easily.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>In particular, we might want to tell the user to use it to reinstall cabal-install not in a sandbox.</div></div></blockquote><div><br></div><div>Is there any reason to do this? Won't the bootstrapped cabal install binary work fine for most users? Alternatively, it could rerun cabal-install automatically or optionally as part of the bootstrap, or it could copy the bootstrap binary to ~/.cabal/bin/ or something if this is desired.</div><div><br></div></div></div></div>