Re: Thoughts on the Contributing page

2019-01-29 Thread Julian Leviston

> On 29 Jan 2019, at 8:14 pm, Tobias Dammers  wrote:
> 
> The current Newcomers' Guide uses the current Makefile workflow, but
> this is on a fast track to deprecation - but then, I doubt Hadrian has
> seen enough exposure yet to use for a good beginner-friendly "Just
> Works" guide. I'm leaning towards sticking with make for now, also
> because existing material is already written this way; and then once
> Hadrian is truly ready for prime time, we can rewrite the relevant
> parts.
> 
> Thoughts?

As a recent newcomer, it’d be nice to have the option there as a link with a 
warning sign “here be dragons, but try this out if you’re interested”.
I tried it. It seems better than regular make already (I don’t have to guess at 
appropriate concurrency, for example, I just throw -j at it and it works it out 
assumedly because GHC can work out the number of capabilities), and it seems to 
work out which builds it needs to do next automatically.
Both those things - at least - are more beginner friendly than manually cloning 
the mk/build.mk file, running ./boot && ./configure && make -j8 then adjusting 
the mk/build.mk file again to get make to be faster.

So, FWIW, I say put the link on the page at the top as an alternative, mark it 
with a warning saying something along the lines of that it might not work, but 
it’s the future, and it’s simpler and easier if it does, and feel free to try 
it out, then fallback to make. There are plenty of sharp rocks for beginners, 
and ironically the existing make-based build system is probably one of them. 
(Having said that, it’s very helpful to know the stages of compilation, so 
hopefully whatever docs we arrive at will point the beginner to something 
explaining what’s going on as they do their first bootstrapping build, for the 
curious.

Julian
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: [ANNOUNCE] You should try Hadrian

2019-01-29 Thread Sebastian Graf
Side note: On my Windows my machine, where I use the environment provided
by `stack exec --no-ghc-package-path bash`, I have to do `bash -c 'pushd .
&& . /etc/profile && popd && ./configure --enable-tarballs-autodownload'`
or something along those lines for some time now (probably since the boot
script has been rewritten to python?).

Am Mo., 28. Jan. 2019 um 00:44 Uhr schrieb Phyx :

> Hi Andrey
>
> On Sun, Jan 27, 2019 at 10:49 PM Andrey Mokhov <
> andrey.mok...@newcastle.ac.uk> wrote:
>
>> Hi Tamar,
>>
>>
>>
>> Here is the relevant bullet point from the README:
>>
>>
>>
>> > On Windows, if you do not want to install MSYS, you can
>>
>> > use the Stack-based build script (Stack provides a managed
>>
>> > MSYS environment), as described in these instructions.
>>
>> > If you don't mind installing MSYS yourself or already have it,
>>
>> > you can use the Cabal-based build script.
>>
>
> Yes, I was referring to the "My first build" heading which had a call to
> build.bat, but it seems my branch was just old and the file was updated 11
> days ago to use cabal instead of stack.
> Now the rest of the file also makes sense. Apologies for that, I thought I
> had updated
>
>
>>
>> This claim is based on my experience. Installing the MSYS environment has
>> never worked out smoothly for me. Doing this via Stack was indeed more
>> robust (especially, when struggling with building GHC on Windows CI!). Has
>> this been different in your experience?
>>
>>
>>
>
> Yes, stack does nothing special than just un-tar the binary distribution
> of msys2. The problem is that this binary distribution is not kept up to
> date unless things break. By that point they may have gotten so out of date
> that the distribution simply can't even be upgraded. e.g. A while ago they
> used a distribution that's so old it couldn't deal with pacman's
> invalidating old certificates, which means you couldn't use it to update
> ca-certificates.
>
> It also can't handle when msys upstream changes core dependencies. One
> such update is a change in march that introduced a cyclic dependency
> between catgets libcatgets and some packages. Or when they change the
> package layout as they did removing the old shell scripts and making
> Mingw32.exe and Mingw64.exe. I can name many more. The fact is the msys2
> installers are set up to work around these updates, or you must work around
> them when initializing the environment to fix these.
>
> And I see no evidence based on past issues that stack actually keeps their
> msys2 installs up to date. So I don't want to go into the business of
> managing stack msys2 issues for ghc builds.
>
> > I'm just confused when it was decided to switch the defaults,
>>
>> > and why, without any consultation.
>>
>>
>>
>> I’m not sure what you mean. Could you clarify? The file `doc/windows.md`
>> is 3 years old and hasn’t changed much since creation. The default build
>> script `build.bat` currently uses Cabal:
>>
>>
>>
>> ```
>>
>> rem By default on Windows we build Hadrian using Cabal
>>
>> hadrian/build.cabal.bat %*
>>
>> ```
>>
>
> Yes.. I'm pretty sure when I looked at it before today it was pointing to
> build.stack.bat, but that seems to be a two week old tree. So my fault
> there.
>
> Sorry, should have checked on gitlab!
>
> Regards,
> Tamar
>
>
>>
>>
>> P.S.: I’ve just noticed that `doc/windows.md` hasn’t been updated when
>> moving to GitLab, and created this MR to fix this:
>>
>>
>>
>> https://gitlab.haskell.org/ghc/ghc/merge_requests/239
>>
>>
>>
>> Please jump into the comments there if you’d like me to fix/clarify
>> anything.
>>
>>
>>
>> Thanks for reaching out!
>>
>>
>>
>> Cheers,
>>
>> Andrey
>>
>>
>>
>> *From:* Phyx [mailto:loneti...@gmail.com]
>> *Sent:* 27 January 2019 21:11
>> *To:* Andrey Mokhov ; Ben Gamari <
>> b...@well-typed.com>
>> *Cc:* GHC developers 
>> *Subject:* Re: [ANNOUNCE] You should try Hadrian
>>
>>
>>
>> Hi Andrey,
>>
>>
>>
>> I'm looking at
>> https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md and
>> https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/windows.md
>>
>> wondering why the default instructions for Windows are using stack, this
>> isn't currently the case.
>>
>>
>>
>> In order for ./boot and configure to work already you need to be in an
>> msys2 environment. So having stack install its own, un-updated msys2 is not
>> a workflow I would recommend.
>>
>>
>>
>> There's a dubious claim there that using stack is "more robust", what is
>> this claim based on?
>>
>> I'm just confused when it was decided to switch the defaults, and why,
>> without any consultation.
>>
>>
>>
>> Regards,
>>
>> Tamar
>>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


hcs2hs failure

2019-01-29 Thread Simon Peyton Jones via ghc-devs
Is anyone else seeing this in a GHC build

utils/hsc2hs/HSCParser.hs:170:14: error: [-Wunused-matches, 
-Werror=unused-matches]

Defined but not used: 'd'

|

170 | '\'':d:'\'':_ -> do any3Chars_; text -- Case 2

|  ^
Indeed, d looks unused.  But this line of code has been there since 28 Dec, so 
I can't understand why it has not bitten before.
With -Werror my build fails.  I could switch to -Wwarn, but I think -Werror is 
the default.
Simon
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Thoughts on the Contributing page

2019-01-29 Thread Andreas Klebinger

On hadrian:

Documentation will eventually catch up as more people use hadrian but 
imo things that

need to be supported are:

- Some workflows:
  * make fast
  * ./validate
  * make EXTRA_HC_OPTS="..."
- On windows build.bat defaults to stack which I think has never worked 
on my box.
- It's still too easy to run into hadrian bugs imo, which will probably 
work itself out in a few months.


There are also a few quality of life issues like ctrl+c not canceling 
the build on windows.
Which I hope will be resolved at some point but not sure if these should 
be showstoppers.


ghc-devs-requ...@haskell.org schrieb:

One more thought I'd like to throw out in the open here:

The current Newcomers' Guide uses the current Makefile workflow, but
this is on a fast track to deprecation - but then, I doubt Hadrian has
seen enough exposure yet to use for a good beginner-friendly "Just
Works" guide. I'm leaning towards sticking with make for now, also
because existing material is already written this way; and then once
Hadrian is truly ready for prime time, we can rewrite the relevant
parts.

Thoughts?


___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Thoughts on the Contributing page

2019-01-29 Thread Tobias Dammers
On Sat, Jan 19, 2019 at 03:55:06PM -0500, Ben Gamari wrote:
> 
> 
> For those following along at home:
> 
>David has been looking at revising our contributor documentation.
>He has started consolidating a variety of relevant content on the
>Contributing page of the Wiki [1]. Below are my thoughts; feel free
>to chime in with your own.

One more thought I'd like to throw out in the open here:

The current Newcomers' Guide uses the current Makefile workflow, but
this is on a fast track to deprecation - but then, I doubt Hadrian has
seen enough exposure yet to use for a good beginner-friendly "Just
Works" guide. I'm leaning towards sticking with make for now, also
because existing material is already written this way; and then once
Hadrian is truly ready for prime time, we can rewrite the relevant
parts.

Thoughts?
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs