Hadrian questions

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

Hadrian questions

Richard Eisenberg-4
As suggested, I'm trying out Hadrian. I have a few questions.

 - After building GHC the first time, I often go into the /ghc directory and then do `make 2` to build just the stage-2 compiler. Is that now the same as `build --freeze1`? It would seem not (I haven't tested), because running `make 2` builds only the compiler, not the libraries. Can this workflow be replicated in Hadrian?

 - I have `userDefaultFlavour = "devel2"` in my hadrian/UserSettings.hs file. But I see build artifacts during compilation of stage-2 that have dyn_o and p_o extensions. I don't want these. Have I done something wrong? Or are these artifacts now necessary?

 - I have quite a few ghc directories. What are the dependencies of Hadrian so that I can install these into my global package database and avoiding rebuilding them for each ghc tree? (Please don't tell me that the global package database is bad for my health. I know that, and I know why, but it's still terribly convenient, and I'm happy to pay the occasional price for that convenience.)

I'm sure I'll have more questions.

Thanks!
Richard
_______________________________________________
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 questions

Richard Eisenberg-4
In the "devel2" flavor, I also seem to have built Haddock. `make` didn't do this with devel2, and I'd prefer Hadrian didn't, too.

Maybe I'm not really on the devel2 flavor?

> On Jan 24, 2019, at 11:02 PM, Richard Eisenberg <[hidden email]> wrote:
>
> As suggested, I'm trying out Hadrian. I have a few questions.
>
> - After building GHC the first time, I often go into the /ghc directory and then do `make 2` to build just the stage-2 compiler. Is that now the same as `build --freeze1`? It would seem not (I haven't tested), because running `make 2` builds only the compiler, not the libraries. Can this workflow be replicated in Hadrian?
>
> - I have `userDefaultFlavour = "devel2"` in my hadrian/UserSettings.hs file. But I see build artifacts during compilation of stage-2 that have dyn_o and p_o extensions. I don't want these. Have I done something wrong? Or are these artifacts now necessary?
>
> - I have quite a few ghc directories. What are the dependencies of Hadrian so that I can install these into my global package database and avoiding rebuilding them for each ghc tree? (Please don't tell me that the global package database is bad for my health. I know that, and I know why, but it's still terribly convenient, and I'm happy to pay the occasional price for that convenience.)
>
> I'm sure I'll have more questions.
>
> Thanks!
> Richard
> _______________________________________________
> 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 questions

Matthew Pickering
`make 2` should be somewhat equivalent to `./hadrian/build.sh
_build/stage1/bin/ghc` I think.

The problem is with the devel2 flavour itself. Tracked by
https://ghc.haskell.org/trac/ghc/ticket/16210

The `hadrian/build.sh` script uses `cabal new-build` so the
dependencies should be shared already when possible.

Cheers,

Matt

On Fri, Jan 25, 2019 at 4:07 AM Richard Eisenberg <[hidden email]> wrote:

>
> In the "devel2" flavor, I also seem to have built Haddock. `make` didn't do this with devel2, and I'd prefer Hadrian didn't, too.
>
> Maybe I'm not really on the devel2 flavor?
>
> > On Jan 24, 2019, at 11:02 PM, Richard Eisenberg <[hidden email]> wrote:
> >
> > As suggested, I'm trying out Hadrian. I have a few questions.
> >
> > - After building GHC the first time, I often go into the /ghc directory and then do `make 2` to build just the stage-2 compiler. Is that now the same as `build --freeze1`? It would seem not (I haven't tested), because running `make 2` builds only the compiler, not the libraries. Can this workflow be replicated in Hadrian?
> >
> > - I have `userDefaultFlavour = "devel2"` in my hadrian/UserSettings.hs file. But I see build artifacts during compilation of stage-2 that have dyn_o and p_o extensions. I don't want these. Have I done something wrong? Or are these artifacts now necessary?
> >
> > - I have quite a few ghc directories. What are the dependencies of Hadrian so that I can install these into my global package database and avoiding rebuilding them for each ghc tree? (Please don't tell me that the global package database is bad for my health. I know that, and I know why, but it's still terribly convenient, and I'm happy to pay the occasional price for that convenience.)
> >
> > I'm sure I'll have more questions.
> >
> > Thanks!
> > Richard
> > _______________________________________________
> > 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
_______________________________________________
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 questions

Alec Theriault
Worth noting that Hadrian additionally defines a set of so-called phony targets for packages and executables, so `./hadrian/build.sh --freeze1 build/stage1/bin/ghc` can also be expressed independently from your build root as `./hadrian/build.sh --freeze1 stage2:exe:ghc-bin`.

Alec

> On Jan 25, 2019, at 12:22 AM, Matthew Pickering <[hidden email]> wrote:
>
> `make 2` should be somewhat equivalent to `./hadrian/build.sh
> _build/stage1/bin/ghc` I think.
>
> The problem is with the devel2 flavour itself. Tracked by
> https://ghc.haskell.org/trac/ghc/ticket/16210
>
> The `hadrian/build.sh` script uses `cabal new-build` so the
> dependencies should be shared already when possible.
>
> Cheers,
>
> Matt
>
> On Fri, Jan 25, 2019 at 4:07 AM Richard Eisenberg <[hidden email]> wrote:
>>
>> In the "devel2" flavor, I also seem to have built Haddock. `make` didn't do this with devel2, and I'd prefer Hadrian didn't, too.
>>
>> Maybe I'm not really on the devel2 flavor?
>>
>>> On Jan 24, 2019, at 11:02 PM, Richard Eisenberg <[hidden email]> wrote:
>>>
>>> As suggested, I'm trying out Hadrian. I have a few questions.
>>>
>>> - After building GHC the first time, I often go into the /ghc directory and then do `make 2` to build just the stage-2 compiler. Is that now the same as `build --freeze1`? It would seem not (I haven't tested), because running `make 2` builds only the compiler, not the libraries. Can this workflow be replicated in Hadrian?
>>>
>>> - I have `userDefaultFlavour = "devel2"` in my hadrian/UserSettings.hs file. But I see build artifacts during compilation of stage-2 that have dyn_o and p_o extensions. I don't want these. Have I done something wrong? Or are these artifacts now necessary?
>>>
>>> - I have quite a few ghc directories. What are the dependencies of Hadrian so that I can install these into my global package database and avoiding rebuilding them for each ghc tree? (Please don't tell me that the global package database is bad for my health. I know that, and I know why, but it's still terribly convenient, and I'm happy to pay the occasional price for that convenience.)
>>>
>>> I'm sure I'll have more questions.
>>>
>>> Thanks!
>>> Richard
>>> _______________________________________________
>>> 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
> _______________________________________________
> 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 questions

Richard Eisenberg-4
In reply to this post by Matthew Pickering
Maybe I'm just lazy, but would it be possible to shorten these? Specifically, could there be a root-level file `build` that triggers Hadrian? That way, I could just say ./build instead of hadrian/build.sh.

Actually, even that isn't quite right. It is common, for example, for me to be deep in the testsuite, trying to fix a test. I twiddle something (say, the output file), and then I want to rerun the test. But now I have to go back out to the root of my tree to run the test, no? So: I think it would be very convenient to make a script we can all install (in our PATH) that will search for hadrian's build.sh and run it. Then, we can just say `build` (or whatever we name the script) anywhere in a tree. Of course, I could just do this locally, but I doubt I'm the only one who would enjoy it.

Also, I just had a look at https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/testsuite.md, and I don't see a way to run just one directory of the testsuite. I use that ability currently quite often (because I know that I've mucked with the typechecker, so I just run the typecheck tests before doing full CI). Is this possible?

Thanks for all the work on this!
Richard

> On Jan 25, 2019, at 3:22 AM, Matthew Pickering <[hidden email]> wrote:
>
> `make 2` should be somewhat equivalent to `./hadrian/build.sh
> _build/stage1/bin/ghc` I think.
>
> The problem is with the devel2 flavour itself. Tracked by
> https://ghc.haskell.org/trac/ghc/ticket/16210
>
> The `hadrian/build.sh` script uses `cabal new-build` so the
> dependencies should be shared already when possible.
>
> Cheers,
>
> Matt
>
> On Fri, Jan 25, 2019 at 4:07 AM Richard Eisenberg <[hidden email]> wrote:
>>
>> In the "devel2" flavor, I also seem to have built Haddock. `make` didn't do this with devel2, and I'd prefer Hadrian didn't, too.
>>
>> Maybe I'm not really on the devel2 flavor?
>>
>>> On Jan 24, 2019, at 11:02 PM, Richard Eisenberg <[hidden email]> wrote:
>>>
>>> As suggested, I'm trying out Hadrian. I have a few questions.
>>>
>>> - After building GHC the first time, I often go into the /ghc directory and then do `make 2` to build just the stage-2 compiler. Is that now the same as `build --freeze1`? It would seem not (I haven't tested), because running `make 2` builds only the compiler, not the libraries. Can this workflow be replicated in Hadrian?
>>>
>>> - I have `userDefaultFlavour = "devel2"` in my hadrian/UserSettings.hs file. But I see build artifacts during compilation of stage-2 that have dyn_o and p_o extensions. I don't want these. Have I done something wrong? Or are these artifacts now necessary?
>>>
>>> - I have quite a few ghc directories. What are the dependencies of Hadrian so that I can install these into my global package database and avoiding rebuilding them for each ghc tree? (Please don't tell me that the global package database is bad for my health. I know that, and I know why, but it's still terribly convenient, and I'm happy to pay the occasional price for that convenience.)
>>>
>>> I'm sure I'll have more questions.
>>>
>>> Thanks!
>>> Richard
>>> _______________________________________________
>>> 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

_______________________________________________
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 questions

Andrey Mokhov
In reply to this post by Richard Eisenberg-4
Hi Richard,

First of all, thank you trying Hadrian and generating several new bug reports. This is very helpful!

> I think it would be very convenient to make a script we can all install (in our PATH) that will
> search for hadrian's build.sh and run it. Then, we can just say `build` (or whatever we name
> the script) anywhere in a tree. Of course, I could just do this locally, but I doubt I'm the only
> one who would enjoy it.

This sounds like a good feature request to me. Could you please add it on Trac, so it's not lost?

> Also, I just had a look at https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/testsuite.md,
> and I don't see a way to run just one directory of the testsuite. I use that ability currently quite
> often (because I know that I've mucked with the typechecker, so I just run the typecheck tests
> before doing full CI). Is this possible?

Yes, this should be possible. I believe Alp is currently working on the testsuite with the goal of fully matching the functionality provided by the Make build system. I think this feature is already on his list, but I'm CC-ing him just in case.

Cheers,
Andrey

================================================
Date: Fri, 25 Jan 2019 08:18:08 -0500
From: Richard Eisenberg <[hidden email]>
To: Matthew Pickering <[hidden email]>
Cc: GHC <[hidden email]>
Subject: Re: Hadrian questions

Maybe I'm just lazy, but would it be possible to shorten these? Specifically, could there be a root-level file `build` that triggers Hadrian? That way, I could just say ./build instead of hadrian/build.sh.

Actually, even that isn't quite right. It is common, for example, for me to be deep in the testsuite, trying to fix a test. I twiddle something (say, the output file), and then I want to rerun the test. But now I have to go back out to the root of my tree to run the test, no? So: I think it would be very convenient to make a script we can all install (in our PATH) that will search for hadrian's build.sh and run it. Then, we can just say `build` (or whatever we name the script) anywhere in a tree. Of course, I could just do this locally, but I doubt I'm the only one who would enjoy it.

Also, I just had a look at https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/testsuite.md, and I don't see a way to run just one directory of the testsuite. I use that ability currently quite often (because I know that I've mucked with the typechecker, so I just run the typecheck tests before doing full CI). Is this possible?

Thanks for all the work on this!
Richard

_______________________________________________
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 questions

Alp Mestanogullari-2
Yes, this is on my TODO, along with a proper ./validate workflow (which
combines binary distribution, installation and testing). I will do my
best to provide a larger feature set in the upcoming weeks.

On 28/01/2019 00:15, Andrey Mokhov wrote:

> Hi Richard,
>
> First of all, thank you trying Hadrian and generating several new bug reports. This is very helpful!
>
>> I think it would be very convenient to make a script we can all install (in our PATH) that will
>> search for hadrian's build.sh and run it. Then, we can just say `build` (or whatever we name
>> the script) anywhere in a tree. Of course, I could just do this locally, but I doubt I'm the only
>> one who would enjoy it.
> This sounds like a good feature request to me. Could you please add it on Trac, so it's not lost?
>
>> Also, I just had a look at https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/testsuite.md,
>> and I don't see a way to run just one directory of the testsuite. I use that ability currently quite
>> often (because I know that I've mucked with the typechecker, so I just run the typecheck tests
>> before doing full CI). Is this possible?
> Yes, this should be possible. I believe Alp is currently working on the testsuite with the goal of fully matching the functionality provided by the Make build system. I think this feature is already on his list, but I'm CC-ing him just in case.
>
> Cheers,
> Andrey
>
> ================================================
> Date: Fri, 25 Jan 2019 08:18:08 -0500
> From: Richard Eisenberg <[hidden email]>
> To: Matthew Pickering <[hidden email]>
> Cc: GHC <[hidden email]>
> Subject: Re: Hadrian questions
>
> Maybe I'm just lazy, but would it be possible to shorten these? Specifically, could there be a root-level file `build` that triggers Hadrian? That way, I could just say ./build instead of hadrian/build.sh.
>
> Actually, even that isn't quite right. It is common, for example, for me to be deep in the testsuite, trying to fix a test. I twiddle something (say, the output file), and then I want to rerun the test. But now I have to go back out to the root of my tree to run the test, no? So: I think it would be very convenient to make a script we can all install (in our PATH) that will search for hadrian's build.sh and run it. Then, we can just say `build` (or whatever we name the script) anywhere in a tree. Of course, I could just do this locally, but I doubt I'm the only one who would enjoy it.
>
> Also, I just had a look at https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/testsuite.md, and I don't see a way to run just one directory of the testsuite. I use that ability currently quite often (because I know that I've mucked with the typechecker, so I just run the typecheck tests before doing full CI). Is this possible?
>
> Thanks for all the work on this!
> Richard
>
--
Alp Mestanogullari, Haskell Consultant
Well-Typed LLP, https://www.well-typed.com/

Registered in England and Wales, OC335890
118 Wymering Mansions, Wymering Road, London, W9 2NF, England

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs