<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hadrian has the `--freeze1` flag, whose description is: <span
style="color: rgb(0, 0, 0); font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;
font-size: 13px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 400;
letter-spacing: normal; orphans: 2; text-align: left;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">freeze Stage1 GHC, i.e. do not rebuild
it even if some of its source files are out-of-date. This allows
to significantly reduce the rebuild time when you are working on
a feature that affects both Stage1 and Stage2 compilers, but may
lead to incorrect build results. To unfreeze Stage1 GHC simply
drop the<span> </span></span><code style="color: rgb(102, 0, 0);
border: 1px solid rgb(238, 221, 204); border-radius: 0.25em;
padding: 0px 0.3em; background: rgb(250, 250, 250); font-size:
13px; font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">--freeze1</code><span
style="color: rgb(0, 0, 0); font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;
font-size: 13px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 400;
letter-spacing: normal; orphans: 2; text-align: left;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;"><span> </span>flag and Hadrian will
rebuild all out-of-date files.</span></p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;
font-size: 13px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 400;
letter-spacing: normal; orphans: 2; text-align: left;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">(from
<a class="moz-txt-link-freetext" href="https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart#Commandlineoptions">https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart#Commandlineoptions</a>)<br>
</span></p>
<div class="moz-cite-prefix">On 31/10/2018 21:54, Matthew Pickering
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALuQ0m8kUqk7OwQbyF5=ntw_E9yF2a5kPZsVh1WFD+Xb7s9qyg@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">The information about freezing stage2 is in the first paragraph after
the basics on the newcomers page. So it is already very prominent.
<a class="moz-txt-link-freetext" href="https://ghc.haskell.org/trac/ghc/wiki/Newcomers#Fastrebuilding">https://ghc.haskell.org/trac/ghc/wiki/Newcomers#Fastrebuilding</a>
That being said, this will all change when hadrian is the default and
I'm not sure how to achieve this with Hadrian. I'm sure this will have
been accounted for.
Cheers,
Matt
On Wed, Oct 31, 2018 at 7:53 PM Michael Sloan <a class="moz-txt-link-rfc2396E" href="mailto:mgsloan@gmail.com"><mgsloan@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
Great, I'm glad it's working well for you!
I've realized that when working on ghc-in-ghci, I didn't know about
freezing stage 1 to speed up GHC builds. For me the primary
motivation was that otherwise builds took quite long. Of course,
ghc-in-ghci is still quite useful, due to being able to use the repl,
avoiding static link times, etc.
I'm not sure what the best way would be to effectively communicate
with newcomers about freezing stage 1, but it seems important for
build times. It may be easy to get dissuaded if every development
iteration involves a ton of waiting for the build. Perhaps hadrian
can be more intelligent about avoiding stage 1 rebuilds? I realize
that's likely to be tricky from a correctness perspective.
One thing I'm keen on for ghc-in-ghci is getting it to load without
-fobject-code. This would often mean a much longer initial start (no
use of stored object files), but should make reloads quite a lot
faster, since it's generating bytecode instead. The main tricky bit
there is the use of unboxed tuples, since ghci cannot bytecode-compile
code that uses them. So, this either means adding support for unboxed
tuples to bytecode, which seems quite challenging, or having something
clever that only uses object-code compilation where needed.
-Michael
On Tue, Oct 30, 2018 at 7:56 AM Matthew Pickering
<a class="moz-txt-link-rfc2396E" href="mailto:matthewtpickering@gmail.com"><matthewtpickering@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
I just tried using the ghc-in-ghci script again and it appears that
the memory usage problems have been resolved. Probably thanks to Simon
Marlow who fixed a lot of space leaks in ghc.
A reminder of how to use it:
./utils/ghc-in-ghci/run.sh -j<n>
will load ghc into ghci so you can `:r` to recompile when you make a change.
Cheers,
Matt
_______________________________________________
ghc-devs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a>
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">_______________________________________________
ghc-devs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Alp Mestanogullari, Haskell Consultant
Well-Typed LLP, <a class="moz-txt-link-freetext" href="https://www.well-typed.com/">https://www.well-typed.com/</a>
Registered in England and Wales, OC335890
118 Wymering Mansions, Wymering Road, London, W9 2NF, England</pre>
</body>
</html>