How to teach Hadrian not to build ghctags and haddock

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

How to teach Hadrian not to build ghctags and haddock

Roland Senn
I switched to Hadrian. Normally I hack somewhere in the compiler. So I
use "hadrian/build.sh --flavour=devel2 --freeze1" to quickly rebuild
GHC after some little changes to the code.

It normally builds
 - library 'ghc' (Stage1, way v)
 - program 'ghctags' (Stage1)
 - program 'ghc-bin' (Stage1)
 - program 'haddock' (Stage1)

When hacking GHC, I never use ghctags or haddock. Building ghctags is
very fast, 1-2 seconds. However building haddock takes 15 to 20
seconds.

Is there a way to teach hadrian not to build haddock and ghctags?

Many thanks!
   Roland
_______________________________________________
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: How to teach Hadrian not to build ghctags and haddock

Alp Mestanogullari-2
One way would be to simply ask to build just what you need, e.g:

$ hadrian/build.sh --flavour=devel2 --freeze1 stage2:exe:ghc-bin

See https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/make.md 
for more examples of that 'simple target' syntax. When no target is
specified, hadrian will go ahead and build "everything".

On 01/02/2019 11:27, Roland Senn wrote:

> I switched to Hadrian. Normally I hack somewhere in the compiler. So I
> use "hadrian/build.sh --flavour=devel2 --freeze1" to quickly rebuild
> GHC after some little changes to the code.
>
> It normally builds
>   - library 'ghc' (Stage1, way v)
>   - program 'ghctags' (Stage1)
>   - program 'ghc-bin' (Stage1)
>   - program 'haddock' (Stage1)
>
> When hacking GHC, I never use ghctags or haddock. Building ghctags is
> very fast, 1-2 seconds. However building haddock takes 15 to 20
> seconds.
>
> Is there a way to teach hadrian not to build haddock and ghctags?
>
> Many thanks!
>     Roland
> _______________________________________________
> ghc-devs mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

--
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
Reply | Threaded
Open this post in threaded view
|

Re: How to teach Hadrian not to build ghctags and haddock

Ben Gamari-3
In reply to this post by Roland Senn
Roland Senn <[hidden email]> writes:

> I switched to Hadrian. Normally I hack somewhere in the compiler. So I
> use "hadrian/build.sh --flavour=devel2 --freeze1" to quickly rebuild
> GHC after some little changes to the code.
>
> It normally builds
>  - library 'ghc' (Stage1, way v)
>  - program 'ghctags' (Stage1)
>  - program 'ghc-bin' (Stage1)
>  - program 'haddock' (Stage1)
>
In the case of ghctags I wonder if we shouldn't just remove it. I don't
know anyone who actually still uses it and there are better options at this
point (e.g. I personally use hasktags when working in GHC).

> When hacking GHC, I never use ghctags or haddock. Building ghctags is
> very fast, 1-2 seconds. However building haddock takes 15 to 20
> seconds.
>
Regarding haddock, I think Alp hit the nail on the head. The right thing
to do is just to be more specific about what you want built.

Tobias, can you make Alp's advice makes it into the new developer
documentation?

Also, we should likely describe a workflow for generating tags for a GHC
tree. I have a script using hasktags [1] which makes this relatively
painless.

Cheers,

- Ben


[1] https://github.com/bgamari/ghc-utils/blob/master/make-ghc-tags.sh

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

signature.asc (497 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to teach Hadrian not to build ghctags and haddock

Tobias Dammers
On Fri, Feb 01, 2019 at 02:22:52PM -0500, Ben Gamari wrote:
> In the case of ghctags I wonder if we shouldn't just remove it. I don't
> know anyone who actually still uses it and there are better options at this
> point (e.g. I personally use hasktags when working in GHC).

Agree; even if there are people still using ghctags, installing and
configuring it separately is the way to go, and I don't see a good
reason to keep it in the GHC distribution - we don't actually need it to
build anything else, do we?

> Regarding haddock, I think Alp hit the nail on the head. The right thing
> to do is just to be more specific about what you want built.
>
> Tobias, can you make Alp's advice makes it into the new developer
> documentation?

The documentation already advises newcomers to only rebuild GHC itself;
I've updated it to use the symbolic stage2:exe:ghc-bin notation though
instead of the actual filename (_build/stage1/bin/ghc), assuming that
the former will work even when building in a different directory. I've
also added a link to the Hadrian README, which should provide enough
hints to the rest of the Hadrian documentation.

> Also, we should likely describe a workflow for generating tags for a GHC
> tree. I have a script using hasktags [1] which makes this relatively
> painless.

Maybe, but is it really that different from other source trees? The
newcomers document is quite long already, so maybe we should just have a
separate page for a bunch of editor support and other tooling
configuration, and link to that from the newcomers' guide?

--
Tobias Dammers - [hidden email]
_______________________________________________
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: How to teach Hadrian not to build ghctags and haddock

Alp Mestanogullari-2
Hello,

On 04/02/2019 10:24, Tobias Dammers wrote:
>
> The documentation already advises newcomers to only rebuild GHC itself;
> I've updated it to use the symbolic stage2:exe:ghc-bin notation though
> instead of the actual filename (_build/stage1/bin/ghc), assuming that
> the former will work even when building in a different directory. I've
> also added a link to the Hadrian README, which should provide enough
> hints to the rest of the Hadrian documentation.

The simple notation is just a shorthand for the right path under
whatever build root is used (_build by default, or the value of
--build-root when it is passed), so it will indeed be mapped to the
right concrete target regardless of the build root.

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