Hadrian

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Hadrian

GHC - devs mailing list

Alp, Andrey

The old build system printed out every command line; and I often copy-paste that info to build single modules.

Eg currently, when trying to understand #15570 I see a suspicious GHC.Real.hi.  So I want to manually recompile GHC.Real (from base), adding some debug flags.  How can I get the right command line to do that from the build log?

Where is the “how to use Hadrian” wiki page?  I know you’ve been writing one.

Simon


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

GHC - devs mailing list

Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC -dverbose-core2core #-} to GHC.Real, and then doing

        cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."

in hadrian/

That did recompile GHC.Real – but all the debug output disappeared!

I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that didn’t work.

I’m stuck – any ideas?

Simon

 

From: ghc-devs <[hidden email]> On Behalf Of Simon Peyton Jones via ghc-devs
Sent: 30 August 2018 12:12
To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov <[hidden email]>
Cc: ghc-devs <[hidden email]>
Subject: Hadrian

 

Alp, Andrey

The old build system printed out every command line; and I often copy-paste that info to build single modules.

Eg currently, when trying to understand #15570 I see a suspicious GHC.Real.hi.  So I want to manually recompile GHC.Real (from base), adding some debug flags.  How can I get the right command line to do that from the build log?

Where is the “how to use Hadrian” wiki page?  I know you’ve been writing one.

Simon


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

Andrey Mokhov
Simon,

If you want to see all command lines, you can pass '--verbose' or '-V' flag to Hadrian and it will then print out everything it does.

But you can also choose which particular command lines to print in UserSettings, see:

https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md#verbose-command-lines 

So, you can do:

verboseCommand = input "//GHC/Real.hs"

Or, alternatively,

verboseCommand = output "//GHC/Real.hi"

Both should produce the same result (in theory).

In general, we have the following documents on Hadrian:

The README: https://github.com/snowleopard/hadrian/blob/master/README.md 
How to use UserSettings: https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md 
An overview of build flavours: https://github.com/snowleopard/hadrian/blob/master/doc/flavours.md 

I hope the more Hadrian gets used, the more complete the documentation will become.

Cheers,
Andrey

From: Simon Peyton Jones [mailto:[hidden email]]
Sent: 30 August 2018 12:19
To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari <[hidden email]>; Andrey Mokhov <[hidden email]>
Cc: ghc-devs <[hidden email]>
Subject: RE: Hadrian

Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC -dverbose-core2core #-} to GHC.Real, and then doing
        cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."
in hadrian/
That did recompile GHC.Real - but all the debug output disappeared!
I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that didn't work.
I'm stuck - any ideas?
Simon

From: ghc-devs <[hidden email]> On Behalf Of Simon Peyton Jones via ghc-devs
Sent: 30 August 2018 12:12
To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov <[hidden email]>
Cc: ghc-devs <[hidden email]>
Subject: Hadrian

Alp, Andrey
The old build system printed out every command line; and I often copy-paste that info to build single modules.
Eg currently, when trying to understand #15570 I see a suspicious GHC.Real.hi.  So I want to manually recompile GHC.Real (from base), adding some debug flags.  How can I get the right command line to do that from the build log?
Where is the "how to use Hadrian" wiki page?  I know you've been writing one.
Simon
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Hadrian

Artem Pelenitsyn
Hello Simon, Andrey,

For “How to use Hadrian wikipage”, maybe Simon wanted this one from the GHC Wiki:

https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart

It does mention the verbose flag, but does not really explain that you can get what Simon wants, I believe.

--
Best wishes,
Artem
чт, 30 авг. 2018 г. в 7:25, Andrey Mokhov <[hidden email]>:
Simon,

If you want to see all command lines, you can pass '--verbose' or '-V' flag to Hadrian and it will then print out everything it does.

But you can also choose which particular command lines to print in UserSettings, see:

https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md#verbose-command-lines

So, you can do:

verboseCommand = input "//GHC/Real.hs"

Or, alternatively,

verboseCommand = output "//GHC/Real.hi"

Both should produce the same result (in theory).

In general, we have the following documents on Hadrian:

The README: https://github.com/snowleopard/hadrian/blob/master/README.md
How to use UserSettings: https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md
An overview of build flavours: https://github.com/snowleopard/hadrian/blob/master/doc/flavours.md

I hope the more Hadrian gets used, the more complete the documentation will become.

Cheers,
Andrey

From: Simon Peyton Jones [mailto:[hidden email]]
Sent: 30 August 2018 12:19
To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari <[hidden email]>; Andrey Mokhov <[hidden email]>
Cc: ghc-devs <[hidden email]>
Subject: RE: Hadrian

Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC -dverbose-core2core #-} to GHC.Real, and then doing
        cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."
in hadrian/
That did recompile GHC.Real - but all the debug output disappeared!
I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that didn't work.
I'm stuck - any ideas?
Simon

From: ghc-devs <[hidden email]> On Behalf Of Simon Peyton Jones via ghc-devs
Sent: 30 August 2018 12:12
To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov <[hidden email]>
Cc: ghc-devs <[hidden email]>
Subject: Hadrian

Alp, Andrey
The old build system printed out every command line; and I often copy-paste that info to build single modules.
Eg currently, when trying to understand #15570 I see a suspicious GHC.Real.hi.  So I want to manually recompile GHC.Real (from base), adding some debug flags.  How can I get the right command line to do that from the build log?
Where is the "how to use Hadrian" wiki page?  I know you've been writing one.
Simon
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

GHC - devs mailing list
In reply to this post by Andrey Mokhov
|  If you want to see all command lines, you can pass '--verbose' or '-V'
|  flag to Hadrian and it will then print out everything it does.

But I am not invoking Hadrian.  I am saying (on your instructions)

        cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."

How do I "pass --verbose to Hadrian"?


|  -----Original Message-----
|  From: Andrey Mokhov <[hidden email]>
|  Sent: 30 August 2018 12:26
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Simon,
|  
|  If you want to see all command lines, you can pass '--verbose' or '-V'
|  flag to Hadrian and it will then print out everything it does.
|  
|  But you can also choose which particular command lines to print in
|  UserSettings, see:
|  
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md%23verbose-command-
|  lines&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508
|  d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140342623
|  1&amp;sdata=tMYhmIGMeVbBYjAtxWQTY5%2F4Kyfc4m981N4OTowGkbQ%3D&amp;reserved
|  =0
|  
|  So, you can do:
|  
|  verboseCommand = input "//GHC/Real.hs"
|  
|  Or, alternatively,
|  
|  verboseCommand = output "//GHC/Real.hi"
|  
|  Both should produce the same result (in theory).
|  
|  In general, we have the following documents on Hadrian:
|  
|  The README:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2FREADME.md&amp;data=02%7C01%7
|  Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f988bf86f
|  141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=7WigmQG7lbDd
|  eyhYCSaKOQEb0eeZcn0iXAbAKdwZ5A4%3D&amp;reserved=0
|  How to use UserSettings:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269
|  efd508d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140
|  3426231&amp;sdata=tRu2lO%2F6TNV3ao5tzNKO%2FAHJMWsxKX%2BqExHn78nuCvU%3D&am
|  p;reserved=0
|  An overview of build flavours:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fflavours.md&amp;data=0
|  2%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f
|  988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=Esye
|  DdAKLV9DC3PUwkqsuQ4zGoOYKcaJeEov1BAH8lU%3D&amp;reserved=0
|  
|  I hope the more Hadrian gets used, the more complete the documentation
|  will become.
|  
|  Cheers,
|  Andrey
|  
|  From: Simon Peyton Jones [mailto:[hidden email]]
|  Sent: 30 August 2018 12:19
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>; Andrey Mokhov <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC -
|  dverbose-core2core #-} to GHC.Real, and then doing
|          cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."
|  in hadrian/
|  That did recompile GHC.Real - but all the debug output disappeared!
|  I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that
|  didn't work.
|  I'm stuck - any ideas?
|  Simon
|  
|  From: ghc-devs <[hidden email]> On Behalf Of Simon Peyton
|  Jones via ghc-devs
|  Sent: 30 August 2018 12:12
|  To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: Hadrian
|  
|  Alp, Andrey
|  The old build system printed out every command line; and I often copy-
|  paste that info to build single modules.
|  Eg currently, when trying to understand #15570 I see a suspicious
|  GHC.Real.hi.  So I want to manually recompile GHC.Real (from base),
|  adding some debug flags.  How can I get the right command line to do that
|  from the build log?
|  Where is the "how to use Hadrian" wiki page?  I know you've been writing
|  one.
|  Simon
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

Andrey Mokhov
> How do I "pass --verbose to Hadrian"?

Like this:

cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".." -V

Everything after "--" in this command line are flags passed to Hadrian. Everything before are flags passed to Cabal. (I hope we'll fix the "build.sh" script for you soon, so you don't need to go via Cabal.)

I just tried this with {-# OPTIONS_GHC -dverbose-core2core #-} and this did also print out a lot of Core. And a lot more stuff (somehow this seems to cause further recompilation).


> https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart

Artem -- thanks! I forgot to mention this wiki page, which indeed looks


Cheers,
Andrey

-----Original Message-----
From: Simon Peyton Jones [mailto:[hidden email]]
Sent: 30 August 2018 13:00
To: Andrey Mokhov <[hidden email]>; Alp Mestanogullari <[hidden email]>
Cc: ghc-devs <[hidden email]>
Subject: RE: Hadrian

|  If you want to see all command lines, you can pass '--verbose' or '-V'
|  flag to Hadrian and it will then print out everything it does.

But I am not invoking Hadrian.  I am saying (on your instructions)

        cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."

How do I "pass --verbose to Hadrian"?


|  -----Original Message-----
|  From: Andrey Mokhov <[hidden email]>
|  Sent: 30 August 2018 12:26
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Simon,
|  
|  If you want to see all command lines, you can pass '--verbose' or '-V'
|  flag to Hadrian and it will then print out everything it does.
|  
|  But you can also choose which particular command lines to print in
|  UserSettings, see:
|  
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md%23verbose-command-
|  lines&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508
|  d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140342623
|  1&amp;sdata=tMYhmIGMeVbBYjAtxWQTY5%2F4Kyfc4m981N4OTowGkbQ%3D&amp;reserved
|  =0
|  
|  So, you can do:
|  
|  verboseCommand = input "//GHC/Real.hs"
|  
|  Or, alternatively,
|  
|  verboseCommand = output "//GHC/Real.hi"
|  
|  Both should produce the same result (in theory).
|  
|  In general, we have the following documents on Hadrian:
|  
|  The README:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2FREADME.md&amp;data=02%7C01%7
|  Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f988bf86f
|  141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=7WigmQG7lbDd
|  eyhYCSaKOQEb0eeZcn0iXAbAKdwZ5A4%3D&amp;reserved=0
|  How to use UserSettings:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269
|  efd508d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140
|  3426231&amp;sdata=tRu2lO%2F6TNV3ao5tzNKO%2FAHJMWsxKX%2BqExHn78nuCvU%3D&am
|  p;reserved=0
|  An overview of build flavours:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fflavours.md&amp;data=0
|  2%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f
|  988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=Esye
|  DdAKLV9DC3PUwkqsuQ4zGoOYKcaJeEov1BAH8lU%3D&amp;reserved=0
|  
|  I hope the more Hadrian gets used, the more complete the documentation
|  will become.
|  
|  Cheers,
|  Andrey
|  
|  From: Simon Peyton Jones [mailto:[hidden email]]
|  Sent: 30 August 2018 12:19
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>; Andrey Mokhov <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC -
|  dverbose-core2core #-} to GHC.Real, and then doing
|          cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."
|  in hadrian/
|  That did recompile GHC.Real - but all the debug output disappeared!
|  I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that
|  didn't work.
|  I'm stuck - any ideas?
|  Simon
|  
|  From: ghc-devs <[hidden email]> On Behalf Of Simon Peyton
|  Jones via ghc-devs
|  Sent: 30 August 2018 12:12
|  To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: Hadrian
|  
|  Alp, Andrey
|  The old build system printed out every command line; and I often copy-
|  paste that info to build single modules.
|  Eg currently, when trying to understand #15570 I see a suspicious
|  GHC.Real.hi.  So I want to manually recompile GHC.Real (from base),
|  adding some debug flags.  How can I get the right command line to do that
|  from the build log?
|  Where is the "how to use Hadrian" wiki page?  I know you've been writing
|  one.
|  Simon
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

GHC - devs mailing list
In reply to this post by Andrey Mokhov
Very confusingly
https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md#verbose-command-lines

speaks about verboseCommmands PLURAL, whereas it should say verboseCommand SINGLUAR.

Moreover, what is the language things you can say (i.e. where is it documented).  The "//" business, and what patterns can occur. What things other than "//" can you have?  What about 'input' etc?

Simon

|  -----Original Message-----
|  From: Andrey Mokhov <[hidden email]>
|  Sent: 30 August 2018 12:26
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Simon,
|  
|  If you want to see all command lines, you can pass '--verbose' or '-V'
|  flag to Hadrian and it will then print out everything it does.
|  
|  But you can also choose which particular command lines to print in
|  UserSettings, see:
|  
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md%23verbose-command-
|  lines&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508
|  d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140342623
|  1&amp;sdata=tMYhmIGMeVbBYjAtxWQTY5%2F4Kyfc4m981N4OTowGkbQ%3D&amp;reserved
|  =0
|  
|  So, you can do:
|  
|  verboseCommand = input "//GHC/Real.hs"
|  
|  Or, alternatively,
|  
|  verboseCommand = output "//GHC/Real.hi"
|  
|  Both should produce the same result (in theory).
|  
|  In general, we have the following documents on Hadrian:
|  
|  The README:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2FREADME.md&amp;data=02%7C01%7
|  Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f988bf86f
|  141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=7WigmQG7lbDd
|  eyhYCSaKOQEb0eeZcn0iXAbAKdwZ5A4%3D&amp;reserved=0
|  How to use UserSettings:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269
|  efd508d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140
|  3426231&amp;sdata=tRu2lO%2F6TNV3ao5tzNKO%2FAHJMWsxKX%2BqExHn78nuCvU%3D&am
|  p;reserved=0
|  An overview of build flavours:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fflavours.md&amp;data=0
|  2%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f
|  988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=Esye
|  DdAKLV9DC3PUwkqsuQ4zGoOYKcaJeEov1BAH8lU%3D&amp;reserved=0
|  
|  I hope the more Hadrian gets used, the more complete the documentation
|  will become.
|  
|  Cheers,
|  Andrey
|  
|  From: Simon Peyton Jones [mailto:[hidden email]]
|  Sent: 30 August 2018 12:19
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>; Andrey Mokhov <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC -
|  dverbose-core2core #-} to GHC.Real, and then doing
|          cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."
|  in hadrian/
|  That did recompile GHC.Real - but all the debug output disappeared!
|  I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that
|  didn't work.
|  I'm stuck - any ideas?
|  Simon
|  
|  From: ghc-devs <[hidden email]> On Behalf Of Simon Peyton
|  Jones via ghc-devs
|  Sent: 30 August 2018 12:12
|  To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: Hadrian
|  
|  Alp, Andrey
|  The old build system printed out every command line; and I often copy-
|  paste that info to build single modules.
|  Eg currently, when trying to understand #15570 I see a suspicious
|  GHC.Real.hi.  So I want to manually recompile GHC.Real (from base),
|  adding some debug flags.  How can I get the right command line to do that
|  from the build log?
|  Where is the "how to use Hadrian" wiki page?  I know you've been writing
|  one.
|  Simon
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

Andrey Mokhov
Thanks Simon,

I fixed the "verboseCommands" typo.

Regarding various available predicates: indeed, we don't currently have a comprehensive description -- I've opened an issue for this and will hopefully fix it soon.

In the meanwhile, there are a few examples of predicates in the rest of the doc/user-settings.md document, for example here: https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md#command-line-arguments.

The `input` and `output` predicates accept Shake's `FilePattern` as parameters -- see the documentation for it here:

https://hackage.haskell.org/package/shake-0.16.4/docs/Development-Shake.html#v:-63--61--61-

Cheers,
Andrey

-----Original Message-----
From: Simon Peyton Jones [mailto:[hidden email]]
Sent: 04 September 2018 16:49
To: Andrey Mokhov <[hidden email]>; Alp Mestanogullari <[hidden email]>
Cc: ghc-devs <[hidden email]>
Subject: RE: Hadrian

Very confusingly
https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md#verbose-command-lines

speaks about verboseCommmands PLURAL, whereas it should say verboseCommand SINGLUAR.

Moreover, what is the language things you can say (i.e. where is it documented).  The "//" business, and what patterns can occur. What things other than "//" can you have?  What about 'input' etc?

Simon

|  -----Original Message-----
|  From: Andrey Mokhov <[hidden email]>
|  Sent: 30 August 2018 12:26
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Simon,
|  
|  If you want to see all command lines, you can pass '--verbose' or '-V'
|  flag to Hadrian and it will then print out everything it does.
|  
|  But you can also choose which particular command lines to print in
|  UserSettings, see:
|  
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md%23verbose-command-
|  lines&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508
|  d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140342623
|  1&amp;sdata=tMYhmIGMeVbBYjAtxWQTY5%2F4Kyfc4m981N4OTowGkbQ%3D&amp;reserved
|  =0
|  
|  So, you can do:
|  
|  verboseCommand = input "//GHC/Real.hs"
|  
|  Or, alternatively,
|  
|  verboseCommand = output "//GHC/Real.hi"
|  
|  Both should produce the same result (in theory).
|  
|  In general, we have the following documents on Hadrian:
|  
|  The README:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2FREADME.md&amp;data=02%7C01%7
|  Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f988bf86f
|  141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=7WigmQG7lbDd
|  eyhYCSaKOQEb0eeZcn0iXAbAKdwZ5A4%3D&amp;reserved=0
|  How to use UserSettings:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
|  settings.md&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269
|  efd508d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671225140
|  3426231&amp;sdata=tRu2lO%2F6TNV3ao5tzNKO%2FAHJMWsxKX%2BqExHn78nuCvU%3D&am
|  p;reserved=0
|  An overview of build flavours:
|  https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
|  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fflavours.md&amp;data=0
|  2%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f
|  988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=Esye
|  DdAKLV9DC3PUwkqsuQ4zGoOYKcaJeEov1BAH8lU%3D&amp;reserved=0
|  
|  I hope the more Hadrian gets used, the more complete the documentation
|  will become.
|  
|  Cheers,
|  Andrey
|  
|  From: Simon Peyton Jones [mailto:[hidden email]]
|  Sent: 30 August 2018 12:19
|  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
|  <[hidden email]>; Andrey Mokhov <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: RE: Hadrian
|  
|  Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC -
|  dverbose-core2core #-} to GHC.Real, and then doing
|          cabal new-run hadrian -- -c -j4 --flavour=quick --directory=".."
|  in hadrian/
|  That did recompile GHC.Real - but all the debug output disappeared!
|  I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that
|  didn't work.
|  I'm stuck - any ideas?
|  Simon
|  
|  From: ghc-devs <[hidden email]> On Behalf Of Simon Peyton
|  Jones via ghc-devs
|  Sent: 30 August 2018 12:12
|  To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov
|  <[hidden email]>
|  Cc: ghc-devs <[hidden email]>
|  Subject: Hadrian
|  
|  Alp, Andrey
|  The old build system printed out every command line; and I often copy-
|  paste that info to build single modules.
|  Eg currently, when trying to understand #15570 I see a suspicious
|  GHC.Real.hi.  So I want to manually recompile GHC.Real (from base),
|  adding some debug flags.  How can I get the right command line to do that
|  from the build log?
|  Where is the "how to use Hadrian" wiki page?  I know you've been writing
|  one.
|  Simon
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

RE: Hadrian

GHC - devs mailing list
Thanks!

It's helpful to tell me, but more helpful still to augment the "How to use Hadrian" documentation, as you suggest.

Simon

| -----Original Message-----
| From: Andrey Mokhov <[hidden email]>
| Sent: 04 September 2018 18:49
| To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
| <[hidden email]>
| Cc: ghc-devs <[hidden email]>
| Subject: RE: Hadrian
|
| Thanks Simon,
|
| I fixed the "verboseCommands" typo.
|
| Regarding various available predicates: indeed, we don't currently have
| a comprehensive description -- I've opened an issue for this and will
| hopefully fix it soon.
|
| In the meanwhile, there are a few examples of predicates in the rest of
| the doc/user-settings.md document, for example here:
| https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
| com%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
| settings.md%23command-line-
| arguments&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C4fb0515ae2e04363f
| 28508d6128ea983%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63671680127
| 5286560&amp;sdata=mIM3eLPQOMc28uBN4kvA9q%2Fq3Z7aKud0fGme9c7Zk0c%3D&amp;r
| eserved=0.
|
| The `input` and `output` predicates accept Shake's `FilePattern` as
| parameters -- see the documentation for it here:
|
| https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhackage
| .haskell.org%2Fpackage%2Fshake-0.16.4%2Fdocs%2FDevelopment-
| Shake.html%23v%3A-63--61--61-
| &amp;data=02%7C01%7Csimonpj%40microsoft.com%7C4fb0515ae2e04363f28508d612
| 8ea983%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636716801275296568&a
| mp;sdata=Lr9Q6ufGeauZt%2BxX4nmNC7gQkbfPvg%2Fa8gSTNEmB6AU%3D&amp;reserved
| =0
|
| Cheers,
| Andrey
|
| -----Original Message-----
| From: Simon Peyton Jones [mailto:[hidden email]]
| Sent: 04 September 2018 16:49
| To: Andrey Mokhov <[hidden email]>; Alp Mestanogullari
| <[hidden email]>
| Cc: ghc-devs <[hidden email]>
| Subject: RE: Hadrian
|
| Very confusingly
| https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
| com%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
| settings.md%23verbose-command-
| lines&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C4fb0515ae2e04363f2850
| 8d6128ea983%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636716801275296
| 568&amp;sdata=6HmXCIghQhkAK1prpzhnCJa9bLUlcZwmsxdEJmULEVY%3D&amp;reserve
| d=0
|
| speaks about verboseCommmands PLURAL, whereas it should say
| verboseCommand SINGLUAR.
|
| Moreover, what is the language things you can say (i.e. where is it
| documented).  The "//" business, and what patterns can occur. What
| things other than "//" can you have?  What about 'input' etc?
|
| Simon
|
| |  -----Original Message-----
| |  From: Andrey Mokhov <[hidden email]>
| |  Sent: 30 August 2018 12:26
| |  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
| |  <[hidden email]>
| |  Cc: ghc-devs <[hidden email]>
| |  Subject: RE: Hadrian
| |
| |  Simon,
| |
| |  If you want to see all command lines, you can pass '--verbose' or '-
| V'
| |  flag to Hadrian and it will then print out everything it does.
| |
| |  But you can also choose which particular command lines to print in
| |  UserSettings, see:
| |
| |
| https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
| c
| |  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
| |  settings.md%23verbose-command-
| |
| lines&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd50
| 8
| |
| d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6367122514034262
| 3
| |
| 1&amp;sdata=tMYhmIGMeVbBYjAtxWQTY5%2F4Kyfc4m981N4OTowGkbQ%3D&amp;reserve
| d
| |  =0
| |
| |  So, you can do:
| |
| |  verboseCommand = input "//GHC/Real.hs"
| |
| |  Or, alternatively,
| |
| |  verboseCommand = output "//GHC/Real.hi"
| |
| |  Both should produce the same result (in theory).
| |
| |  In general, we have the following documents on Hadrian:
| |
| |  The README:
| |
| https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
| c
| |
| om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2FREADME.md&amp;data=02%7C01%
| 7
| |
| Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72f988bf86
| f
| |
| 141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=7WigmQG7lbD
| d
| |  eyhYCSaKOQEb0eeZcn0iXAbAKdwZ5A4%3D&amp;reserved=0
| |  How to use UserSettings:
| |
| https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
| c
| |  om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fuser-
| |
| settings.md&amp;data=02%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f7426
| 9
| |
| efd508d60e6b4fe7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6367122514
| 0
| |
| 3426231&amp;sdata=tRu2lO%2F6TNV3ao5tzNKO%2FAHJMWsxKX%2BqExHn78nuCvU%3D&a
| m
| |  p;reserved=0
| |  An overview of build flavours:
| |
| https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
| c
| |
| om%2Fsnowleopard%2Fhadrian%2Fblob%2Fmaster%2Fdoc%2Fflavours.md&amp;data=
| 0
| |
| 2%7C01%7Csimonpj%40microsoft.com%7C0c6118a504f74269efd508d60e6b4fe7%7C72
| f
| |
| 988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636712251403426231&amp;sdata=Esy
| e
| |  DdAKLV9DC3PUwkqsuQ4zGoOYKcaJeEov1BAH8lU%3D&amp;reserved=0
| |
| |  I hope the more Hadrian gets used, the more complete the
| documentation
| |  will become.
| |
| |  Cheers,
| |  Andrey
| |
| |  From: Simon Peyton Jones [mailto:[hidden email]]
| |  Sent: 30 August 2018 12:19
| |  To: Simon Peyton Jones <[hidden email]>; Alp Mestanogullari
| |  <[hidden email]>; Andrey Mokhov <[hidden email]>
| |  Cc: ghc-devs <[hidden email]>
| |  Subject: RE: Hadrian
| |
| |  Sigh.  As an inconvenient workaround, I tried adding {-# OPTIONS_GHC
| -
| |  dverbose-core2core #-} to GHC.Real, and then doing
| |          cabal new-run hadrian -- -c -j4 --flavour=quick --
| directory=".."
| |  in hadrian/
| |  That did recompile GHC.Real - but all the debug output disappeared!
| |  I tried adding {-# OPTIONS_GHC -ddebug-output #-} as well, but that
| |  didn't work.
| |  I'm stuck - any ideas?
| |  Simon
| |
| |  From: ghc-devs <[hidden email]> On Behalf Of Simon
| Peyton
| |  Jones via ghc-devs
| |  Sent: 30 August 2018 12:12
| |  To: Alp Mestanogullari <[hidden email]>; Andrey Mokhov
| |  <[hidden email]>
| |  Cc: ghc-devs <[hidden email]>
| |  Subject: Hadrian
| |
| |  Alp, Andrey
| |  The old build system printed out every command line; and I often
| copy-
| |  paste that info to build single modules.
| |  Eg currently, when trying to understand #15570 I see a suspicious
| |  GHC.Real.hi.  So I want to manually recompile GHC.Real (from base),
| |  adding some debug flags.  How can I get the right command line to do
| that
| |  from the build log?
| |  Where is the "how to use Hadrian" wiki page?  I know you've been
| writing
| |  one.
| |  Simon
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs