From nboldi at elte.hu Fri Dec 1 02:49:16 2017 From: nboldi at elte.hu (=?UTF-8?B?TsOpbWV0aCBCb2xkaXpzw6Fy?=) Date: Fri, 1 Dec 2017 11:49:16 +0900 Subject: GHC typecheck API In-Reply-To: References: Message-ID: Thank you for the suggestions! Setting the -fdefer-type-errors flag is indeed a good way to do it (with also adding Opt_DeferTypedHoles and Opt_DeferOutOfScopeVariables for other kind of errors). Boldizsár 2017.12.01. 4:12 keltezéssel, Christopher Done írta: > I suppose setting -fdefer-type-errors would also be handy in this > scenario! > > On Thu, 30 Nov 2017 at 15:37, Simon Peyton Jones via ghc-devs > > wrote: > > This sounds like a good project! > > For the most part things look good: > > * Most type checker errors arise from *type constraints*. The type > checkder tries to solve these, but returns an elaborated syntax > tree (i.e. typechecked, and annotated with types) even if > constraint solving fails. > > * Some renamer errors are like this, notably out-of-scope > variables.  (They just show up as another constraint.) > > However there is historical baggage.  Back in the beginning, most > errors were treated by throwing an exception in the typechecker > monad; such exceptions can be caught, so that we can get more than > one error from the file, but no syntax tree is returned.  Example >    let f = in > If there was an error in we'd throw an exception, > catch it at the 'let', give 'f' the type >    f :: forall a. a > and continue to typecheck . > > The trouble with the exception stuff is that you don't get an > elaborated syntax tree. > > So: I think you can get some of the way today, just by returning > the tree anyway even if there is an error to report.  But it'd > take a bit more work to make more and more errors into things that > don't throw an exception.  (Look for failTc, failRn in thd code.) > > I'm not very familiar with the GHC API for this part, but others > will be.  I'm certain it can be improved, so rather than hacking > around what is there already, do propose and implement improvements. > > Simon > >   | -----Original Message----- > | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org > ] On Behalf Of Németh > | Boldizsár > | Sent: 30 November 2017 05:42 > | To: ghc-devs at haskell.org > | Subject: GHC typecheck API > | > | Dear GHC developers, > | > | I'm developing a framework for development tools for Haskell. I > use the > | GHC API to parse and typecheck the source files. I recently > started to > | work on a quick-fix (automatic program correction) for Haskell > source > | code (correcting parenthesis problems, like 'putStrLn "xxx" ++ > show a' > | ==> 'putStrLn ("xxx" ++ show a)'). To do that I need to get the > typed > | syntax tree even if the program contains type or rename errors. > I could > | only do this by a nasty hack, adding a new TH module finalizer > | (tcg_th_modfinalizers) to extract the type checker's state before it > | fails. Is there a "correct" way to do this? I would not like this > | refactorings to be unusable if the GHC API changes. > | > | By the way, if you know of any similar attempt please let me know. > | > | Sincerely, > | Boldizsár Németh > | haskelltools.org > | > | _______________________________________________ > | ghc-devs mailing list > | ghc-devs at haskell.org > | > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.hask > | ell.org %2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- > | devs&data=02%7C01%7Csimonpj%40microsoft.com > %7C364b8db55e064415650d08d537b > | > 5323f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636476173738772433&sda > | ta=Kf5rZYwht8ZGBtGNNH6Q44wLIeefxzHn2UfDIdrNNMU%3D&reserved=0 > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisdone at gmail.com Fri Dec 1 12:00:41 2017 From: chrisdone at gmail.com (Christopher Done) Date: Fri, 1 Dec 2017 12:00:41 +0000 Subject: GHC typecheck API In-Reply-To: References: Message-ID: We're currently experimenting with this for Intero. There does seem to be a significant performance reduction with -fdefer-type-errors: https://github.com/commercialhaskell/intero/pull/495#issuecomment-348474127 It's a classic cost benefit scenario: the benefits are much more type info available, including go to definition and things like that being more immediately up to date. The cost is having to wait more time. I believe if there's a good compromise to this, it'll probably involve sometimes enabling -fdefer-type-errors and most of the time turning it off for immediate feedback. On 1 December 2017 at 02:49, Németh Boldizsár wrote: > Thank you for the suggestions! > > Setting the -fdefer-type-errors flag is indeed a good way to do it (with > also adding Opt_DeferTypedHoles and Opt_DeferOutOfScopeVariables for other > kind of errors). > > Boldizsár > > 2017.12.01. 4:12 keltezéssel, Christopher Done írta: > > I suppose setting -fdefer-type-errors would also be handy in this scenario! > > On Thu, 30 Nov 2017 at 15:37, Simon Peyton Jones via ghc-devs < > ghc-devs at haskell.org> wrote: > >> This sounds like a good project! >> >> For the most part things look good: >> >> * Most type checker errors arise from *type constraints*. The type >> checkder tries to solve these, but returns an elaborated syntax tree (i.e. >> typechecked, and annotated with types) even if constraint solving fails. >> >> * Some renamer errors are like this, notably out-of-scope variables. >> (They just show up as another constraint.) >> >> However there is historical baggage. Back in the beginning, most errors >> were treated by throwing an exception in the typechecker monad; such >> exceptions can be caught, so that we can get more than one error from the >> file, but no syntax tree is returned. Example >> let f = in >> If there was an error in we'd throw an exception, catch it >> at the 'let', give 'f' the type >> f :: forall a. a >> and continue to typecheck . >> >> The trouble with the exception stuff is that you don't get an elaborated >> syntax tree. >> >> So: I think you can get some of the way today, just by returning the tree >> anyway even if there is an error to report. But it'd take a bit more work >> to make more and more errors into things that don't throw an exception. >> (Look for failTc, failRn in thd code.) >> >> I'm not very familiar with the GHC API for this part, but others will >> be. I'm certain it can be improved, so rather than hacking around what is >> there already, do propose and implement improvements. >> >> Simon >> >> | -----Original Message----- >> | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of >> Németh >> | Boldizsár >> | Sent: 30 November 2017 05:42 >> | To: ghc-devs at haskell.org >> | Subject: GHC typecheck API >> | >> | Dear GHC developers, >> | >> | I'm developing a framework for development tools for Haskell. I use the >> | GHC API to parse and typecheck the source files. I recently started to >> | work on a quick-fix (automatic program correction) for Haskell source >> | code (correcting parenthesis problems, like 'putStrLn "xxx" ++ show a' >> | ==> 'putStrLn ("xxx" ++ show a)'). To do that I need to get the typed >> | syntax tree even if the program contains type or rename errors. I could >> | only do this by a nasty hack, adding a new TH module finalizer >> | (tcg_th_modfinalizers) to extract the type checker's state before it >> | fails. Is there a "correct" way to do this? I would not like this >> | refactorings to be unusable if the GHC API changes. >> | >> | By the way, if you know of any similar attempt please let me know. >> | >> | Sincerely, >> | Boldizsár Németh >> | haskelltools.org >> | >> | _______________________________________________ >> | ghc-devs mailing list >> | ghc-devs at haskell.org >> | https://na01.safelinks.protection.outlook.com/?url= >> http%3A%2F%2Fmail.hask >> | ell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- >> | devs&data=02%7C01%7Csimonpj%40microsoft.com% >> 7C364b8db55e064415650d08d537b >> | 5323f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0% >> 7C636476173738772433&sda >> | ta=Kf5rZYwht8ZGBtGNNH6Q44wLIeefxzHn2UfDIdrNNMU%3D&reserved=0 >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri Dec 1 12:03:30 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 1 Dec 2017 12:03:30 +0000 Subject: GHC typecheck API In-Reply-To: References: Message-ID: There does seem to be a significant performance reduction with -fdefer-type-errors: https://github.com/commercialhaskell/intero/pull/495#issuecomment-348474127 That’s odd. I would expect zero effect if there aren’t any errors, and not much even if ther are. It’s not clear whether the report is to do with compile time or runtime. If you can boil down a test case, maybe a ticket would be good From: Christopher Done [mailto:chrisdone at gmail.com] Sent: 01 December 2017 12:01 To: Németh Boldizsár Cc: Simon Peyton Jones ; ghc-devs at haskell.org Subject: Re: GHC typecheck API We're currently experimenting with this for Intero. There does seem to be a significant performance reduction with -fdefer-type-errors: https://github.com/commercialhaskell/intero/pull/495#issuecomment-348474127 It's a classic cost benefit scenario: the benefits are much more type info available, including go to definition and things like that being more immediately up to date. The cost is having to wait more time. I believe if there's a good compromise to this, it'll probably involve sometimes enabling -fdefer-type-errors and most of the time turning it off for immediate feedback. On 1 December 2017 at 02:49, Németh Boldizsár > wrote: Thank you for the suggestions! Setting the -fdefer-type-errors flag is indeed a good way to do it (with also adding Opt_DeferTypedHoles and Opt_DeferOutOfScopeVariables for other kind of errors). Boldizsár 2017.12.01. 4:12 keltezéssel, Christopher Done írta: I suppose setting -fdefer-type-errors would also be handy in this scenario! On Thu, 30 Nov 2017 at 15:37, Simon Peyton Jones via ghc-devs > wrote: This sounds like a good project! For the most part things look good: * Most type checker errors arise from *type constraints*. The type checkder tries to solve these, but returns an elaborated syntax tree (i.e. typechecked, and annotated with types) even if constraint solving fails. * Some renamer errors are like this, notably out-of-scope variables. (They just show up as another constraint.) However there is historical baggage. Back in the beginning, most errors were treated by throwing an exception in the typechecker monad; such exceptions can be caught, so that we can get more than one error from the file, but no syntax tree is returned. Example let f = in If there was an error in we'd throw an exception, catch it at the 'let', give 'f' the type f :: forall a. a and continue to typecheck . The trouble with the exception stuff is that you don't get an elaborated syntax tree. So: I think you can get some of the way today, just by returning the tree anyway even if there is an error to report. But it'd take a bit more work to make more and more errors into things that don't throw an exception. (Look for failTc, failRn in thd code.) I'm not very familiar with the GHC API for this part, but others will be. I'm certain it can be improved, so rather than hacking around what is there already, do propose and implement improvements. Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Németh | Boldizsár | Sent: 30 November 2017 05:42 | To: ghc-devs at haskell.org | Subject: GHC typecheck API | | Dear GHC developers, | | I'm developing a framework for development tools for Haskell. I use the | GHC API to parse and typecheck the source files. I recently started to | work on a quick-fix (automatic program correction) for Haskell source | code (correcting parenthesis problems, like 'putStrLn "xxx" ++ show a' | ==> 'putStrLn ("xxx" ++ show a)'). To do that I need to get the typed | syntax tree even if the program contains type or rename errors. I could | only do this by a nasty hack, adding a new TH module finalizer | (tcg_th_modfinalizers) to extract the type checker's state before it | fails. Is there a "correct" way to do this? I would not like this | refactorings to be unusable if the GHC API changes. | | By the way, if you know of any similar attempt please let me know. | | Sincerely, | Boldizsár Németh | haskelltools.org | | _______________________________________________ | ghc-devs mailing list | ghc-devs at haskell.org | https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.hask | ell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- | devs&data=02%7C01%7Csimonpj%40microsoft.com%7C364b8db55e064415650d08d537b | 5323f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636476173738772433&sda | ta=Kf5rZYwht8ZGBtGNNH6Q44wLIeefxzHn2UfDIdrNNMU%3D&reserved=0 _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisdone at gmail.com Fri Dec 1 12:10:32 2017 From: chrisdone at gmail.com (Christopher Done) Date: Fri, 1 Dec 2017 12:10:32 +0000 Subject: GHC typecheck API In-Reply-To: References: Message-ID: The report is timing how long a `:load` takes. Sure, if/when I reproduce this on some open source module I'll make a ticket with a test case! On 1 December 2017 at 12:03, Simon Peyton Jones wrote: > There does seem to be a significant performance reduction with > -fdefer-type-errors: > > https://github.com/commercialhaskell/intero/pull/ > 495#issuecomment-348474127 > > > > > That’s odd. I would expect zero effect if there aren’t any errors, and not > much even if ther are. It’s not clear whether the report is to do with > compile time or runtime. > > > > If you can boil down a test case, maybe a ticket would be good > > > > *From:* Christopher Done [mailto:chrisdone at gmail.com] > *Sent:* 01 December 2017 12:01 > *To:* Németh Boldizsár > *Cc:* Simon Peyton Jones ; ghc-devs at haskell.org > *Subject:* Re: GHC typecheck API > > > > We're currently experimenting with this for Intero. There does seem to be > a significant performance reduction with -fdefer-type-errors: > > > > https://github.com/commercialhaskell/intero/pull/ > 495#issuecomment-348474127 > > > > > It's a classic cost benefit scenario: the benefits are much more type info > available, including go to definition and things like that being more > immediately up to date. The cost is having to wait more time. > > > > I believe if there's a good compromise to this, it'll probably involve > sometimes enabling -fdefer-type-errors and most of the time turning it off > for immediate feedback. > > > > > > > > On 1 December 2017 at 02:49, Németh Boldizsár wrote: > > Thank you for the suggestions! > > Setting the -fdefer-type-errors flag is indeed a good way to do it (with > also adding Opt_DeferTypedHoles and Opt_DeferOutOfScopeVariables for other > kind of errors). > > Boldizsár > > > > 2017.12.01. 4:12 keltezéssel, Christopher Done írta: > > I suppose setting -fdefer-type-errors would also be handy in this scenario! > > > > On Thu, 30 Nov 2017 at 15:37, Simon Peyton Jones via ghc-devs < > ghc-devs at haskell.org> wrote: > > This sounds like a good project! > > For the most part things look good: > > * Most type checker errors arise from *type constraints*. The type > checkder tries to solve these, but returns an elaborated syntax tree (i.e. > typechecked, and annotated with types) even if constraint solving fails. > > * Some renamer errors are like this, notably out-of-scope variables. > (They just show up as another constraint.) > > However there is historical baggage. Back in the beginning, most errors > were treated by throwing an exception in the typechecker monad; such > exceptions can be caught, so that we can get more than one error from the > file, but no syntax tree is returned. Example > let f = in > If there was an error in we'd throw an exception, catch it at > the 'let', give 'f' the type > f :: forall a. a > and continue to typecheck . > > The trouble with the exception stuff is that you don't get an elaborated > syntax tree. > > So: I think you can get some of the way today, just by returning the tree > anyway even if there is an error to report. But it'd take a bit more work > to make more and more errors into things that don't throw an exception. > (Look for failTc, failRn in thd code.) > > I'm not very familiar with the GHC API for this part, but others will be. > I'm certain it can be improved, so rather than hacking around what is there > already, do propose and implement improvements. > > Simon > > | -----Original Message----- > | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Németh > | Boldizsár > | Sent: 30 November 2017 05:42 > | To: ghc-devs at haskell.org > | Subject: GHC typecheck API > | > | Dear GHC developers, > | > | I'm developing a framework for development tools for Haskell. I use the > | GHC API to parse and typecheck the source files. I recently started to > | work on a quick-fix (automatic program correction) for Haskell source > | code (correcting parenthesis problems, like 'putStrLn "xxx" ++ show a' > | ==> 'putStrLn ("xxx" ++ show a)'). To do that I need to get the typed > | syntax tree even if the program contains type or rename errors. I could > | only do this by a nasty hack, adding a new TH module finalizer > | (tcg_th_modfinalizers) to extract the type checker's state before it > | fails. Is there a "correct" way to do this? I would not like this > | refactorings to be unusable if the GHC API changes. > | > | By the way, if you know of any similar attempt please let me know. > | > | Sincerely, > | Boldizsár Németh > | haskelltools.org > > | > | _______________________________________________ > | ghc-devs mailing list > | ghc-devs at haskell.org > | https://na01.safelinks.protection.outlook.com/?url= > http%3A%2F%2Fmail.hask > | ell.org > > %2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- > | devs&data=02%7C01%7Csimonpj%40microsoft.com > > %7C364b8db55e064415650d08d537b > | 5323f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0% > 7C636476173738772433&sda > | ta=Kf5rZYwht8ZGBtGNNH6Q44wLIeefxzHn2UfDIdrNNMU%3D&reserved=0 > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From saurabhnanda at gmail.com Sat Dec 2 15:59:17 2017 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Sat, 2 Dec 2017 21:29:17 +0530 Subject: How to load & parse an HI (interface) file? Message-ID: (GHC newbie alert -- is this the right mailing list for these kind of questions?) I"m writing some code to figure out all the instances of particular type-classes and after exploring a lot of options (hlint, haskell-src-exts, annotations, doctests, etc), I realized that the compiler had already figured it out and written it to disk for me! More digging led me to https://www.stackage.org/haddock/lts-9.0/ghc-8.0.2/LoadIface.html#v:loadSrcInterface after which I got stuck. How does one call this function? Specifically: * What is SDoc and how to construct a reasonable value for this argument? * IsBootInterface would mostly be False, right? * What does `Maybe FastString` represent and how does one construct it? * Finally how does one evaluate the resulting monadic action to get access to the underlying `ModIface`? -- Saurabh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From harendra.kumar at gmail.com Sat Dec 2 20:20:44 2017 From: harendra.kumar at gmail.com (Harendra Kumar) Date: Sun, 3 Dec 2017 01:50:44 +0530 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: GHC has a "--show-iface" option which pretty prints the ".hi" file. Not sure if it works for your use-case but it may be easier to parse the text displayed by this option. -harendra On 2 December 2017 at 21:29, Saurabh Nanda wrote: > (GHC newbie alert -- is this the right mailing list for these kind of > questions?) > > I"m writing some code to figure out all the instances of particular > type-classes and after exploring a lot of options (hlint, haskell-src-exts, > annotations, doctests, etc), I realized that the compiler had already > figured it out and written it to disk for me! > > More digging led me to https://www.stackage.org/haddock/lts-9.0/ghc-8.0.2/ > LoadIface.html#v:loadSrcInterface after which I got stuck. How does one > call this function? Specifically: > > * What is SDoc and how to construct a reasonable value for this argument? > * IsBootInterface would mostly be False, right? > * What does `Maybe FastString` represent and how does one construct it? > * Finally how does one evaluate the resulting monadic action to get access > to the underlying `ModIface`? > > -- Saurabh. > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From harendra.kumar at gmail.com Sat Dec 2 20:24:03 2017 From: harendra.kumar at gmail.com (Harendra Kumar) Date: Sun, 3 Dec 2017 01:54:03 +0530 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: Also, "-ddump-hi" dumps the same information at compile time. -harendra On 3 December 2017 at 01:50, Harendra Kumar wrote: > GHC has a "--show-iface" option which pretty prints the ".hi" file. Not > sure if it works for your use-case but it may be easier to parse the text > displayed by this option. > > -harendra > > On 2 December 2017 at 21:29, Saurabh Nanda wrote: > >> (GHC newbie alert -- is this the right mailing list for these kind of >> questions?) >> >> I"m writing some code to figure out all the instances of particular >> type-classes and after exploring a lot of options (hlint, haskell-src-exts, >> annotations, doctests, etc), I realized that the compiler had already >> figured it out and written it to disk for me! >> >> More digging led me to https://www.stackage.org/haddo >> ck/lts-9.0/ghc-8.0.2/LoadIface.html#v:loadSrcInterface after which I got >> stuck. How does one call this function? Specifically: >> >> * What is SDoc and how to construct a reasonable value for this argument? >> * IsBootInterface would mostly be False, right? >> * What does `Maybe FastString` represent and how does one construct it? >> * Finally how does one evaluate the resulting monadic action to get >> access to the underlying `ModIface`? >> >> -- Saurabh. >> >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Sat Dec 2 20:34:27 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Sat, 2 Dec 2017 15:34:27 -0500 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: I would be cautious about using the ghc-api hi file interfaces; hi files turn out to interact with a lot of low-level parts in complex ways (even to the extent that they're a large part of why ghc can't parallelize builds itself and attempts to change that have mostly failed). But if you must do this, you *really* want to have https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler ready to hand --- and go through it first so you have some idea of how it works; much of it is links to the lower level details (often straight into the source). On Sat, Dec 2, 2017 at 10:59 AM, Saurabh Nanda wrote: > (GHC newbie alert -- is this the right mailing list for these kind of > questions?) > > I"m writing some code to figure out all the instances of particular > type-classes and after exploring a lot of options (hlint, haskell-src-exts, > annotations, doctests, etc), I realized that the compiler had already > figured it out and written it to disk for me! > > More digging led me to https://www.stackage.org/haddock/lts-9.0/ghc-8.0.2/ > LoadIface.html#v:loadSrcInterface after which I got stuck. How does one > call this function? Specifically: > > * What is SDoc and how to construct a reasonable value for this argument? > * IsBootInterface would mostly be False, right? > * What does `Maybe FastString` represent and how does one construct it? > * Finally how does one evaluate the resulting monadic action to get access > to the underlying `ModIface`? > > -- Saurabh. > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From saurabhnanda at gmail.com Sun Dec 3 02:03:56 2017 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Sun, 3 Dec 2017 07:33:56 +0530 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: GHC has a "--show-iface" option which pretty prints the ".hi" file. Not > sure if it works for your use-case but it may be easier to parse the text > displayed by this option. > >From https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/IfaceFiles -- > This textual format is not particularly designed for machine parsing. Doing so might be possible, but if you > want to read GHC interface files you are almost certainly better off using the GHC API to do so. That's the reason why I started investigating the GHC API. -- Saurabh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From saurabhnanda at gmail.com Sun Dec 3 02:11:43 2017 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Sun, 3 Dec 2017 07:41:43 +0530 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: > I would be cautious about using the ghc-api hi file interfaces; hi files turn out to interact with a > lot of low-level parts in complex ways (even to the extent that they're a large part of why ghc > can't parallelize builds itself and attempts to change that have mostly failed). Are you cautioning against using the GHC API (as opposed to the --show-iface command line interface) or using HI files themselves? -- Saurabh. On Sun, Dec 3, 2017 at 2:04 AM, Brandon Allbery wrote: > I would be cautious about using the ghc-api hi file interfaces; hi files > turn out to interact with a lot of low-level parts in complex ways (even to > the extent that they're a large part of why ghc can't parallelize builds > itself and attempts to change that have mostly failed). > > But if you must do this, you *really* want to have > https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler ready to hand > --- and go through it first so you have some idea of how it works; much of > it is links to the lower level details (often straight into the source). > > On Sat, Dec 2, 2017 at 10:59 AM, Saurabh Nanda > wrote: > >> (GHC newbie alert -- is this the right mailing list for these kind of >> questions?) >> >> I"m writing some code to figure out all the instances of particular >> type-classes and after exploring a lot of options (hlint, haskell-src-exts, >> annotations, doctests, etc), I realized that the compiler had already >> figured it out and written it to disk for me! >> >> More digging led me to https://www.stackage.org/haddo >> ck/lts-9.0/ghc-8.0.2/LoadIface.html#v:loadSrcInterface after which I got >> stuck. How does one call this function? Specifically: >> >> * What is SDoc and how to construct a reasonable value for this argument? >> * IsBootInterface would mostly be False, right? >> * What does `Maybe FastString` represent and how does one construct it? >> * Finally how does one evaluate the resulting monadic action to get >> access to the underlying `ModIface`? >> >> -- Saurabh. >> >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> >> > > > -- > brandon s allbery kf8nh sine nomine > associates > allbery.b at gmail.com > ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad > http://sinenomine.net > -- http://www.saurabhnanda.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From saurabhnanda at gmail.com Sun Dec 3 02:37:25 2017 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Sun, 3 Dec 2017 08:07:25 +0530 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: I _think_ I've found what I need from https://github.com/ghc/ghc/blob/8843a39b3c941b1908a8d839f52bc323f3b45081/compiler/iface/LoadIface.hs#L994-L1002 On Sun, Dec 3, 2017 at 7:41 AM, Saurabh Nanda wrote: > > I would be cautious about using the ghc-api hi file interfaces; hi files > turn out to interact with a > > lot of low-level parts in complex ways (even to the extent that they're > a large part of why ghc > > can't parallelize builds itself and attempts to change that have mostly > failed). > > Are you cautioning against using the GHC API (as opposed to the > --show-iface command line interface) > or using HI files themselves? > > -- Saurabh. > > > On Sun, Dec 3, 2017 at 2:04 AM, Brandon Allbery > wrote: > >> I would be cautious about using the ghc-api hi file interfaces; hi files >> turn out to interact with a lot of low-level parts in complex ways (even to >> the extent that they're a large part of why ghc can't parallelize builds >> itself and attempts to change that have mostly failed). >> >> But if you must do this, you *really* want to have >> https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler ready to hand >> --- and go through it first so you have some idea of how it works; much of >> it is links to the lower level details (often straight into the source). >> >> On Sat, Dec 2, 2017 at 10:59 AM, Saurabh Nanda >> wrote: >> >>> (GHC newbie alert -- is this the right mailing list for these kind of >>> questions?) >>> >>> I"m writing some code to figure out all the instances of particular >>> type-classes and after exploring a lot of options (hlint, haskell-src-exts, >>> annotations, doctests, etc), I realized that the compiler had already >>> figured it out and written it to disk for me! >>> >>> More digging led me to https://www.stackage.org/haddo >>> ck/lts-9.0/ghc-8.0.2/LoadIface.html#v:loadSrcInterface after which I >>> got stuck. How does one call this function? Specifically: >>> >>> * What is SDoc and how to construct a reasonable value for this argument? >>> * IsBootInterface would mostly be False, right? >>> * What does `Maybe FastString` represent and how does one construct it? >>> * Finally how does one evaluate the resulting monadic action to get >>> access to the underlying `ModIface`? >>> >>> -- Saurabh. >>> >>> >>> _______________________________________________ >>> ghc-devs mailing list >>> ghc-devs at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >>> >>> >> >> >> -- >> brandon s allbery kf8nh sine nomine >> associates >> allbery.b at gmail.com >> ballbery at sinenomine.net >> unix, openafs, kerberos, infrastructure, xmonad >> http://sinenomine.net >> > > > > -- > http://www.saurabhnanda.com > -- http://www.saurabhnanda.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Sun Dec 3 02:43:29 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Sat, 2 Dec 2017 21:43:29 -0500 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: The problem with the API is it's complex and can break between ghc versions. But --show-iface is even more fragile and prone to break between ghc versions. The history of the plugins package constitutes a record of both kinds of pain. On Sat, Dec 2, 2017 at 9:11 PM, Saurabh Nanda wrote: > > I would be cautious about using the ghc-api hi file interfaces; hi files > turn out to interact with a > > lot of low-level parts in complex ways (even to the extent that they're > a large part of why ghc > > can't parallelize builds itself and attempts to change that have mostly > failed). > > Are you cautioning against using the GHC API (as opposed to the > --show-iface command line interface) > or using HI files themselves? > > -- Saurabh. > > > On Sun, Dec 3, 2017 at 2:04 AM, Brandon Allbery > wrote: > >> I would be cautious about using the ghc-api hi file interfaces; hi files >> turn out to interact with a lot of low-level parts in complex ways (even to >> the extent that they're a large part of why ghc can't parallelize builds >> itself and attempts to change that have mostly failed). >> >> But if you must do this, you *really* want to have >> https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler ready to hand >> --- and go through it first so you have some idea of how it works; much of >> it is links to the lower level details (often straight into the source). >> >> On Sat, Dec 2, 2017 at 10:59 AM, Saurabh Nanda >> wrote: >> >>> (GHC newbie alert -- is this the right mailing list for these kind of >>> questions?) >>> >>> I"m writing some code to figure out all the instances of particular >>> type-classes and after exploring a lot of options (hlint, haskell-src-exts, >>> annotations, doctests, etc), I realized that the compiler had already >>> figured it out and written it to disk for me! >>> >>> More digging led me to https://www.stackage.org/haddo >>> ck/lts-9.0/ghc-8.0.2/LoadIface.html#v:loadSrcInterface after which I >>> got stuck. How does one call this function? Specifically: >>> >>> * What is SDoc and how to construct a reasonable value for this argument? >>> * IsBootInterface would mostly be False, right? >>> * What does `Maybe FastString` represent and how does one construct it? >>> * Finally how does one evaluate the resulting monadic action to get >>> access to the underlying `ModIface`? >>> >>> -- Saurabh. >>> >>> >>> _______________________________________________ >>> ghc-devs mailing list >>> ghc-devs at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >>> >>> >> >> >> -- >> brandon s allbery kf8nh sine nomine >> associates >> allbery.b at gmail.com >> ballbery at sinenomine.net >> unix, openafs, kerberos, infrastructure, xmonad >> http://sinenomine.net >> > > > > -- > http://www.saurabhnanda.com > -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgraf1337 at gmail.com Sun Dec 3 14:27:33 2017 From: sgraf1337 at gmail.com (Sebastian Graf) Date: Sun, 3 Dec 2017 15:27:33 +0100 Subject: How to load & parse an HI (interface) file? In-Reply-To: References: Message-ID: Hey, there's this relatively recent thread on finding instances of a type class: https://mail.haskell.org/pipermail/ghc-devs/2017-May/014217.html I'm sorry, but I couldn't find a better archive for ghc-devs. Enjoy Sebastian On Sun, Dec 3, 2017 at 3:43 AM, Brandon Allbery wrote: > The problem with the API is it's complex and can break between ghc > versions. > But --show-iface is even more fragile and prone to break between ghc > versions. > The history of the plugins package constitutes a record of both kinds of > pain. > > On Sat, Dec 2, 2017 at 9:11 PM, Saurabh Nanda > wrote: > >> > I would be cautious about using the ghc-api hi file interfaces; hi >> files turn out to interact with a >> > lot of low-level parts in complex ways (even to the extent that they're >> a large part of why ghc >> > can't parallelize builds itself and attempts to change that have mostly >> failed). >> >> Are you cautioning against using the GHC API (as opposed to the >> --show-iface command line interface) >> or using HI files themselves? >> >> -- Saurabh. >> >> >> On Sun, Dec 3, 2017 at 2:04 AM, Brandon Allbery >> wrote: >> >>> I would be cautious about using the ghc-api hi file interfaces; hi files >>> turn out to interact with a lot of low-level parts in complex ways (even to >>> the extent that they're a large part of why ghc can't parallelize builds >>> itself and attempts to change that have mostly failed). >>> >>> But if you must do this, you *really* want to have >>> https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler ready to hand >>> --- and go through it first so you have some idea of how it works; much of >>> it is links to the lower level details (often straight into the source). >>> >>> On Sat, Dec 2, 2017 at 10:59 AM, Saurabh Nanda >>> wrote: >>> >>>> (GHC newbie alert -- is this the right mailing list for these kind of >>>> questions?) >>>> >>>> I"m writing some code to figure out all the instances of particular >>>> type-classes and after exploring a lot of options (hlint, haskell-src-exts, >>>> annotations, doctests, etc), I realized that the compiler had already >>>> figured it out and written it to disk for me! >>>> >>>> More digging led me to https://www.stackage.org/haddo >>>> ck/lts-9.0/ghc-8.0.2/LoadIface.html#v:loadSrcInterface after which I >>>> got stuck. How does one call this function? Specifically: >>>> >>>> * What is SDoc and how to construct a reasonable value for this >>>> argument? >>>> * IsBootInterface would mostly be False, right? >>>> * What does `Maybe FastString` represent and how does one construct it? >>>> * Finally how does one evaluate the resulting monadic action to get >>>> access to the underlying `ModIface`? >>>> >>>> -- Saurabh. >>>> >>>> >>>> _______________________________________________ >>>> ghc-devs mailing list >>>> ghc-devs at haskell.org >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >>>> >>>> >>> >>> >>> -- >>> brandon s allbery kf8nh sine nomine >>> associates >>> allbery.b at gmail.com >>> ballbery at sinenomine.net >>> unix, openafs, kerberos, infrastructure, xmonad >>> http://sinenomine.net >>> >> >> >> >> -- >> http://www.saurabhnanda.com >> > > > > -- > brandon s allbery kf8nh sine nomine > associates > allbery.b at gmail.com > ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad > http://sinenomine.net > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cheater00 at gmail.com Tue Dec 5 17:36:50 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Tue, 5 Dec 2017 18:36:50 +0100 Subject: Long standing annoying issue in ghci Message-ID: Hi guys, this one seems to have gotten buried under more important things, but maybe someone would like to take a look at it none the less? I've been encountering it literally every day for the last 4 years. I sometimes find it difficult to find read the past commands without color coding the prompt so I can't really turn it off. It seems like a simple arithmetic issue somewhere in the readline implementation. https://ghc.haskell.org/trac/ghc/ticket/9364 Thanks a lot. From allbery.b at gmail.com Tue Dec 5 20:57:23 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Tue, 5 Dec 2017 15:57:23 -0500 Subject: Long standing annoying issue in ghci In-Reply-To: References: Message-ID: On Tue, Dec 5, 2017 at 12:36 PM, cheater00 cheater00 wrote: > without color coding the prompt so I can't really turn it off. It > seems like a simple arithmetic issue somewhere in the readline > implementation. > It's not arithmetic except in the sense that it's not doing *any* math. Color codes in a terminal are necessarily implemented as character sequences (this is pretty much the definition of a terminal interface), and haskeline makes no effort to recognize them, so it treats them the same as displayed character sequences and skips over them as if they were displayed characters. GNU readline handles this by recognizing the character mode sequences as not taking up character positions (this is more complex than you think given that GNU readline doesn't assume all terminals obey the ANSI standard; as it turns out, neither does haskeline, so it actually gets a bit nasty), and recognizing the special behavior of carriage return, and providing \[ \] escapes to declare the sequence inside as "invisible" to to character positioning (and it's on the person crafting the prompt to insure that it actually is). Beyond that, it'd actually have to implement a 'terminal emulator' internally to get it right in all cases --- and i'd be on the user to ensure their declared terminal type matches the actual one well enough for the 'terminal emulator' to reflect the terminal's actual behavior, so it'd be a potential source of even weirder behavior. So, (a) haskeline issue, not strictly ghc/ghci, and (b) not really fixable, but partially work-around-able for common cases. -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From qdunkan at gmail.com Tue Dec 5 21:49:22 2017 From: qdunkan at gmail.com (Evan Laforge) Date: Tue, 5 Dec 2017 13:49:22 -0800 Subject: Long standing annoying issue in ghci In-Reply-To: References: Message-ID: Here's what I use: :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " I believe \STX is a signal to haskeline for control sequences. Documentation is here: https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt On Tue, Dec 5, 2017 at 12:57 PM, Brandon Allbery wrote: > On Tue, Dec 5, 2017 at 12:36 PM, cheater00 cheater00 > wrote: >> >> without color coding the prompt so I can't really turn it off. It >> seems like a simple arithmetic issue somewhere in the readline >> implementation. > > > It's not arithmetic except in the sense that it's not doing *any* math. > Color codes in a terminal are necessarily implemented as character sequences > (this is pretty much the definition of a terminal interface), and haskeline > makes no effort to recognize them, so it treats them the same as displayed > character sequences and skips over them as if they were displayed > characters. > > GNU readline handles this by recognizing the character mode sequences as not > taking up character positions (this is more complex than you think given > that GNU readline doesn't assume all terminals obey the ANSI standard; as it > turns out, neither does haskeline, so it actually gets a bit nasty), and > recognizing the special behavior of carriage return, and providing \[ \] > escapes to declare the sequence inside as "invisible" to to character > positioning (and it's on the person crafting the prompt to insure that it > actually is). Beyond that, it'd actually have to implement a 'terminal > emulator' internally to get it right in all cases --- and i'd be on the user > to ensure their declared terminal type matches the actual one well enough > for the 'terminal emulator' to reflect the terminal's actual behavior, so > it'd be a potential source of even weirder behavior. > > So, (a) haskeline issue, not strictly ghc/ghci, and (b) not really fixable, > but partially work-around-able for common cases. > > -- > brandon s allbery kf8nh sine nomine associates > allbery.b at gmail.com ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > From cheater00 at gmail.com Tue Dec 5 21:57:56 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Tue, 05 Dec 2017 21:57:56 +0000 Subject: Long standing annoying issue in ghci In-Reply-To: References: Message-ID: Thanks Evan, the \STX thing fixed my issue. Much happier now. I'll update the bug and set it to won't fix. On Tue, 5 Dec 2017 22:49 Evan Laforge, wrote: > Here's what I use: > > :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " > > I believe \STX is a signal to haskeline for control sequences. > Documentation is here: > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt > > On Tue, Dec 5, 2017 at 12:57 PM, Brandon Allbery > wrote: > > On Tue, Dec 5, 2017 at 12:36 PM, cheater00 cheater00 < > cheater00 at gmail.com> > > wrote: > >> > >> without color coding the prompt so I can't really turn it off. It > >> seems like a simple arithmetic issue somewhere in the readline > >> implementation. > > > > > > It's not arithmetic except in the sense that it's not doing *any* math. > > Color codes in a terminal are necessarily implemented as character > sequences > > (this is pretty much the definition of a terminal interface), and > haskeline > > makes no effort to recognize them, so it treats them the same as > displayed > > character sequences and skips over them as if they were displayed > > characters. > > > > GNU readline handles this by recognizing the character mode sequences as > not > > taking up character positions (this is more complex than you think given > > that GNU readline doesn't assume all terminals obey the ANSI standard; > as it > > turns out, neither does haskeline, so it actually gets a bit nasty), and > > recognizing the special behavior of carriage return, and providing \[ \] > > escapes to declare the sequence inside as "invisible" to to character > > positioning (and it's on the person crafting the prompt to insure that it > > actually is). Beyond that, it'd actually have to implement a 'terminal > > emulator' internally to get it right in all cases --- and i'd be on the > user > > to ensure their declared terminal type matches the actual one well enough > > for the 'terminal emulator' to reflect the terminal's actual behavior, so > > it'd be a potential source of even weirder behavior. > > > > So, (a) haskeline issue, not strictly ghc/ghci, and (b) not really > fixable, > > but partially work-around-able for common cases. > > > > -- > > brandon s allbery kf8nh sine nomine > associates > > allbery.b at gmail.com > ballbery at sinenomine.net > > unix, openafs, kerberos, infrastructure, xmonad > http://sinenomine.net > > > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Tue Dec 5 21:59:06 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Tue, 5 Dec 2017 16:59:06 -0500 Subject: Long standing annoying issue in ghci In-Reply-To: References: Message-ID: On Tue, Dec 5, 2017 at 4:49 PM, Evan Laforge wrote: > I believe \STX is a signal to haskeline for control sequences. > Documentation is here: > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt Huh, so they did add support for that. With a version constraint, so this will depend also on haskeline version (and therefore ghc version, and what works in newer ghci will therefore not work in older ones). -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at well-typed.com Tue Dec 5 22:13:21 2017 From: david at well-typed.com (David Feuer) Date: Tue, 05 Dec 2017 17:13:21 -0500 Subject: Long standing annoying issue in ghci Message-ID: <20171205214243.85EBFBC90E@haskell.org> It sounds like this should be added to the GHCi documentation, even if it's not strictly about GHCi. David FeuerWell-Typed, LLP -------- Original message --------From: Evan Laforge Date: 12/5/17 4:49 PM (GMT-05:00) To: Brandon Allbery Cc: ghc-devs at haskell.org Subject: Re: Long standing annoying issue in ghci Here's what I use: :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " I believe \STX is a signal to haskeline for control sequences. Documentation is here: https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt On Tue, Dec 5, 2017 at 12:57 PM, Brandon Allbery wrote: > On Tue, Dec 5, 2017 at 12:36 PM, cheater00 cheater00 > wrote: >> >> without color coding the prompt so I can't really turn it off. It >> seems like a simple arithmetic issue somewhere in the readline >> implementation. > > > It's not arithmetic except in the sense that it's not doing *any* math. > Color codes in a terminal are necessarily implemented as character sequences > (this is pretty much the definition of a terminal interface), and haskeline > makes no effort to recognize them, so it treats them the same as displayed > character sequences and skips over them as if they were displayed > characters. > > GNU readline handles this by recognizing the character mode sequences as not > taking up character positions (this is more complex than you think given > that GNU readline doesn't assume all terminals obey the ANSI standard; as it > turns out, neither does haskeline, so it actually gets a bit nasty), and > recognizing the special behavior of carriage return, and providing \[ \] > escapes to declare the sequence inside as "invisible" to to character > positioning (and it's on the person crafting the prompt to insure that it > actually is). Beyond that, it'd actually have to implement a 'terminal > emulator' internally to get it right in all cases --- and i'd be on the user > to ensure their declared terminal type matches the actual one well enough > for the 'terminal emulator' to reflect the terminal's actual behavior, so > it'd be a potential source of even weirder behavior. > > So, (a) haskeline issue, not strictly ghc/ghci, and (b) not really fixable, > but partially work-around-able for common cases. > > -- > brandon s allbery kf8nh                               sine nomine associates > allbery.b at gmail.com                                  ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Tue Dec 5 22:16:37 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Tue, 5 Dec 2017 17:16:37 -0500 Subject: Long standing annoying issue in ghci In-Reply-To: <5a271a07.b29adf0a.8175a.6438SMTPIN_ADDED_MISSING@mx.google.com> References: <5a271a07.b29adf0a.8175a.6438SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: It's indirectly already there: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#the-ghci-and-haskeline-files Possibly an additional pointer needs to be in the FAQ/things to watch out for section. On Tue, Dec 5, 2017 at 5:13 PM, David Feuer wrote: > It sounds like this should be added to the GHCi documentation, even if > it's not strictly about GHCi. > > > > David Feuer > Well-Typed, LLP > > -------- Original message -------- > From: Evan Laforge > Date: 12/5/17 4:49 PM (GMT-05:00) > To: Brandon Allbery > Cc: ghc-devs at haskell.org > Subject: Re: Long standing annoying issue in ghci > > Here's what I use: > > :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " > > I believe \STX is a signal to haskeline for control sequences. > Documentation is here: > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt > > On Tue, Dec 5, 2017 at 12:57 PM, Brandon Allbery > wrote: > > On Tue, Dec 5, 2017 at 12:36 PM, cheater00 cheater00 < > cheater00 at gmail.com> > > wrote: > >> > >> without color coding the prompt so I can't really turn it off. It > >> seems like a simple arithmetic issue somewhere in the readline > >> implementation. > > > > > > It's not arithmetic except in the sense that it's not doing *any* math. > > Color codes in a terminal are necessarily implemented as character > sequences > > (this is pretty much the definition of a terminal interface), and > haskeline > > makes no effort to recognize them, so it treats them the same as > displayed > > character sequences and skips over them as if they were displayed > > characters. > > > > GNU readline handles this by recognizing the character mode sequences as > not > > taking up character positions (this is more complex than you think given > > that GNU readline doesn't assume all terminals obey the ANSI standard; > as it > > turns out, neither does haskeline, so it actually gets a bit nasty), and > > recognizing the special behavior of carriage return, and providing \[ \] > > escapes to declare the sequence inside as "invisible" to to character > > positioning (and it's on the person crafting the prompt to insure that it > > actually is). Beyond that, it'd actually have to implement a 'terminal > > emulator' internally to get it right in all cases --- and i'd be on the > user > > to ensure their declared terminal type matches the actual one well enough > > for the 'terminal emulator' to reflect the terminal's actual behavior, so > > it'd be a potential source of even weirder behavior. > > > > So, (a) haskeline issue, not strictly ghc/ghci, and (b) not really > fixable, > > but partially work-around-able for common cases. > > > > -- > > brandon s allbery kf8nh sine nomine > associates > > allbery.b at gmail.com > ballbery at sinenomine.net > > unix, openafs, kerberos, infrastructure, xmonad > http://sinenomine.net > > > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From cheater00 at gmail.com Tue Dec 5 22:20:49 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Tue, 05 Dec 2017 22:20:49 +0000 Subject: Long standing annoying issue in ghci In-Reply-To: References: <5a271a07.b29adf0a.8175a.6438SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: A simple example of colored prompt would be good enough, so as not to make the docs too huge. People will be able to figure out they need \STX, or just make sure to tell them. On Tue, 5 Dec 2017 23:17 Brandon Allbery, wrote: > It's indirectly already there: > https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html#the-ghci-and-haskeline-files > Possibly an additional pointer needs to be in the FAQ/things to watch out > for section. > > On Tue, Dec 5, 2017 at 5:13 PM, David Feuer wrote: > >> It sounds like this should be added to the GHCi documentation, even if >> it's not strictly about GHCi. >> >> >> >> David Feuer >> Well-Typed, LLP >> >> -------- Original message -------- >> From: Evan Laforge >> Date: 12/5/17 4:49 PM (GMT-05:00) >> To: Brandon Allbery >> Cc: ghc-devs at haskell.org >> Subject: Re: Long standing annoying issue in ghci >> >> Here's what I use: >> >> :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " >> >> I believe \STX is a signal to haskeline for control sequences. >> Documentation is here: >> https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt >> >> On Tue, Dec 5, 2017 at 12:57 PM, Brandon Allbery >> wrote: >> > On Tue, Dec 5, 2017 at 12:36 PM, cheater00 cheater00 < >> cheater00 at gmail.com> >> > wrote: >> >> >> >> without color coding the prompt so I can't really turn it off. It >> >> seems like a simple arithmetic issue somewhere in the readline >> >> implementation. >> > >> > >> > It's not arithmetic except in the sense that it's not doing *any* math. >> > Color codes in a terminal are necessarily implemented as character >> sequences >> > (this is pretty much the definition of a terminal interface), and >> haskeline >> > makes no effort to recognize them, so it treats them the same as >> displayed >> > character sequences and skips over them as if they were displayed >> > characters. >> > >> > GNU readline handles this by recognizing the character mode sequences >> as not >> > taking up character positions (this is more complex than you think given >> > that GNU readline doesn't assume all terminals obey the ANSI standard; >> as it >> > turns out, neither does haskeline, so it actually gets a bit nasty), and >> > recognizing the special behavior of carriage return, and providing \[ \] >> > escapes to declare the sequence inside as "invisible" to to character >> > positioning (and it's on the person crafting the prompt to insure that >> it >> > actually is). Beyond that, it'd actually have to implement a 'terminal >> > emulator' internally to get it right in all cases --- and i'd be on the >> user >> > to ensure their declared terminal type matches the actual one well >> enough >> > for the 'terminal emulator' to reflect the terminal's actual behavior, >> so >> > it'd be a potential source of even weirder behavior. >> > >> > So, (a) haskeline issue, not strictly ghc/ghci, and (b) not really >> fixable, >> > but partially work-around-able for common cases. >> > >> > -- >> > brandon s allbery kf8nh sine nomine >> associates >> > allbery.b at gmail.com >> ballbery at sinenomine.net >> > unix, openafs, kerberos, infrastructure, xmonad >> http://sinenomine.net >> > >> > _______________________________________________ >> > ghc-devs mailing list >> > ghc-devs at haskell.org >> > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> > >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> > > > > -- > brandon s allbery kf8nh sine nomine > associates > allbery.b at gmail.com > ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad > http://sinenomine.net > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Thu Dec 7 17:32:02 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Thu, 7 Dec 2017 17:32:02 +0000 Subject: Can't push to haddock Message-ID: I'm trying to push a patch that needs a supporting change to haddock. I've pushed the haddock change to the ghc-head branch of ssh://git at github.com/haskell/haddock.git, which is (according to 'packages') the relevant haddock upstream repo. But when I try to push the GHC patch, I get this message bash$ git push Counting objects: 45, done. Delta compression using up to 32 threads. Compressing objects: 100% (45/45), done. Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. Total 45 (delta 43), reused 0 (delta 0) remote: performing commit message validations... remote: Commit message validation passed! remote: performing submodule-ref update validations... remote: Submodule update(s) detected in fa29df02a1b0b926afb2525a258172dcbf0ea460: remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 remote: *FAIL* commit not found in submodule repo ('../haddock.git') remote: or not reachable from persistent branches remote: hooklet hooks/update.secondary.d/check-submodule-refs failed remote: hooks/update.secondary died remote: error: hook declined to update refs/heads/master To ssh://git at git.haskell.org/ghc.git ! [remote rejected] HEAD -> master (hook declined) error: failed to push some refs to 'ssh://git at git.haskell.org/ghc.git' simonpj at cam-05-unx:~/code/HEAD$ What's up? I have pushed the haddock commit! THanks Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Thu Dec 7 17:53:05 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Thu, 7 Dec 2017 17:53:05 +0000 Subject: Can't push to haddock In-Reply-To: References: Message-ID: But when I try to push the GHC patch, I get this message Ah... it worked after a while. Maybe a mirroring thing? But in pushing to GHC I saw: git push Counting objects: 45, done. Delta compression using up to 32 threads. Compressing objects: 100% (45/45), done. Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. Total 45 (delta 43), reused 0 (delta 0) remote: performing commit message validations... remote: Commit message validation passed! remote: performing submodule-ref update validations... remote: Submodule update(s) detected in fa29df02a1b0b926afb2525a258172dcbf0ea460: remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 remote: utils/hsc2hs => 9483ad10064fbbb97ab525280623826b1ef63959 remote: OK remote: performing whitespace validations... remote: whitespace validation passed! remote: mirroring ssh://git at git.haskell.org/ghc to ssh://git at github.com/ghc/ghc ... remote: To ssh://git at github.com/ghc/ghc remote: 5f332e1..fa29df0 master -> master remote: running notifier To ssh://git at git.haskell.org/ghc.git 5f332e1..fa29df0 HEAD -> master simonpj at cam-05-unx:~/code/HEAD$ I did not intend to monkey around with hsc2hs. I can't think how that happened, or whether it matter. With many apologies, would a wiser person that me like to see if I've accidentally messed up hsc2hs. Thanks Simon From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Simon Peyton Jones via ghc-devs Sent: 07 December 2017 17:32 To: ghc-devs at haskell.org Subject: Can't push to haddock I'm trying to push a patch that needs a supporting change to haddock. I've pushed the haddock change to the ghc-head branch of ssh://git at github.com/haskell/haddock.git, which is (according to 'packages') the relevant haddock upstream repo. But when I try to push the GHC patch, I get this message bash$ git push Counting objects: 45, done. Delta compression using up to 32 threads. Compressing objects: 100% (45/45), done. Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. Total 45 (delta 43), reused 0 (delta 0) remote: performing commit message validations... remote: Commit message validation passed! remote: performing submodule-ref update validations... remote: Submodule update(s) detected in fa29df02a1b0b926afb2525a258172dcbf0ea460: remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 remote: *FAIL* commit not found in submodule repo ('../haddock.git') remote: or not reachable from persistent branches remote: hooklet hooks/update.secondary.d/check-submodule-refs failed remote: hooks/update.secondary died remote: error: hook declined to update refs/heads/master To ssh://git at git.haskell.org/ghc.git ! [remote rejected] HEAD -> master (hook declined) error: failed to push some refs to 'ssh://git at git.haskell.org/ghc.git' simonpj at cam-05-unx:~/code/HEAD$ What's up? I have pushed the haddock commit! THanks Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From monkleyon at gmail.com Thu Dec 7 22:08:46 2017 From: monkleyon at gmail.com (MarLinn) Date: Thu, 7 Dec 2017 23:08:46 +0100 Subject: Long standing annoying issue in ghci In-Reply-To: References: Message-ID: <814bb618-30cc-6024-28b0-17c7c9f95a45@gmail.com> > Here's what I use: > > :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " > > I believe \STX is a signal to haskeline for control sequences. > Documentation is here: > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt Note: If you're using a multi-line prompt, things may be different again. I don't know what the rules are, but I found that if I put \STX on any but the last line of prompts I get weird characters. The same goes for any \SOH you might want to add for some reason. Cheers, MarLinn From cheater00 at gmail.com Thu Dec 7 22:15:12 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Thu, 07 Dec 2017 22:15:12 +0000 Subject: Long standing annoying issue in ghci In-Reply-To: <814bb618-30cc-6024-28b0-17c7c9f95a45@gmail.com> References: <814bb618-30cc-6024-28b0-17c7c9f95a45@gmail.com> Message-ID: Interesting. Would you mind reopening the issue and providing a buggy example? Amd alerting haskeline maintainers? How does it work on a 1 line prompt that is so long it wraps? On Thu, 7 Dec 2017 23:11 MarLinn, wrote: > > > Here's what I use: > > > > :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " > > > > I believe \STX is a signal to haskeline for control sequences. > > Documentation is here: > > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt > Note: If you're using a multi-line prompt, things may be different > again. I don't know what the rules are, but I found that if I put \STX > on any but the last line of prompts I get weird characters. The same > goes for any \SOH you might want to add for some reason. > > Cheers, > MarLinn > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri Dec 8 09:12:48 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 8 Dec 2017 09:12:48 +0000 Subject: Can't push to haddock In-Reply-To: References: Message-ID: | Yes, the mirroring has a little bit of latency (assuming the mirroring | trigger event notification from github to git.haskell.org didn't get | lost). How much time did you wait between pushing to github and | ghc.git? I didn't allow any time -- I didn't know that time was needed. Perhaps we should add a note to https://ghc.haskell.org/trac/ghc/wiki/Repositories to explain? Under "Updating sub-repos" perhaps. I wonder if it'd be worth us articulating the reason why some submodules live in github, but some live in git.haskell.org -- with only mirroring github. I'm sure there's a rationale but I don't get it yet. Simon | -----Original Message----- | From: Herbert Valerio Riedel [mailto:hvriedel at gmail.com] | Sent: 07 December 2017 17:57 | To: Simon Peyton Jones | Subject: Re: Can't push to haddock | | Hi Simon, | | Yes, the mirroring has a little bit of latency (assuming the mirroring | trigger event notification from github to git.haskell.org didn't get | lost). How much time did you wait between pushing to github and | ghc.git? | | On Thu, Dec 7, 2017 at 6:53 PM, Simon Peyton Jones via ghc-devs wrote: | > But when I try to push the GHC patch, I get this message | > | > Ah… it worked after a while. Maybe a mirroring thing? | > | > But in pushing to GHC I saw: | > | > git push | > | > Counting objects: 45, done. | > | > Delta compression using up to 32 threads. | > | > Compressing objects: 100% (45/45), done. | > | > Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. | > | > Total 45 (delta 43), reused 0 (delta 0) | > | > remote: performing commit message validations... | > | > remote: Commit message validation passed! | > | > remote: performing submodule-ref update validations... | > | > remote: Submodule update(s) detected in | > fa29df02a1b0b926afb2525a258172dcbf0ea460: | > | > remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 | > | > remote: utils/hsc2hs => 9483ad10064fbbb97ab525280623826b1ef63959 | > | > remote: OK | > | > remote: performing whitespace validations... | > | > remote: whitespace validation passed! | > | > remote: mirroring ssh://git at git.haskell.org/ghc to | > ssh://git at github.com/ghc/ghc ... | > | > remote: To ssh://git at github.com/ghc/ghc | > | > remote: 5f332e1..fa29df0 master -> master | > | > remote: running notifier | > | > To ssh://git at git.haskell.org/ghc.git | > | > 5f332e1..fa29df0 HEAD -> master | > | > simonpj at cam-05-unx:~/code/HEAD$ | > | > I did not intend to monkey around with hsc2hs. I can’t think how | that | > happened, or whether it matter. | > | > With many apologies, would a wiser person that me like to see if | I’ve | > accidentally messed up hsc2hs. | > | > Thanks | > | > Simon | > | > | > | > From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of | > Simon Peyton Jones via ghc-devs | > Sent: 07 December 2017 17:32 | > To: ghc-devs at haskell.org | > Subject: Can't push to haddock | > | > | > | > I’m trying to push a patch that needs a supporting change to | haddock. | > | > I’ve pushed the haddock change to the ghc-head branch of | > ssh://git at github.com/haskell/haddock.git, which is (according to | > ‘packages’) the relevant haddock upstream repo. | > | > But when I try to push the GHC patch, I get this message | > | > bash$ git push | > | > Counting objects: 45, done. | > | > Delta compression using up to 32 threads. | > | > Compressing objects: 100% (45/45), done. | > | > Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. | > | > Total 45 (delta 43), reused 0 (delta 0) | > | > remote: performing commit message validations... | > | > remote: Commit message validation passed! | > | > remote: performing submodule-ref update validations... | > | > remote: Submodule update(s) detected in | > fa29df02a1b0b926afb2525a258172dcbf0ea460: | > | > remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 | > | > remote: *FAIL* commit not found in submodule repo ('../haddock.git') | > | > remote: or not reachable from persistent branches | > | > remote: hooklet hooks/update.secondary.d/check-submodule-refs failed | > | > remote: hooks/update.secondary died | > | > remote: error: hook declined to update refs/heads/master | > | > To ssh://git at git.haskell.org/ghc.git | > | > ! [remote rejected] HEAD -> master (hook declined) | > | > error: failed to push some refs to | 'ssh://git at git.haskell.org/ghc.git' | > | > simonpj at cam-05-unx:~/code/HEAD$ | > | > | > | > What’s up? I have pushed the haddock commit! | > | > THanks | > | > Simon | > | > | > | > | > _______________________________________________ | > ghc-devs mailing list | > ghc-devs at haskell.org | > | https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.h | > askell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- | devs&data=02%7C01%7Csimonpj%40microsoft.com%7C684b5c6cdac34213317708d5 | 3d9be387%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6364826622509770 | 90&sdata=kMhG2iTALLRxhwyDw%2BzTN8VvMMn%2FqfvnSn9cPm0AK4Q%3D&reserved=0 | > From simonpj at microsoft.com Fri Dec 8 10:24:32 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 8 Dec 2017 10:24:32 +0000 Subject: unix/tests/user001 Message-ID: On Linux I get this validate failure all the time. What should I do? I've trained myself to ignore it, but that seems wrong Simon Unexpected failures: ../libraries/unix/tests/user001.run user001 [bad stdout] (normal) =====> user001(normal) 1 of 1 [0, 0, 0] cd "./user001.run" && "/5playpen/simonpj/HEAD/inplace/test spaces/ghc-stage2" -o user001 user001.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output -package unix cd "./user001.run" && ./user001 Actual stdout output differs from expected: diff -uw "./user001.run/user001.stdout.normalised" "./user001.run/user001.run.stdout.normalised" --- ./user001.run/user001.stdout.normalised 2017-12-08 10:22:59.835931843 +0000 +++ ./user001.run/user001.run.stdout.normalised 2017-12-08 10:22:59.835931843 +0000 @@ -4,8 +4,8 @@ getEffectiveGroupID: OK getGroups: OK getEffectiveUserName: OK -getGroupEntryForID: OK -getGroupEntryForName: OK +getGroupEntryForID: ERROR: getGroupEntryForID: does not exist (no such group) +getGroupEntryForName: ERROR: getGroupEntryForID: does not exist (no such group) getAllGroupEntries: OK getUserEntryForID: OK getAllUserEntries: OK *** unexpected failure for user001(normal) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at well-typed.com Fri Dec 8 15:13:25 2017 From: ben at well-typed.com (Ben Gamari) Date: Fri, 08 Dec 2017 10:13:25 -0500 Subject: unix/tests/user001 In-Reply-To: References: Message-ID: <87374ll0bx.fsf@ben-laptop.smart-cactus.org> Simon Peyton Jones via ghc-devs writes: > On Linux I get this validate failure all the time. What should I do? I've trained myself to ignore it, but that seems wrong > Simon > > Unexpected failures: > > ../libraries/unix/tests/user001.run user001 [bad stdout] (normal) > It sounds like your machine may be misconfigured. The test attempts to lookup the entry in /etc/group corresponding to the process's group. However, it appears that such an entry doesn't exist. This would imply that your user doesn't have a valid group, which is quite odd. What does the `id` command say? Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From simonpj at microsoft.com Fri Dec 8 15:21:33 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 8 Dec 2017 15:21:33 +0000 Subject: unix/tests/user001 In-Reply-To: <87374ll0bx.fsf@ben-laptop.smart-cactus.org> References: <87374ll0bx.fsf@ben-laptop.smart-cactus.org> Message-ID: | that your user doesn't have a valid group, which is quite odd. What | does the `id` command say? simonpj at cam-05-unx:~/tmp$ id uid=501(simonpj) gid=1001 groups=1001,27(sudo) | -----Original Message----- | From: Ben Gamari [mailto:ben at well-typed.com] | Sent: 08 December 2017 15:13 | To: Simon Peyton Jones ; ghc-devs at haskell.org | Subject: Re: unix/tests/user001 | | Simon Peyton Jones via ghc-devs writes: | | > On Linux I get this validate failure all the time. What should I | do? | > I've trained myself to ignore it, but that seems wrong Simon | > | > Unexpected failures: | > | > ../libraries/unix/tests/user001.run user001 [bad stdout] | (normal) | > | It sounds like your machine may be misconfigured. The test attempts to | lookup the entry in /etc/group corresponding to the process's group. | However, it appears that such an entry doesn't exist. This would imply | that your user doesn't have a valid group, which is quite odd. What | does the `id` command say? | | Cheers, | | - Ben From ben at well-typed.com Fri Dec 8 16:46:19 2017 From: ben at well-typed.com (Ben Gamari) Date: Fri, 08 Dec 2017 11:46:19 -0500 Subject: unix/tests/user001 In-Reply-To: References: <87374ll0bx.fsf@ben-laptop.smart-cactus.org> Message-ID: <87zi6tjhgp.fsf@ben-laptop.smart-cactus.org> Simon Peyton Jones via ghc-devs writes: > | that your user doesn't have a valid group, which is quite odd. What > | does the `id` command say? > > simonpj at cam-05-unx:~/tmp$ id > uid=501(simonpj) gid=1001 groups=1001,27(sudo) Indeed it looks like your group doesn't have an entry in /etc/group. Quite odd. Perhaps this was due to the upgrade? Is there an entry for group id 501 in /etc/group? Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From monkleyon at gmail.com Fri Dec 8 17:24:23 2017 From: monkleyon at gmail.com (MarLinn) Date: Fri, 8 Dec 2017 18:24:23 +0100 Subject: Long standing annoying issue in ghci In-Reply-To: References: <814bb618-30cc-6024-28b0-17c7c9f95a45@gmail.com> Message-ID: <572bbe0d-1c65-19ef-bbb1-473d395fc46e@gmail.com> I opened an issue on the Haskeline github (https://github.com/judah/haskeline/issues/72). But it seems to be completely Haskeline-side, so I'm not sure if it's worth re-opening the one for ghci? As missing documentation maybe? (BTW, I found this on the wiki: https://wiki.haskell.org/GHCi_in_colour. Might be a good place to put it, if linked.) If you want to, here are my test cases rewritten as ghci prompts:     -- single line, positioning error :set prompt " \ESC[36m%\ESC[0m " -- single line, works     :set prompt " \ESC[36m\STX%\ESC[0m\STX " -- multiline, bad output     :set prompt "\ESC[32m\STX–––\ESC[0m\STX\n \ESC[36m\STX%\ESC[0m\STX " -- multiline, works but is inconsistent     :set prompt "\ESC[32m–––\ESC[0m\n \ESC[36m\STX%\ESC[0m\STX " In my tests, the positioning errors consistently happen if there are any "unclosed" escape-sequences on the last line of the prompt, regardless of its length. Escape sequences on previous lines consistently create "weird characters", but don't influence the positioning. Also regardless of their lengths. That makes sense, as both sets of lines seem to be handled quite differently. Are multiline prompts even used by a lot of people? I like mine because it gives me a both a list of modules and a consistent cursor position. But maybe I'm the exception? Cheers. On 2017-12-07 23:15, cheater00 cheater00 wrote: > > Interesting. Would you mind reopening the issue and providing a buggy > example? Amd alerting haskeline maintainers? How does it work on a 1 > line prompt that is so long it wraps? > > > On Thu, 7 Dec 2017 23:11 MarLinn, > wrote: > > > > Here's what I use: > > > > :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " > > > > I believe \STX is a signal to haskeline for control sequences. > > Documentation is here: > > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt > Note: If you're using a multi-line prompt, things may be different > again. I don't know what the rules are, but I found that if I put \STX > on any but the last line of prompts I get weird characters. The same > goes for any \SOH you might want to add for some reason. > > Cheers, > MarLinn > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at well-typed.com Fri Dec 8 18:50:29 2017 From: ben at well-typed.com (Ben Gamari) Date: Fri, 08 Dec 2017 13:50:29 -0500 Subject: Moving hadrian to submodule Message-ID: <87o9n9jbpr.fsf@ben-laptop.smart-cactus.org> Hello everyone, A bit over a month ago we merged hadrian into the ghc tree as a subtree. Unfortunately, those working on Hadrian have found the subtree mechanism to provide a rather poor developer experience. Consequently, today I will be ripping out the subtree and replacing it with a submodule. After pulling the commit performing this change you will likely need to do the following to emplace the new submodule, $ git submodule update --init $ git -C hadrian checkout . Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From me at ara.io Fri Dec 8 19:10:09 2017 From: me at ara.io (Ara Adkins) Date: Fri, 8 Dec 2017 19:10:09 +0000 Subject: Moving hadrian to submodule In-Reply-To: <87o9n9jbpr.fsf@ben-laptop.smart-cactus.org> References: <87o9n9jbpr.fsf@ben-laptop.smart-cactus.org> Message-ID: <5E391C39-1C3E-4560-90DC-4B7EAD17D4CC@ara.io> Sounds good! Hopefully this doesn’t cause a flood of commit messages. _ara > On 8 Dec 2017, at 18:50, Ben Gamari wrote: > > Hello everyone, > > A bit over a month ago we merged hadrian into the ghc tree as a subtree. > Unfortunately, those working on Hadrian have found the subtree mechanism > to provide a rather poor developer experience. Consequently, today I > will be ripping out the subtree and replacing it with a submodule. > > After pulling the commit performing this change you will likely need to > do the following to emplace the new submodule, > > $ git submodule update --init > $ git -C hadrian checkout . > > Cheers, > > - Ben > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From m at tweag.io Fri Dec 8 19:25:51 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Fri, 8 Dec 2017 20:25:51 +0100 Subject: Moving hadrian to submodule In-Reply-To: <5E391C39-1C3E-4560-90DC-4B7EAD17D4CC@ara.io> References: <87o9n9jbpr.fsf@ben-laptop.smart-cactus.org> <5E391C39-1C3E-4560-90DC-4B7EAD17D4CC@ara.io> Message-ID: Great! A submodule makes a lot more sense to me, at least short term. I would hope that medium term the development processes of GHC-as-a-whole and Hadrian(-a-part-of-GHC) can converge, so that a submodule is no longer necessary. Submodules do have their downsides and it would be odd for such a core part as the build system to be kept external to the main repo. -- Mathieu Boespflug Founder at http://tweag.io. On 8 December 2017 at 20:10, Ara Adkins wrote: > Sounds good! Hopefully this doesn’t cause a flood of commit messages. > > _ara > > > On 8 Dec 2017, at 18:50, Ben Gamari wrote: > > > > Hello everyone, > > > > A bit over a month ago we merged hadrian into the ghc tree as a subtree. > > Unfortunately, those working on Hadrian have found the subtree mechanism > > to provide a rather poor developer experience. Consequently, today I > > will be ripping out the subtree and replacing it with a submodule. > > > > After pulling the commit performing this change you will likely need to > > do the following to emplace the new submodule, > > > > $ git submodule update --init > > $ git -C hadrian checkout . > > > > Cheers, > > > > - Ben > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From qdunkan at gmail.com Mon Dec 11 20:08:00 2017 From: qdunkan at gmail.com (Evan Laforge) Date: Mon, 11 Dec 2017 12:08:00 -0800 Subject: GHCi recompilation avoidance UI In-Reply-To: References: <7587879.l535S4SiGz@squirrel> <5110217.Pvi1NnV8H5@squirrel> Message-ID: https://ghc.haskell.org/trac/ghc/ticket/13604 was just closed, I look forward to trying it out. Thanks to dfeuer for the fix! On Wed, Nov 22, 2017 at 12:41 AM, Simon Marlow wrote: > David, > > Perhaps it would be good to defer changing the behaviour of :load *M (I > believe you that it's hard, that code is quite convoluted) and for now just > focus on making GHCi able to load compiled object code again, which I think > is a much simpler problem? > > Cheers > Simon > > > On 21 November 2017 at 21:49, David Feuer wrote: >> >> I started digging back into this today, particularly considering Simon >> PJ's view >> that it's a bit odd for optimization flags to imply -fobject-code >> (specifically >> because we could potentially support optimization for the bytecode >> interpreter some day). I'm left even more lost about exactly what we want. >> I believe it's fairly clear that, as Simon M wrote, >> >> > [W]e'll want at least -fignore-optim-changes to be the default, so that >> > GHCi >> > does the expected thing when you have compiled object files. >> >> Based on Simon PJ's comment, I believe we want to *continue* to discard >> optimization flags when -fobject-code is not enabled. As for my suggestion >> in (2), >> I spent the last couple hours attempting to figure out what would be >> necessary >> to allow :load *M to load a module interpreted even when using >> -fobject-code, >> but found myself utterly lost in the module loading logic. I see that the >> IIModule >> constructor is deeply involved in this, but I haven't been able to figure >> out >> where/how that interacts with -fobject-code to determine whether the >> module >> will actually be loaded interpreted or compiled. Can someone give me a >> clue? >> >> On Thursday, November 2, 2017 10:21:07 AM EST Simon Marlow wrote: >> > On 31 October 2017 at 15:42, David Feuer wrote: >> > >> > > Changes in GHC 8.2.1 lead to a lot of recompilation, because GHCi now >> > > refuses to load optimized >> > > code unless -fobject-code (and optimization flags) are enabled. I >> > > propose >> > > the following slight >> > > modification to >> > > https://ghc.haskell.org/trac/ghc/ticket/13604#comment:48 >> > > >> > > 1. Optimization flags (except -O0) imply -fobject-code. This ensures >> > > that >> > > GHC respects optimization flags regardless of --interactive. >> > > >> > > 2. Even when -fobject-code is on, :load *M will load M as bytecode. >> > > This >> > > provides the "escape hatch" from -fobject-code that you need to use >> > > debugging features, etc. >> > > >> > >> > Yes, I think this is probably what we want. I'm not sure how smooth it >> > will >> > be to implement though. >> > >> > >> > > 3. New -fignore-optim-changes and -fignore-hpc-changes (Phab:D4123) >> > > flags should enable users to put together object code and bytecode >> > > with >> > > diverse optimization levels/options and HPC options while still >> > > updating >> > > automatically based on source changes and whether profiling is >> > > enabled. >> > > >> > >> > As I mentioned on the diff, I think we'll want at least >> > -fignore-optim-changes to be the default, so that GHCi does the expected >> > thing when you have compiled object files. >> > >> > Cheers >> > Simon > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > From cheater00 at gmail.com Tue Dec 12 19:44:56 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Tue, 12 Dec 2017 19:44:56 +0000 Subject: Long standing annoying issue in ghci In-Reply-To: <572bbe0d-1c65-19ef-bbb1-473d395fc46e@gmail.com> References: <814bb618-30cc-6024-28b0-17c7c9f95a45@gmail.com> <572bbe0d-1c65-19ef-bbb1-473d395fc46e@gmail.com> Message-ID: Yes, it is worth doing it, because until Haskeline has been fixed and integrated into ghci, the issue persists and needs to remain filed. On Fri, 8 Dec 2017 18:25 MarLinn, wrote: > I opened an issue on the Haskeline github ( > https://github.com/judah/haskeline/issues/72). > > But it seems to be completely Haskeline-side, so I'm not sure if it's > worth re-opening the one for ghci? As missing documentation maybe? > (BTW, I found this on the wiki: https://wiki.haskell.org/GHCi_in_colour. > Might be a good place to put it, if linked.) > > If you want to, here are my test cases rewritten as ghci prompts: > > -- single line, positioning error > :set prompt " \ESC[36m%\ESC[0m " > -- single line, works > :set prompt " \ESC[36m\STX%\ESC[0m\STX " > -- multiline, bad output > :set prompt "\ESC[32m\STX–––\ESC[0m\STX\n \ESC[36m\STX%\ESC[0m\STX " > -- multiline, works but is inconsistent > :set prompt "\ESC[32m–––\ESC[0m\n \ESC[36m\STX%\ESC[0m\STX " > > In my tests, the positioning errors consistently happen if there are any > "unclosed" escape-sequences on the last line of the prompt, regardless of > its length. Escape sequences on previous lines consistently create "weird > characters", but don't influence the positioning. Also regardless of their > lengths. That makes sense, as both sets of lines seem to be handled quite > differently. > > Are multiline prompts even used by a lot of people? I like mine because it > gives me a both a list of modules and a consistent cursor position. But > maybe I'm the exception? > > Cheers. > > > On 2017-12-07 23:15, cheater00 cheater00 wrote: > > Interesting. Would you mind reopening the issue and providing a buggy > example? Amd alerting haskeline maintainers? How does it work on a 1 line > prompt that is so long it wraps? > > On Thu, 7 Dec 2017 23:11 MarLinn, wrote: > >> >> > Here's what I use: >> > >> > :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " >> > >> > I believe \STX is a signal to haskeline for control sequences. >> > Documentation is here: >> > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt >> Note: If you're using a multi-line prompt, things may be different >> again. I don't know what the rules are, but I found that if I put \STX >> on any but the last line of prompts I get weird characters. The same >> goes for any \SOH you might want to add for some reason. >> >> Cheers, >> MarLinn >> >> > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Wed Dec 13 16:43:55 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Wed, 13 Dec 2017 16:43:55 +0000 Subject: Release policies Message-ID: Dear GHC devops group The conversation on Trac #14558 suggests that we might want to consider reviewing GHC's release policies. This email is to invite your input. The broad questions is this. We want GHC to serve the needs of all its users, including downstream tooling that uses GHC. What release policies will best support that goal? For example, we already ensure that GHC 8.4 can be compiled with 8.2 and 8.0. This imposes a slight tax on GHC development, but it means that users don't need to upgrade quite as often. (If the tempo of releases increases, we might want to increase the window.) Trac #14558 suggests that we might want to ensure the metadata on GHC's built-in libraries is parsable with older Cabals. One possibility would be this: * Ensure that the Cabal metadata of non-reinstallable packages (e.g. integer-gmp) shipped with GHC be parsable by the Cabal versions shipped with the last two major GHC releases [i.e. have a sufficiently old cabal-version field]. That is, in general a new Cabal specification will need to be shipped with two GHC releases before GHC will use start using its features in non-reinstallable packages. * Upholding this policy won't always be possible. There may be cases (as is the case Hadrian for GHC 8.4) where the benefit of quickly introducing incompatible syntax outweighs the need for compatibility. In this (hopefully rare) case we would explicitly advertise the incompatibility in the release documentation, and give as much notice as possible to users to allow downstream tools to adapt. * For reinstallable packages, of which GHC is simply a client (like text or bytestring), we can't reasonably enforce such a policy, because GHC devs have no control over what the maintainers of external core libraries put in their Cabal files. This is just a proposal. The narrow questions are these: * Would this be sufficient to deal with the concerns raised in #14558? * Is it necessary, ow would anything simpler be sufficient? * What costs would the policy impose on GHC development? * There may be matters of detail: e.g. is two releases the right grace period. Would one do? Both the broad question and the narrow ones are appropriate for the Devops group. Thanks! Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonetiger at gmail.com Wed Dec 13 16:46:52 2017 From: lonetiger at gmail.com (Phyx) Date: Wed, 13 Dec 2017 16:46:52 +0000 Subject: [GHC] #14537: Do not link to msvcrt.dll In-Reply-To: <061.3987f9ac05db4d2e2767cca51dacc31b@haskell.org> References: <046.1c327e3acbc706888aef5a746e2bc1a4@haskell.org> <061.3987f9ac05db4d2e2767cca51dacc31b@haskell.org> Message-ID: Add a -v3 to ghc to see what's happening. On Wed, Dec 13, 2017, 07:23 GHC wrote: > #14537: Do not link to msvcrt.dll > -------------------------------------+------------------------------------- > Reporter: johndoe | Owner: (none) > Type: feature request | Status: closed > Priority: normal | Milestone: > Component: Compiler | Version: 8.2.1 > (Linking) | > Resolution: invalid | Keywords: > Operating System: Windows | Architecture: > | Unknown/Multiple > Type of failure: Other | Test Case: > Blocked By: | Blocking: > Related Tickets: | Differential Rev(s): > Wiki Page: | > -------------------------------------+------------------------------------- > > Comment (by johndoe): > > Well, I tried to modify `specs` directly, but project failed to build: > I've got messagebox that `setup.exe` crashed. > That was on my local machine, but the same you can see on appveyor: > https://ci.appveyor.com/project/johnd0e/pandoc/build/1.0.79 > > I am not sure, maybe my `specs` file is not good: > https://github.com/johnd0e/pandoc/blob/master/specs > But it worked well with other project (not GHC). > > -- > Ticket URL: > GHC > The Glasgow Haskell Compiler > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m at tweag.io Wed Dec 13 22:12:42 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Wed, 13 Dec 2017 23:12:42 +0100 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Boespflug, Mathieu Date: 13 December 2017 at 23:03 Subject: Re: Release policies To: Simon Peyton Jones Cc: ghc-devops-group at haskell.org [replying to ghc-devops-group@, which I assume based on your email's content is the mailing list you intended.] Hi Simon, feedback from downstream consumers of Cabal metadata (e.g. build tool authors) will be particularly useful for the discussion here. Here are my thoughts as a bystander. It's worth trying to identify what problems came up during the integer-gmp incident in Trac #14558: * GHC 8.2.1 shipped with integer-gmp-1.0.1.0 but the release notes said otherwise. * GHC 8.2.1 shipped with Cabal-2.0.0.2, but specifically claimed in the release notes that cabal-install-1.24 (and by implication any other build tool based on Cabal-the-library version 1.24) was supported: "GHC 8.2 only works with cabal-install version 1.24 or later. Please upgrade if you have an older version of cabal-install." * GHC 8.2.2 also claimed Cabal-1.24 support. * GHC 8.2.1 was released in July 2017 with Cabal-2.0.0.2, a brand new major release with breaking changes to the metadata format, without much lead time for downstream tooling authors (like Stack) to adapt. * But actually if we look at their respective release notes, GHC 8.2.1 was relased in July 2017, even though the Cabal website claims that Cabal-2.0.0.2 was released in August 2017 (see https://www.haskell.org/cabal/download.html). So it looks like GHC didn't just not give enough lead time about an upstream dependency it shipped with, it shipped with an unreleased version of Cabal! * Libraries that ship with GHC are usually also uploaded to Hackage, to make the documentation easily accessible, but integer-gmp-1.0.1.0 was not uploaded to Hackage until 4 months after the release. * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage differed from the metadata that was actually in the source tarball of GHC-8.2.1 and GHC-8.2.2. * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage included Cabal-2.0 specific syntactic sugar, making the metadata unreadable using any tooling that did not link against the Cabal-2.0.0.2 library (or any later version). * It so happened that one particular version of one particular downstream build tool, Stack, had a bug, compounding the bad effects of the previous point. But a new release has now been made, and in any case that's not a problem for GHC to solve. So let's keep that out of the discussion here. So I suggest we discuss ways to eliminate or reduce the likelihood of any of the above problems from occurring again. Here are some ideas: * GHC should never under any circumstance ship with an unreleased version of any independently maintained dependency. Cabal is one such dependency. This should hold true for anything else. We could just add that policy to the Release Policy. * Stronger still, GHC should not switch to a new major release of a dependency at any time during feature freeze ahead of a release. E.g. if Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet. * The 3-release backwards compat rule should apply in all circumstances. That means major version bumps of any library GHC ships with, including base, should not imply any breaking change in the API's of any such library. * GHC does have control over reinstallable packages (like text and bytestring): GHC need not ship with the latest versions of these, if indeed they introduce breaking changes that would contravene the 3-release policy. * Note: today, users are effectively tied to whatever version of the packages ships with GHC (i.e. the "reinstallable" bit is problematic today for various technical reasons). That's why a breaking change in bytestring is technically a breaking change in GHC. * The current release policy covers API stability, but what about metadata? In the extreme, we could say a 3-release policy applies to metadata too. Meaning, all metadata shipping with GHC now and in the next 2 releases should be parseable by today's version of Cabal and downstream tooling. Is such a long lead time necessary? That's for build tool authors to say, and a point to negotiate with GHC devs. * Because there are far fewer consumers of metadata than consumers of say base, I think shorter lead time is reasonable. At the other extreme, it could even be just the few months during feature freeze. * The release notes bugs mentioned above and the lack of consistent upload to Hackage are a symptom of lack of release automation, I suspect. That's how to fix it, but we could also spell out in the Release Policy that GHC libraries should all be on Hackage from the day of release. Finally, a question for discussion: * Hackage allows revising the metadata of an uploaded package even without changing the version number. This happens routinely on Hackage today by the Hackage trustees. Should this be permitted for packages whose release is completely tied to that of GHC itself (like integer-gmp)? Best, Mathieu On 13 December 2017 at 17:43, Simon Peyton Jones via ghc-devs < ghc-devs at haskell.org> wrote: > Dear GHC devops group > > The conversation on Trac #14558 > suggests that we might > want to consider reviewing GHC’s release policies > . > This email is to invite your input. > > The broad questions is this. We want GHC to serve the needs of all its > users, including downstream tooling that uses GHC. What release policies > will best support that goal? For example, we already ensure that GHC 8.4 > can be compiled with 8.2 and 8.0. This imposes a slight tax on GHC > development, but it means that users don't need to upgrade quite as often. > (If the tempo of releases increases, we might want to increase the window.) > > Trac #14558 suggests that we might want to ensure the metadata on GHC’s > built-in libraries is parsable with older Cabals. One possibility would be > this: > > - Ensure that the Cabal metadata of non-reinstallable packages (e.g. > integer-gmp) shipped with GHC be parsable by the Cabal versions shipped > with the last two major GHC releases [i.e. have a sufficiently old > cabal-version field]. That is, in general a new Cabal specification will > need to be shipped with two GHC releases before GHC will use start using > its features in non-reinstallable packages. > - Upholding this policy won't always be possible. There may be cases > (as is the case Hadrian for GHC 8.4) where the benefit of quickly > introducing incompatible syntax outweighs the need for compatibility. In > this (hopefully rare) case we would explicitly advertise the > incompatibility in the release documentation, and give as much notice as > possible to users to allow downstream tools to adapt. > - For reinstallable packages, of which GHC is simply a client (like > text or bytestring), we can’t reasonably enforce such a policy, because GHC > devs have no control over what the maintainers of external core libraries > put in their Cabal files. > > This is just a proposal. The narrow questions are these: > > - Would this be sufficient to deal with the concerns raised in #14558? > - Is it necessary, ow would anything simpler be sufficient? > - What costs would the policy impose on GHC development? > - There may be matters of detail: e.g. is two releases the right grace > period. Would one do? > > Both the broad question and the narrow ones are appropriate for the Devops > group. > > Thanks! > > Simon > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gershomb at gmail.com Wed Dec 13 23:19:37 2017 From: gershomb at gmail.com (Gershom B) Date: Wed, 13 Dec 2017 18:19:37 -0500 Subject: Fwd: Release policies Message-ID: Mathieu: I think the points about better tooling for documenting the correct claims in the release process are well taken. Updating the release notes manually leaves way too much room for error. However, I think you are incorrect that GHC 8.2.1 and 8.2.2 did not have cabal-install 1.24 support. They did. it works with them. I used it! The fact that the cabal files for builtin libraries use Cabal-2 syntax does not cause a problem. I think elsewhere Mikhail has corrected your timeline a bit. The general point is that Cabal-the-library and ghc releases do tend to be in tandem. But it is also the case that this happens because they are often developed in a coupled fashion. This in not really different than other builtin libs to GHC. They are necessarily coupled to changes in the compiler, and so end up being released together. Our process for making sure they are actually uploaded is absolutely error-prone as is the process for documenting what occurs in release notes. But I don't think we can simply by fiat decouple this stuff -- rather, this needs to occur on a technical level first, before other policies can really even be considered. Onto the concrete ideas: > * GHC should never under any circumstance ship with an unreleased version > of any independently maintained dependency. Cabal is one such dependency. > This should hold true for anything else. We could just add that policy to > the Release Policy. Yes, this is a good policy. Sometimes in the drive for a release, GHC will run ahead of a dependencies' upload by a bit. (Iirc this happened at one point in the past for bytestring, but this was some years ago). It is always better to hold things by a few days to get the dependency released first. > * Stronger still, GHC should not switch to a new major release of a > dependency at any time during feature freeze ahead of a release. E.g. if > Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair > game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet. I don't think this works, in terms of coupled dependencies. If/when Cabal-3 is developed it will almost certainly be in tandem with GHC support. > * GHC does have control over reinstallable packages (like text and > bytestring): GHC need not ship with the latest versions of these, if indeed > they introduce breaking changes that would contravene the 3-release policy. Right, but this won't occur, because those libs are already under the control of the libraries committee and abide by the policy. > * Because there are far fewer consumers of metadata than consumers of say > base, I think shorter lead time is reasonable. At the other extreme, it > could even be just the few months during feature freeze. Right. There's not a sufficient quantity of metadata-consuming downstream tooling to motivate a long lead. And furthermore, the examples I can think of -- tracking dependencies for notifications or graphs -- have no need of pulling this data out of ghc-builtin libraries anyway, as they're for exploring the _userland_ portion of the package world regardless. (The other key example -- stack -- can also choose to ignore the metadata of builtin libs without harm). The general motivation of making a "feature freeze" more of a "freeze all the moving parts, really" I do agree with. Having a real freeze is part of a better release process, and it should allow all the downstream consumers of everything more time to really catch up. This is just one instance of that need. > Finally, a question for discussion: > > * Hackage allows revising the metadata of an uploaded package even without > changing the version number. This happens routinely on Hackage today by the > Hackage trustees. Should this be permitted for packages whose release is > completely tied to that of GHC itself (like integer-gmp)? It is rare that this is needed, but the ability just served us well -- editing integer-gmp to remove the new syntax was very useful, as it let us fix up old stack nightlies. Like all revisions, these should be made with some care and thought, but since we've just seen why it was helpful, I'd hate to now say we can't do it again if some other unforseen circumstance crops up. Regards, Gershom > Hi Simon, > > feedback from downstream consumers of Cabal metadata (e.g. build tool > authors) will be particularly useful for the discussion here. Here are my > thoughts as a bystander. > > It's worth trying to identify what problems came up during the integer-gmp > incident in Trac #14558: > > * GHC 8.2.1 shipped with integer-gmp-1.0.1.0 but the release notes said > otherwise. > * GHC 8.2.1 shipped with Cabal-2.0.0.2, but specifically claimed in the > release notes that cabal-install-1.24 (and by implication any other build > tool based on Cabal-the-library version 1.24) was supported: "GHC 8.2 only > works with cabal-install version 1.24 or later. Please upgrade if you have > an older version of cabal-install." > * GHC 8.2.2 also claimed Cabal-1.24 support. > * GHC 8.2.1 was released in July 2017 with Cabal-2.0.0.2, a brand new major > release with breaking changes to the metadata format, without much lead > time for downstream tooling authors (like Stack) to adapt. > * But actually if we look at their respective release notes, GHC 8.2.1 was > relased in July 2017, even though the Cabal website claims that > Cabal-2.0.0.2 was released in August 2017 (see > https://www.haskell.org/cabal/download.html). So it looks like GHC didn't > just not give enough lead time about an upstream dependency it shipped > with, it shipped with an unreleased version of Cabal! > * Libraries that ship with GHC are usually also uploaded to Hackage, to > make the documentation easily accessible, but integer-gmp-1.0.1.0 was not > uploaded to Hackage until 4 months after the release. > * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage differed from > the metadata that was actually in the source tarball of GHC-8.2.1 and > GHC-8.2.2. > * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage included > Cabal-2.0 specific syntactic sugar, making the metadata unreadable using > any tooling that did not link against the Cabal-2.0.0.2 library (or any > later version). > * It so happened that one particular version of one particular downstream > build tool, Stack, had a bug, compounding the bad effects of the previous > point. But a new release has now been made, and in any case that's not a > problem for GHC to solve. So let's keep that out of the discussion here. > > So I suggest we discuss ways to eliminate or reduce the likelihood of any > of the above problems from occurring again. Here are some ideas: > > * GHC should never under any circumstance ship with an unreleased version > of any independently maintained dependency. Cabal is one such dependency. > This should hold true for anything else. We could just add that policy to > the Release Policy. > * Stronger still, GHC should not switch to a new major release of a > dependency at any time during feature freeze ahead of a release. E.g. if > Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair > game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet. > * The 3-release backwards compat rule should apply in all circumstances. > That means major version bumps of any library GHC ships with, including > base, should not imply any breaking change in the API's of any such library. > * GHC does have control over reinstallable packages (like text and > bytestring): GHC need not ship with the latest versions of these, if indeed > they introduce breaking changes that would contravene the 3-release policy. > * Note: today, users are effectively tied to whatever version of the > packages ships with GHC (i.e. the "reinstallable" bit is problematic today > for various technical reasons). That's why a breaking change in bytestring > is technically a breaking change in GHC. > * The current release policy covers API stability, but what about metadata? > In the extreme, we could say a 3-release policy applies to metadata too. > Meaning, all metadata shipping with GHC now and in the next 2 releases > should be parseable by today's version of Cabal and downstream tooling. Is > such a long lead time necessary? That's for build tool authors to say, and > a point to negotiate with GHC devs. > * Because there are far fewer consumers of metadata than consumers of say > base, I think shorter lead time is reasonable. At the other extreme, it > could even be just the few months during feature freeze. > * The release notes bugs mentioned above and the lack of consistent upload > to Hackage are a symptom of lack of release automation, I suspect. That's > how to fix it, but we could also spell out in the Release Policy that GHC > libraries should all be on Hackage from the day of release. > > Finally, a question for discussion: > > * Hackage allows revising the metadata of an uploaded package even without > changing the version number. This happens routinely on Hackage today by the > Hackage trustees. Should this be permitted for packages whose release is > completely tied to that of GHC itself (like integer-gmp)? > > Best, > > Mathieu > > > On 13 December 2017 at 17:43, Simon Peyton Jones via ghc-devs < > ghc-devs at haskell.org> wrote: > >> Dear GHC devops group >> >> The conversation on Trac #14558 >> suggests that we might >> want to consider reviewing GHC’s release policies >> . >> This email is to invite your input. >> >> The broad questions is this. We want GHC to serve the needs of all its >> users, including downstream tooling that uses GHC. What release policies >> will best support that goal? For example, we already ensure that GHC 8.4 >> can be compiled with 8.2 and 8.0. This imposes a slight tax on GHC >> development, but it means that users don't need to upgrade quite as often. >> (If the tempo of releases increases, we might want to increase the window.) >> >> Trac #14558 suggests that we might want to ensure the metadata on GHC’s >> built-in libraries is parsable with older Cabals. One possibility would be >> this: >> >> - Ensure that the Cabal metadata of non-reinstallable packages (e.g. >> integer-gmp) shipped with GHC be parsable by the Cabal versions shipped >> with the last two major GHC releases [i.e. have a sufficiently old >> cabal-version field]. That is, in general a new Cabal specification will >> need to be shipped with two GHC releases before GHC will use start using >> its features in non-reinstallable packages. >> - Upholding this policy won't always be possible. There may be cases >> (as is the case Hadrian for GHC 8.4) where the benefit of quickly >> introducing incompatible syntax outweighs the need for compatibility. In >> this (hopefully rare) case we would explicitly advertise the >> incompatibility in the release documentation, and give as much notice as >> possible to users to allow downstream tools to adapt. >> - For reinstallable packages, of which GHC is simply a client (like >> text or bytestring), we can’t reasonably enforce such a policy, because GHC >> devs have no control over what the maintainers of external core libraries >> put in their Cabal files. >> >> This is just a proposal. The narrow questions are these: >> >> - Would this be sufficient to deal with the concerns raised in #14558? >> - Is it necessary, ow would anything simpler be sufficient? >> - What costs would the policy impose on GHC development? >> - There may be matters of detail: e.g. is two releases the right grace >> period. Would one do? >> >> Both the broad question and the narrow ones are appropriate for the Devops >> group. >> >> Thanks! >> >> Simon >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > ------------------------------ > > End of ghc-devs Digest, Vol 172, Issue 15 > ***************************************** From m at tweag.io Thu Dec 14 00:06:10 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Thu, 14 Dec 2017 01:06:10 +0100 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: Hi Gerhom, On 14 December 2017 at 00:19, Gershom B wrote: > > Mathieu: > > I think the points about better tooling for documenting the correct > claims in the release process are well taken. Updating the release > notes manually leaves way too much room for error. > > However, I think you are incorrect that GHC 8.2.1 and 8.2.2 did not > have cabal-install 1.24 support. They did. it works with them. They did, and indeed Stack too worked just fine with them, but that was assuming that integer-gmp-1.0.1.0 really was what was shipped in the tarballs, not what it was on Hackage (until it got recently revised). I don't know which version of integer-gmp-1.0.1.0 was the intended one. They both have the same version number and neither seems more authoritative than the other to me. Had the Hackage one been the one that shipped, then I'm not sure that cabal-install-1.24 would have worked. Stack broke the moment what was on Hackage and what was in GHC bindists did not line up anymore. And with release notes mentioning incorrect version numbers, harder still to tell. But crucially, what *is* the policy around Cabal versions? This comment, https://ghc.haskell.org/trac/ghc/ticket/14558#comment:23 claims "if Stack doesn't support the version of Cabal that ships with a certain version of GHC, it shouldn't claim that it supports that version of GHC. The same applies to cabal-install". Is any build tool linked against Cabal-X by definition "not a supported configuration" by GHC-Z if it ships with Cabal-Y such that X < Y? > > * Stronger still, GHC should not switch to a new major release of a > > dependency at any time during feature freeze ahead of a release. E.g. if > > Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair > > game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet. > > I don't think this works, in terms of coupled dependencies. If/when > Cabal-3 is developed it will almost certainly be in tandem with GHC > support. Right. But switching from Cabal-2 to Cabal-3 (a hypothetical at this point) sounds like a whole new set of features transitively just made it into the compiler. Is that something we're happy to happen during feature freeze? > The general motivation of making a "feature freeze" more of a "freeze > all the moving parts, really" I do agree with. Having a real freeze is > part of a better release process, and it should allow all the > downstream consumers of everything more time to really catch up. This > is just one instance of that need. Agreed. > > Finally, a question for discussion: > > > > * Hackage allows revising the metadata of an uploaded package even without > > changing the version number. This happens routinely on Hackage today by the > > Hackage trustees. Should this be permitted for packages whose release is > > completely tied to that of GHC itself (like integer-gmp)? > > It is rare that this is needed, but the ability just served us well -- > editing integer-gmp to remove the new syntax was very useful, as it > let us fix up old stack nightlies. Like all revisions, these should be > made with some care and thought, but since we've just seen why it was > helpful, I'd hate to now say we can't do it again if some other > unforseen circumstance crops up. I don't disagree. But then we'd need to abandon any notion that versions of packages on Hackage and versions of packages in the GHC release tarball always match up. Might even be worth calling that out explicitly in the policy. From gershomb at gmail.com Thu Dec 14 00:27:13 2017 From: gershomb at gmail.com (Gershom B) Date: Wed, 13 Dec 2017 19:27:13 -0500 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: On Wed, Dec 13, 2017 at 7:06 PM, Boespflug, Mathieu wrote: > > But crucially, what *is* the policy around Cabal versions? This > comment, https://ghc.haskell.org/trac/ghc/ticket/14558#comment:23 > claims "if Stack doesn't support the version of Cabal that ships with > a certain version of GHC, it shouldn't claim that it supports that > version of GHC. The same applies to cabal-install". Is any build tool > linked against Cabal-X by definition "not a supported configuration" > by GHC-Z if it ships with Cabal-Y such that X < Y? My understanding is that this is the general thought, yes. In fact, I've been told that even though cabal-install 1.24 did end up working with the GHC 8.2.x series, the release notes, which were not updated properly, actually _were supposed_ to say cabal-install 2.0.0.0 was what was supported there. I believe future cabal-installs will warn when used with a ghc with a newer Cabal-lib than they were built against... > Right. But switching from Cabal-2 to Cabal-3 (a hypothetical at this > point) sounds like a whole new set of features transitively just made > it into the compiler. Is that something we're happy to happen during > feature freeze? Right. After freeze, the compiler itself shouldn't switch from Cabal-2 to Cabal-3. But I would imagine rather that the Cabal-3 tree and the compiler tree would be updated in tandem, and then the "freeze" would sort of apply to both in tandem as well. So there wouldn't be big changes after the freeze, but nor would the compiler be coupled to a _released_ lib. Rather, they would develop together, freeze together, and release together. > I don't disagree. But then we'd need to abandon any notion that > versions of packages on Hackage and versions of packages in the GHC > release tarball always match up. Might even be worth calling that out > explicitly in the policy. Not exactly. The tarball of the package on hackage should match the release tarball. Revisions don't change the tarball. They just add additional metadata to the index as well that cabal-install knows how to use in conjunction with the tarball: https://github.com/haskell-infra/hackage-trustees/blob/master/revisions-information.md#what-are-revisions --Gershom From cheater00 at gmail.com Thu Dec 14 00:28:37 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Thu, 14 Dec 2017 01:28:37 +0100 Subject: Long standing annoying issue in ghci In-Reply-To: References: <814bb618-30cc-6024-28b0-17c7c9f95a45@gmail.com> <572bbe0d-1c65-19ef-bbb1-473d395fc46e@gmail.com> Message-ID: I went ahead and did this for you. On Tue, Dec 12, 2017 at 8:44 PM, cheater00 cheater00 wrote: > Yes, it is worth doing it, because until Haskeline has been fixed and > integrated into ghci, the issue persists and needs to remain filed. > > > On Fri, 8 Dec 2017 18:25 MarLinn, wrote: >> >> I opened an issue on the Haskeline github >> (https://github.com/judah/haskeline/issues/72). >> >> But it seems to be completely Haskeline-side, so I'm not sure if it's >> worth re-opening the one for ghci? As missing documentation maybe? >> (BTW, I found this on the wiki: https://wiki.haskell.org/GHCi_in_colour. >> Might be a good place to put it, if linked.) >> >> If you want to, here are my test cases rewritten as ghci prompts: >> >> -- single line, positioning error >> :set prompt " \ESC[36m%\ESC[0m " >> -- single line, works >> :set prompt " \ESC[36m\STX%\ESC[0m\STX " >> -- multiline, bad output >> :set prompt "\ESC[32m\STX–––\ESC[0m\STX\n \ESC[36m\STX%\ESC[0m\STX " >> -- multiline, works but is inconsistent >> :set prompt "\ESC[32m–––\ESC[0m\n \ESC[36m\STX%\ESC[0m\STX " >> >> In my tests, the positioning errors consistently happen if there are any >> "unclosed" escape-sequences on the last line of the prompt, regardless of >> its length. Escape sequences on previous lines consistently create "weird >> characters", but don't influence the positioning. Also regardless of their >> lengths. That makes sense, as both sets of lines seem to be handled quite >> differently. >> >> Are multiline prompts even used by a lot of people? I like mine because it >> gives me a both a list of modules and a consistent cursor position. But >> maybe I'm the exception? >> >> Cheers. >> >> >> On 2017-12-07 23:15, cheater00 cheater00 wrote: >> >> Interesting. Would you mind reopening the issue and providing a buggy >> example? Amd alerting haskeline maintainers? How does it work on a 1 line >> prompt that is so long it wraps? >> >> >> On Thu, 7 Dec 2017 23:11 MarLinn, wrote: >>> >>> >>> > Here's what I use: >>> > >>> > :set prompt "\ESC[46m\STX%s>\ESC[39;49m\STX " >>> > >>> > I believe \STX is a signal to haskeline for control sequences. >>> > Documentation is here: >>> > https://github.com/judah/haskeline/wiki/ControlSequencesInPrompt >>> Note: If you're using a multi-line prompt, things may be different >>> again. I don't know what the rules are, but I found that if I put \STX >>> on any but the last line of prompts I get weird characters. The same >>> goes for any \SOH you might want to add for some reason. >>> >>> Cheers, >>> MarLinn >>> >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From cheater00 at gmail.com Thu Dec 14 00:42:56 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Thu, 14 Dec 2017 01:42:56 +0100 Subject: Cannot unsubscribe Message-ID: I went to http://mail.haskell.org/cgi-bin/mailman/options/ghc-devs logged in and clicked on "unsubscribe" and no unsubscription email shows up. What do i do to unsubscribe? Thanks From cheater00 at gmail.com Thu Dec 14 01:27:17 2017 From: cheater00 at gmail.com (cheater00 cheater00) Date: Thu, 14 Dec 2017 02:27:17 +0100 Subject: Cannot unsubscribe In-Reply-To: References: Message-ID: Got it. Got filed under "promotions". On Thu, Dec 14, 2017 at 1:42 AM, cheater00 cheater00 wrote: > I went to http://mail.haskell.org/cgi-bin/mailman/options/ghc-devs > logged in and clicked on "unsubscribe" and no unsubscription email > shows up. What do i do to unsubscribe? > > Thanks From m at tweag.io Thu Dec 14 09:27:59 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Thu, 14 Dec 2017 10:27:59 +0100 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: Hi Gershom, thanks for the extra input. So we've confirmed two facts: * GHC (intended to) ship with only Cabal-2.0 support, but there was a mistake in the release notes so this was unclear to downstream tooling authors. * Cabal-2.0 was released anywhere between slightly *after* and *exactly at the same as* GHC, despite GHC itself shipping with Cabal-2.0. I'm not too concerned by the first point: so long as Cabal-X does not introduce breaking changes, the fact that GHC-Y ultimately shipped with Cabal-X shouldn't be a problem. And this kind of bug in the release notes should go away provided more automation. The second one is more interesting. It is, as you point out, a product of GHC and Cabal being intimately linked and co-developed to a large extent. This leads to a simultaneous release that poses a concrete problem: * if new Cabal versions are used immediately in GHC, then that gives no time at all ahead of a GHC release for downstream tooling authors to adapt, because Cabal is, up until the point of the GHC release, a moving target. Three possible solutions: * Provided no API breaking changes in Cabal, if no metadata that ships with GHC uses new Cabal features for some period of time before release, then the problem goes away. * Or something close to what Manuel proposed in another thread: ship in GHC-X+1 the Cabal version that was co-developed during the development cycle of GHC-X. * Or a middle ground: make feature freeze a thing. Meaning that for a couple of months before a major GHC release, the major new Cabal isn't technically released yet, but like GHC itself within this period, it's pretty staid, so not so much a moving target, and something downstream tooling authors can possibly adapt to even without any grace period on new metadata features. This assumes that the 2 months of feature freeze are enough time for downstream tooling. Thoughts from any of those maintainers? On 14 December 2017 at 01:27, Gershom B wrote: > On Wed, Dec 13, 2017 at 7:06 PM, Boespflug, Mathieu wrote: >> >> But crucially, what *is* the policy around Cabal versions? This >> comment, https://ghc.haskell.org/trac/ghc/ticket/14558#comment:23 >> claims "if Stack doesn't support the version of Cabal that ships with >> a certain version of GHC, it shouldn't claim that it supports that >> version of GHC. The same applies to cabal-install". Is any build tool >> linked against Cabal-X by definition "not a supported configuration" >> by GHC-Z if it ships with Cabal-Y such that X < Y? > > My understanding is that this is the general thought, yes. In fact, > I've been told that even though cabal-install 1.24 did end up working > with the GHC 8.2.x series, the release notes, which were not updated > properly, actually _were supposed_ to say cabal-install 2.0.0.0 was > what was supported there. I believe future cabal-installs will warn > when used with a ghc with a newer Cabal-lib than they were built > against... > >> Right. But switching from Cabal-2 to Cabal-3 (a hypothetical at this >> point) sounds like a whole new set of features transitively just made >> it into the compiler. Is that something we're happy to happen during >> feature freeze? > > Right. After freeze, the compiler itself shouldn't switch from Cabal-2 > to Cabal-3. But I would imagine rather that the Cabal-3 tree and the > compiler tree would be updated in tandem, and then the "freeze" would > sort of apply to both in tandem as well. So there wouldn't be big > changes after the freeze, but nor would the compiler be coupled to a > _released_ lib. Rather, they would develop together, freeze together, > and release together. > >> I don't disagree. But then we'd need to abandon any notion that >> versions of packages on Hackage and versions of packages in the GHC >> release tarball always match up. Might even be worth calling that out >> explicitly in the policy. > > Not exactly. The tarball of the package on hackage should match the > release tarball. Revisions don't change the tarball. They just add > additional metadata to the index as well that cabal-install knows how > to use in conjunction with the tarball: > https://github.com/haskell-infra/hackage-trustees/blob/master/revisions-information.md#what-are-revisions > > --Gershom From ben at well-typed.com Thu Dec 14 17:56:54 2017 From: ben at well-typed.com (Ben Gamari) Date: Thu, 14 Dec 2017 12:56:54 -0500 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: <87ind9fb1g.fsf@ben-laptop.smart-cactus.org> "Boespflug, Mathieu" writes: > Hi Gerhom, > > On 14 December 2017 at 00:19, Gershom B wrote: >> >> Mathieu: >> >> I think the points about better tooling for documenting the correct >> claims in the release process are well taken. Updating the release >> notes manually leaves way too much room for error. >> Indeed, the release notes have historically been a massive headache. Happily, I wrote a bit of the necessary tooling to fix this a few weeks ago [1]. [1] e4dc2cd51902a8cd83476f861cf52996e5adf157 >> However, I think you are incorrect that GHC 8.2.1 and 8.2.2 did not >> have cabal-install 1.24 support. They did. it works with them. > > They did, and indeed Stack too worked just fine with them, but that > was assuming that integer-gmp-1.0.1.0 really was what was shipped in > the tarballs, not what it was on Hackage (until it got recently > revised). I don't know which version of integer-gmp-1.0.1.0 was the > intended one. They both have the same version number and neither seems > more authoritative than the other to me. Had the Hackage one been the > one that shipped, then I'm not sure that cabal-install-1.24 would have > worked. Stack broke the moment what was on Hackage and what was in GHC > bindists did not line up anymore. And with release notes mentioning > incorrect version numbers, harder still to tell. > I agree that the cabal files uploaded to Hackage should match what is released or, if not, there should be a very good reason for divergence. [snip] > >> The general motivation of making a "feature freeze" more of a "freeze >> all the moving parts, really" I do agree with. Having a real freeze is >> part of a better release process, and it should allow all the >> downstream consumers of everything more time to really catch up. This >> is just one instance of that need. > > Agreed. > Also agreed. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From ben at well-typed.com Thu Dec 14 18:28:38 2017 From: ben at well-typed.com (Ben Gamari) Date: Thu, 14 Dec 2017 13:28:38 -0500 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: <87fu8df9kf.fsf@ben-laptop.smart-cactus.org> "Boespflug, Mathieu" writes: > ---------- Forwarded message ---------- > From: Boespflug, Mathieu > Date: 13 December 2017 at 23:03 > Subject: Re: Release policies > To: Simon Peyton Jones > Cc: ghc-devops-group at haskell.org > > > [replying to ghc-devops-group@, which I assume based on your email's > content is the mailing list you intended.] > > Hi Simon, > > feedback from downstream consumers of Cabal metadata (e.g. build tool > authors) will be particularly useful for the discussion here. Here are my > thoughts as a bystander. > > It's worth trying to identify what problems came up during the integer-gmp > incident in Trac #14558: > > * GHC 8.2.1 shipped with integer-gmp-1.0.1.0 but the release notes said > otherwise. > > * GHC 8.2.1 shipped with Cabal-2.0.0.2, but specifically claimed in the > release notes that cabal-install-1.24 (and by implication any other build > tool based on Cabal-the-library version 1.24) was supported: "GHC 8.2 only > works with cabal-install version 1.24 or later. Please upgrade if you have > an older version of cabal-install." > > * GHC 8.2.2 also claimed Cabal-1.24 support. > > * GHC 8.2.1 was released in July 2017 with Cabal-2.0.0.2, a brand new major > release with breaking changes to the metadata format, without much lead > time for downstream tooling authors (like Stack) to adapt. > > * But actually if we look at their respective release notes, GHC 8.2.1 was > relased in July 2017, even though the Cabal website claims that > Cabal-2.0.0.2 was released in August 2017 (see > https://www.haskell.org/cabal/download.html). So it looks like GHC didn't > just not give enough lead time about an upstream dependency it shipped > with, it shipped with an unreleased version of Cabal! Perhaps this is true and I admit I wasn't happy about releasing the compiler without a Cabal release. However, there was no small amount of pressure to push forward nevertheless as the release was already quite late and the expectation was a Cabal release would be coming shortly after the GHC release. Coordination issues like this are a major reason why I think it would be better if GHC were more decoupled from its dependencies' upstreams. I think the approach that we discussed at ICFP, where library authors must upstream their version bumps before the freeze, just like any library, is perhaps one way forward although I suspect it exceptions will need to be made. > * Libraries that ship with GHC are usually also uploaded to Hackage, to > make the documentation easily accessible, but integer-gmp-1.0.1.0 was not > uploaded to Hackage until 4 months after the release. > > * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage differed from > the metadata that was actually in the source tarball of GHC-8.2.1 and > GHC-8.2.2. > > * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage included > Cabal-2.0 specific syntactic sugar, making the metadata unreadable using > any tooling that did not link against the Cabal-2.0.0.2 library (or any > later version). > > * It so happened that one particular version of one particular downstream > build tool, Stack, had a bug, compounding the bad effects of the previous > point. But a new release has now been made, and in any case that's not a > problem for GHC to solve. So let's keep that out of the discussion here. > > So I suggest we discuss ways to eliminate or reduce the likelihood of any > of the above problems from occurring again. Here are some ideas: > > * GHC should never under any circumstance ship with an unreleased version > of any independently maintained dependency. Cabal is one such dependency. > This should hold true for anything else. We could just add that policy to > the Release Policy. > We can adopt this as a policy, but doing so very well may mean that GHC will be subject to schedule slips beyond its control. We can hope that upstream maintainers will be responsive, but there is little we can do when they are not. Of course, if we adopt the policy of disallowing all but essentially core library bumps during the freeze then we may be able to mitigate this. > * Stronger still, GHC should not switch to a new major release of a > dependency at any time during feature freeze ahead of a release. E.g. if > Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair > game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet. > Yes, this I agree with. I think we can be more accomodating of minor bumps to fix bugs which may come to light during the freeze, but major releases should be avoided. > * The 3-release backwards compat rule should apply in all circumstances. > That means major version bumps of any library GHC ships with, including > base, should not imply any breaking change in the API's of any such library. > I'm not sure I follow what you are suggesting here. > * GHC does have control over reinstallable packages (like text and > bytestring): GHC need not ship with the latest versions of these, if indeed > they introduce breaking changes that would contravene the 3-release policy. > > * Note: today, users are effectively tied to whatever version of the > packages ships with GHC (i.e. the "reinstallable" bit is problematic today > for various technical reasons). That's why a breaking change in bytestring > is technically a breaking change in GHC. > I don't follow: Only a small fraction of packages, namely those that explicitly link against the `ghc` library, are tied. Can you clarify what technical reasons you are referring to here? > * The current release policy covers API stability, but what about metadata? > In the extreme, we could say a 3-release policy applies to metadata too. > Meaning, all metadata shipping with GHC now and in the next 2 releases > should be parseable by today's version of Cabal and downstream tooling. Is > such a long lead time necessary? That's for build tool authors to say, and > a point to negotiate with GHC devs. > > * Because there are far fewer consumers of metadata than consumers of say > base, I think shorter lead time is reasonable. At the other extreme, it > could even be just the few months during feature freeze. Right, I wouldn't be opposed to striving for this in principle although I think we should be aware that breakage is at times necessary and the policy should accomodate this. I think the important thing is that we be aware of when we are breaking metadata compatibility and convey this to our users. > * The release notes bugs mentioned above and the lack of consistent upload > to Hackage are a symptom of lack of release automation, I suspect. That's > how to fix it, but we could also spell out in the Release Policy that GHC > libraries should all be on Hackage from the day of release. > Yes, the hackage uploads have historically been handled manually. I have and AFAIK most release managers coming before me have generally deferred this to Herbert as is quite meticulous. However, I think it would be nice if we could remove the need for human intervention entirely. > Finally, a question for discussion: > > * Hackage allows revising the metadata of an uploaded package even without > changing the version number. This happens routinely on Hackage today by the > Hackage trustees. Should this be permitted for packages whose release is > completely tied to that of GHC itself (like integer-gmp)? > If there is a bug in the metadata then I don't think we should necessarily tie our hands from fixing it. However, we should clearly take great care when making such changes to avoid further breakage. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From m at tweag.io Thu Dec 14 21:19:48 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Thu, 14 Dec 2017 22:19:48 +0100 Subject: Fwd: Release policies In-Reply-To: <87ind9fb1g.fsf@ben-laptop.smart-cactus.org> References: <87ind9fb1g.fsf@ben-laptop.smart-cactus.org> Message-ID: >> On 14 December 2017 at 00:19, Gershom B wrote: >>> >>> Mathieu: >>> >>> I think the points about better tooling for documenting the correct >>> claims in the release process are well taken. Updating the release >>> notes manually leaves way too much room for error. >>> > Indeed, the release notes have historically been a massive headache. > Happily, I wrote a bit of the necessary tooling to fix this a few weeks > ago [1]. > > [1] e4dc2cd51902a8cd83476f861cf52996e5adf157 Very cool! From m at tweag.io Thu Dec 14 21:59:38 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Thu, 14 Dec 2017 22:59:38 +0100 Subject: Fwd: Release policies In-Reply-To: <87fu8df9kf.fsf@ben-laptop.smart-cactus.org> References: <87fu8df9kf.fsf@ben-laptop.smart-cactus.org> Message-ID: >> * But actually if we look at their respective release notes, GHC 8.2.1 was >> relased in July 2017, even though the Cabal website claims that >> Cabal-2.0.0.2 was released in August 2017 (see >> https://www.haskell.org/cabal/download.html). So it looks like GHC didn't >> just not give enough lead time about an upstream dependency it shipped >> with, it shipped with an unreleased version of Cabal! > > Perhaps this is true and I admit I wasn't happy about releasing the compiler > without a Cabal release. However, there was no small amount of pressure to > push forward nevertheless as the release was already quite late and the > expectation was a Cabal release would be coming shortly after the GHC > release. Coordination issues like this are a major reason why I think it > would be better if GHC were more decoupled from its dependencies' > upstreams. I have the same sentiment. Do you think this is feasible in the case of Cabal? Even if say something like Backpack shows up all over again? If so, are there concrete changes that could be made to support the following workflow: * upstreams develop their respective libraries independently of GHC using their own testing. * If they want GHC to ship a newer version, they create a Diff. As Manuel proposed in a separate thread, this must be before feature freeze, unless... * ... a critical issue is found in the upstream release, in which case upstream cuts a new release, and submits a Diff again. * GHC always has the option to back out an offending upgrade, and revert to a known good version. In fact it should preemptively do so while waiting for a new release of upstream. * In general, GHC does not track git commits of upstream dependencies in an unknown state of quality, but tracks vetted and tested releases instead. >> * GHC should never under any circumstance ship with an unreleased version >> of any independently maintained dependency. Cabal is one such dependency. >> This should hold true for anything else. We could just add that policy to >> the Release Policy. >> > We can adopt this as a policy, but doing so very well may mean that GHC > will be subject to schedule slips beyond its control. We can hope that > upstream maintainers will be responsive, but there is little we can do > when they are not. Why not? If GHC only ever tracks upstream releases (as I think it should), not git commits in unknown state, then we don't need upstream maintainer responsiveness. Because at any point in time, all GHC dependencies are already released. If GHC should ship with a newer version of a dependency, the onus is on the upstream maintainer to submit a Diff asking GHC to move to the latest version. Are there good reasons for GHC to track patches not upstreamed and released? >> * Stronger still, GHC should not switch to a new major release of a >> dependency at any time during feature freeze ahead of a release. E.g. if >> Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair >> game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet. >> > Yes, this I agree with. I think we can be more accomodating of minor > bumps to fix bugs which may come to light during the freeze, but major > releases should be avoided. Agreed. >> * The 3-release backwards compat rule should apply in all circumstances. >> That means major version bumps of any library GHC ships with, including >> base, should not imply any breaking change in the API's of any such library. >> > I'm not sure I follow what you are suggesting here. Nothing new: just that the 3-release policy doesn't just apply to base, but also anything else that happens to ship with GHC (including Cabal). Perhaps that already the policy? >> * GHC does have control over reinstallable packages (like text and >> bytestring): GHC need not ship with the latest versions of these, if indeed >> they introduce breaking changes that would contravene the 3-release policy. >> >> * Note: today, users are effectively tied to whatever version of the >> packages ships with GHC (i.e. the "reinstallable" bit is problematic today >> for various technical reasons). That's why a breaking change in bytestring >> is technically a breaking change in GHC. >> > I don't follow: Only a small fraction of packages, namely those that > explicitly link against the `ghc` library, are tied. Can you clarify > what technical reasons you are referring to here? Builds often fail for strange reasons when both bytestring-0.10.2 and bytestring-0.10.1 are in scope. Some libraries in a build plan pick up one version where some pick up another. The situation here might well be better than it used to be, but at this point in time Stackage works hard to ensure that in any given package set, there is *exactly one* version of any package. That's why Stackage aligns versions of core packages to whatever ships with the GHC version the package set is based on. So in this sense, AFAIK a bug in bytestring can't be worked around by reinstalling bytestring (not in Stackage land): it requires waiting for the next GHC version that will ship with a new version of bytestring with that bug fixed. I'm not entirely familiar with all Stackage details so Michael - please step in if this is incorrect. >> * Because there are far fewer consumers of metadata than consumers of say >> base, I think shorter lead time is reasonable. At the other extreme, it >> could even be just the few months during feature freeze. > > Right, I wouldn't be opposed to striving for this in principle although > I think we should be aware that breakage is at times necessary and the > policy should accomodate this. I think the important thing is that we be > aware of when we are breaking metadata compatibility and convey this to > our users. That sounds reasonable. But when have we ever needed to use non backwards compatible metadata ASAP? The integer-gmp example was a case in point: the Cabal-2.0 feature it was using was merely syntactic sugar at this point, since no tool *yet* interprets the new constructs in any special way AFAIK. >> * The release notes bugs mentioned above and the lack of consistent upload >> to Hackage are a symptom of lack of release automation, I suspect. That's >> how to fix it, but we could also spell out in the Release Policy that GHC >> libraries should all be on Hackage from the day of release. >> > Yes, the hackage uploads have historically been handled manually. I have > and AFAIK most release managers coming before me have generally deferred > this to Herbert as is quite meticulous. However, I think it would be > nice if we could remove the need for human intervention entirely. Indeed. Can be part of the deploy step in the continuous integration pipeline. From nboldi at elte.hu Fri Dec 15 05:46:14 2017 From: nboldi at elte.hu (=?UTF-8?B?TsOpbWV0aCBCb2xkaXpzw6Fy?=) Date: Fri, 15 Dec 2017 14:46:14 +0900 Subject: GHC-API unloading from external interpreter Message-ID: Dear GHC Developers, I'm using the GHC API to load Haskell modules and extract their syntax tree. I need to generate code where TH is used (by default I do in-memory linking). I've run into some trouble with external interpreter. When -fexternal-interpreter is NOT set, I use Linker.unload to remove bytecode from the global linker before reloading modules. However it is not applicable when external interpreter is used and I could not find corresponding functionality in the GHCi module (where communication with external interpreter is implemented). I've recently created 2 tickets related to this question: https://ghc.haskell.org/trac/ghc/ticket/14576, https://ghc.haskell.org/trac/ghc/ticket/14577 Can someone help me with this problem? Best Regards, Boldizsár Németh From moritz at lichtzwerge.de Fri Dec 15 06:04:02 2017 From: moritz at lichtzwerge.de (Moritz Angermann) Date: Fri, 15 Dec 2017 14:04:02 +0800 Subject: GHC-API unloading from external interpreter In-Reply-To: References: Message-ID: <82C197A9-8783-4669-BF00-A0BCE834D0C6@lichtzwerge.de> Hi, I believe you are looking for the `Message` GADT in `GHCi.Message` ``` -- ----------------------------------------------------------------------------- -- The RPC protocol between GHC and the interactive server -- | A @Message a@ is a message that returns a value of type @a at . -- These are requests sent from GHC to the server. data Message a where ``` maybe specifically the `UnloadObj` message. Cheers, Moritz > On Dec 15, 2017, at 1:46 PM, Németh Boldizsár wrote: > > Dear GHC Developers, > > I'm using the GHC API to load Haskell modules and extract their syntax tree. I need to generate code where TH is used (by default I do in-memory linking). I've run into some trouble with external interpreter. When -fexternal-interpreter is NOT set, I use Linker.unload to remove bytecode from the global linker before reloading modules. However it is not applicable when external interpreter is used and I could not find corresponding functionality in the GHCi module (where communication with external interpreter is implemented). > > I've recently created 2 tickets related to this question: https://ghc.haskell.org/trac/ghc/ticket/14576, https://ghc.haskell.org/trac/ghc/ticket/14577 > > Can someone help me with this problem? > > Best Regards, > Boldizsár Németh > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From michael at snoyman.com Fri Dec 15 07:42:55 2017 From: michael at snoyman.com (Michael Snoyman) Date: Fri, 15 Dec 2017 10:42:55 +0300 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: On Thu, Dec 14, 2017 at 12:27 PM, Boespflug, Mathieu wrote: [snip] * Or a middle ground: make feature freeze a thing. Meaning that for a > couple of months before a major GHC release, the major new Cabal isn't > technically released yet, but like GHC itself within this period, it's > pretty staid, so not so much a moving target, and something downstream > tooling authors can possibly adapt to even without any grace period on > new metadata features. This assumes that the 2 months of feature > freeze are enough time for downstream tooling. Thoughts from any of > those maintainers? > > Short answer: if there's a clear idea in advance of when this feature freeze is going to happen, I think we can coordinate releases of downstream tooling (Stack being the most important, but stackage-curator playing in as well) so that 2 months is sufficient. I'll talk with the rest of the Stack team to see if there are any concerns. Longer answer: Stack intentionally avoids depending on the internals of Cabal wherever possible. Instead of calling library functions directly from within Haskell code to perform builds, for example, it interacts with the Setup.hs files over their command line interface.[1] This has two results: * Stack can usually start using new GHC/Cabal versions without a new Stack release, since it's just shelling out for the actual build * There's not usually very much code churn needed in Stack to upgrade to a newer Cabal release This past release was an exception because of all of the changes that landed, both the new cabal grammar to support the ^>= operator (making the old parser incapable of lossily parsing new files) and API changes (I think mostly around Backpack, though there was some code cleanup as well). In particular, the main interface we need from Cabal—the package description data types and parser—changed significantly enough that it took significant effort to upgrade. There were also new features added (like sub libraries and foreign libraries) that weren't immediately supported by the old Stack version, and had to be manually added in. Tying this up: generally upgrading to a new Cabal release should be fine, and the only concern I'd have is fitting it into a release schedule with Stack. The complications that could slow that down are: * Changes to the command line interface that Stack uses (hopefully those are exceedingly rare) * Major overhauls to the Stack-facing API Michael [1] This allows for more reproducible builds of older snapshots, insuring that the exact same Cabal library is performing the builds -------------- next part -------------- An HTML attachment was scrubbed... URL: From m at tweag.io Fri Dec 15 08:41:36 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Fri, 15 Dec 2017 09:41:36 +0100 Subject: Fwd: Release policies In-Reply-To: References: Message-ID: Thanks for the feedback, Michael. Manuel, I believe you are also a Cabal-the-library consumer in Haskell For Mac? Michael, you brought up another problem tangentially related to the original integer-gmp issue but that was not in my original list earlier in this thread: * Cabal-2.0.0 had breaking changes in the API. This means that by association GHC itself broke BC, because it shipped with Cabal-2.0, without the usual grace period. Now, there are far fewer users of Cabal than of base. All, Michael in his previous email seems to be okay with breaking changes in Cabal given the conditions he stated (2 months grace period, advance notice of when the 2 months start). And perhaps this points to the lack of a need for the regular grace period applying to Cabal. How many other users of Cabal-the-library are there? In principle, every single Hackage package out there, which all have a Setup.hs script. Most of them are trivial, but how many did break because of these API changes? I for one am pretty happy for Cabal to move fast, but I'm concerned that these breaking changes happened without any kind of advance notice. To Simon's original point - there does not to be a clear policy and a good process surrounding Cabal itself and other GHC dependencies. So far we discussed mostly metadata changes, not API changes. And to be clear, folks did get some (post facto) notice in September: http://coldwa.st/e/blog/2017-09-09-Cabal-2-0.html. That's helpful, but I submit that in the future this really should be part of the GHC release announcement (which happened over a month before that), and in fact a migration guide circulated before the feature freeze, so downstream tooling authors can adapt. If this is not possible, then perhaps it's premature for GHC to include that given Cabal release. Again, GHC should always have the option to stick to the old Cabal version until things get ironed out. On 15 December 2017 at 08:42, Michael Snoyman wrote: > > > On Thu, Dec 14, 2017 at 12:27 PM, Boespflug, Mathieu wrote: > > [snip] > >> * Or a middle ground: make feature freeze a thing. Meaning that for a >> couple of months before a major GHC release, the major new Cabal isn't >> technically released yet, but like GHC itself within this period, it's >> pretty staid, so not so much a moving target, and something downstream >> tooling authors can possibly adapt to even without any grace period on >> new metadata features. This assumes that the 2 months of feature >> freeze are enough time for downstream tooling. Thoughts from any of >> those maintainers? >> > > Short answer: if there's a clear idea in advance of when this feature freeze > is going to happen, I think we can coordinate releases of downstream tooling > (Stack being the most important, but stackage-curator playing in as well) so > that 2 months is sufficient. I'll talk with the rest of the Stack team to > see if there are any concerns. > > Longer answer: Stack intentionally avoids depending on the internals of > Cabal wherever possible. Instead of calling library functions directly from > within Haskell code to perform builds, for example, it interacts with the > Setup.hs files over their command line interface.[1] This has two results: > > * Stack can usually start using new GHC/Cabal versions without a new Stack > release, since it's just shelling out for the actual build > * There's not usually very much code churn needed in Stack to upgrade to a > newer Cabal release > > This past release was an exception because of all of the changes that > landed, both the new cabal grammar to support the ^>= operator (making the > old parser incapable of lossily parsing new files) and API changes (I think > mostly around Backpack, though there was some code cleanup as well). In > particular, the main interface we need from Cabal—the package description > data types and parser—changed significantly enough that it took significant > effort to upgrade. There were also new features added (like sub libraries > and foreign libraries) that weren't immediately supported by the old Stack > version, and had to be manually added in. > > Tying this up: generally upgrading to a new Cabal release should be fine, > and the only concern I'd have is fitting it into a release schedule with > Stack. The complications that could slow that down are: > > * Changes to the command line interface that Stack uses (hopefully those are > exceedingly rare) > * Major overhauls to the Stack-facing API > > Michael > > [1] This allows for more reproducible builds of older snapshots, insuring > that the exact same Cabal library is performing the builds From simonpj at microsoft.com Fri Dec 15 09:10:53 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 15 Dec 2017 09:10:53 +0000 Subject: Fwd: Release policies In-Reply-To: References: <87fu8df9kf.fsf@ben-laptop.smart-cactus.org> Message-ID: | at this point in time Stackage works | hard to ensure that in any given package set, there is *exactly one* | version of any package. That's why Stackage aligns versions of core | packages to whatever ships with the GHC version the package set is | based on. Ah. It follows that if Stackage wants to find a set of packages compatible with GHC-X, then it must pick precisely the version of bytestring that GHC-X depends on. (I'm assuming here that GHC-X fixes a particular version, even though bytestring is reinstallable? Certainly, a /distribution/ of GHC-X will do so.) If meanwhile the bytestring author has decided to use a newer version of .cabal file syntax, then GHC-X is stuck with that. Or would have to go back to an earlier version of bytestring, for which there might be material disadvantages. That would make it hard to GHC to guarantee to downstream tools that it doesn't depend on any packages whose .cabal files use new syntax; which is where this thread started. Hmm. I wonder if I have understood this correctly. Perhaps Michael would like to comment? Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of | Boespflug, Mathieu | Sent: 14 December 2017 22:00 | To: Ben Gamari | Cc: ghc-devs | Subject: Re: Fwd: Release policies | | >> * But actually if we look at their respective release notes, GHC | >> 8.2.1 was relased in July 2017, even though the Cabal website | claims | >> that | >> Cabal-2.0.0.2 was released in August 2017 (see | >> https://www.haskell.org/cabal/download.html). So it looks like GHC | >> didn't just not give enough lead time about an upstream dependency | it | >> shipped with, it shipped with an unreleased version of Cabal! | > | > Perhaps this is true and I admit I wasn't happy about releasing the | > compiler without a Cabal release. However, there was no small amount | > of pressure to push forward nevertheless as the release was already | > quite late and the expectation was a Cabal release would be coming | > shortly after the GHC release. Coordination issues like this are a | > major reason why I think it would be better if GHC were more | decoupled from its dependencies' | > upstreams. | | I have the same sentiment. Do you think this is feasible in the case | of Cabal? Even if say something like Backpack shows up all over again? | If so, are there concrete changes that could be made to support the | following workflow: | | * upstreams develop their respective libraries independently of GHC | using their own testing. | * If they want GHC to ship a newer version, they create a Diff. As | Manuel proposed in a separate thread, this must be before feature | freeze, unless... | * ... a critical issue is found in the upstream release, in which case | upstream cuts a new release, and submits a Diff again. | * GHC always has the option to back out an offending upgrade, and | revert to a known good version. In fact it should preemptively do so | while waiting for a new release of upstream. | * In general, GHC does not track git commits of upstream dependencies | in an unknown state of quality, but tracks vetted and tested releases | instead. | | >> * GHC should never under any circumstance ship with an unreleased | >> version of any independently maintained dependency. Cabal is one | such dependency. | >> This should hold true for anything else. We could just add that | >> policy to the Release Policy. | >> | > We can adopt this as a policy, but doing so very well may mean that | > GHC will be subject to schedule slips beyond its control. We can | hope | > that upstream maintainers will be responsive, but there is little we | > can do when they are not. | | Why not? If GHC only ever tracks upstream releases (as I think it | should), not git commits in unknown state, then we don't need upstream | maintainer responsiveness. Because at any point in time, all GHC | dependencies are already released. If GHC should ship with a newer | version of a dependency, the onus is on the upstream maintainer to | submit a Diff asking GHC to move to the latest version. Are there good | reasons for GHC to track patches not upstreamed and released? | | >> * Stronger still, GHC should not switch to a new major release of a | >> dependency at any time during feature freeze ahead of a release. | E.g. | >> if | >> Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe | it's | >> fair game to include in GHC. But not if Cabal-3.0.0 hasn't shipped | yet. | >> | > Yes, this I agree with. I think we can be more accomodating of minor | > bumps to fix bugs which may come to light during the freeze, but | major | > releases should be avoided. | | Agreed. | | >> * The 3-release backwards compat rule should apply in all | circumstances. | >> That means major version bumps of any library GHC ships with, | >> including base, should not imply any breaking change in the API's | of any such library. | >> | > I'm not sure I follow what you are suggesting here. | | Nothing new: just that the 3-release policy doesn't just apply to | base, but also anything else that happens to ship with GHC (including | Cabal). Perhaps that already the policy? | | >> * GHC does have control over reinstallable packages (like text and | >> bytestring): GHC need not ship with the latest versions of these, | if | >> indeed they introduce breaking changes that would contravene the 3- | release policy. | >> | >> * Note: today, users are effectively tied to whatever version of | the | >> packages ships with GHC (i.e. the "reinstallable" bit is | problematic | >> today for various technical reasons). That's why a breaking change | in | >> bytestring is technically a breaking change in GHC. | >> | > I don't follow: Only a small fraction of packages, namely those that | > explicitly link against the `ghc` library, are tied. Can you clarify | > what technical reasons you are referring to here? | | Builds often fail for strange reasons when both bytestring-0.10.2 and | bytestring-0.10.1 are in scope. Some libraries in a build plan pick up | one version where some pick up another. The situation here might well | be better than it used to be, but at this point in time Stackage works | hard to ensure that in any given package set, there is *exactly one* | version of any package. That's why Stackage aligns versions of core | packages to whatever ships with the GHC version the package set is | based on. | | So in this sense, AFAIK a bug in bytestring can't be worked around by | reinstalling bytestring (not in Stackage land): it requires waiting | for the next GHC version that will ship with a new version of | bytestring with that bug fixed. I'm not entirely familiar with all | Stackage details so Michael - please step in if this is incorrect. | | >> * Because there are far fewer consumers of metadata than consumers | of | >> say base, I think shorter lead time is reasonable. At the other | >> extreme, it could even be just the few months during feature | freeze. | > | > Right, I wouldn't be opposed to striving for this in principle | > although I think we should be aware that breakage is at times | > necessary and the policy should accomodate this. I think the | important | > thing is that we be aware of when we are breaking metadata | > compatibility and convey this to our users. | | That sounds reasonable. But when have we ever needed to use non | backwards compatible metadata ASAP? The integer-gmp example was a case | in point: the Cabal-2.0 feature it was using was merely syntactic | sugar at this point, since no tool *yet* interprets the new constructs | in any special way AFAIK. | | >> * The release notes bugs mentioned above and the lack of consistent | >> upload to Hackage are a symptom of lack of release automation, I | >> suspect. That's how to fix it, but we could also spell out in the | >> Release Policy that GHC libraries should all be on Hackage from the | day of release. | >> | > Yes, the hackage uploads have historically been handled manually. I | > have and AFAIK most release managers coming before me have generally | > deferred this to Herbert as is quite meticulous. However, I think it | > would be nice if we could remove the need for human intervention | entirely. | | Indeed. Can be part of the deploy step in the continuous integration | pipeline. | _______________________________________________ | ghc-devs mailing list | ghc-devs at haskell.org | https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.h | askell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- | devs&data=04%7C01%7Csimonpj%40microsoft.com%7Cc036e34b7c204915be3708d5 | 433e1bc5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6364888564139091 | 21%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI | 6Ik1haWwifQ%3D%3D%7C- | 1&sdata=JifR49MJxw8tGDXFCmZJcNy8yd4KQyM9upeRQPIL9TI%3D&reserved=0 From mikhail.glushenkov at gmail.com Fri Dec 15 09:19:37 2017 From: mikhail.glushenkov at gmail.com (Mikhail Glushenkov) Date: Fri, 15 Dec 2017 09:19:37 +0000 Subject: [GHC DevOps Group] Fwd: Release policies In-Reply-To: References: Message-ID: Hi Mathieu, On 15 December 2017 at 08:41, Boespflug, Mathieu wrote: > How many other > users of Cabal-the-library are there? In principle, every single > Hackage package out there, which all have a Setup.hs script. This is not such a big deal now, because build-type: Custom packages can declare the dependencies of the Setup script via the custom-setup stanza. By default (when there's no custom-setup stanza), Cabal < 2 is chosen. From mikhail.glushenkov at gmail.com Fri Dec 15 09:26:28 2017 From: mikhail.glushenkov at gmail.com (Mikhail Glushenkov) Date: Fri, 15 Dec 2017 09:26:28 +0000 Subject: [GHC DevOps Group] Fwd: Release policies In-Reply-To: References: Message-ID: Hi Mathieu, On 15 December 2017 at 08:41, Boespflug, Mathieu wrote: > In principle, every single > Hackage package out there, which all have a Setup.hs script. Also, the build-type: Simple packages (which are the vast majority on Hackage) are not affected at all, because they all use a default built-in setup script. From michael at snoyman.com Fri Dec 15 09:27:06 2017 From: michael at snoyman.com (Michael Snoyman) Date: Fri, 15 Dec 2017 12:27:06 +0300 Subject: Fwd: Release policies In-Reply-To: References: <87fu8df9kf.fsf@ben-laptop.smart-cactus.org> Message-ID: On Fri, Dec 15, 2017 at 12:10 PM, Simon Peyton Jones via ghc-devs < ghc-devs at haskell.org> wrote: > | at this point in time Stackage works > | hard to ensure that in any given package set, there is *exactly one* > | version of any package. That's why Stackage aligns versions of core > | packages to whatever ships with the GHC version the package set is > | based on. > > Ah. It follows that if Stackage wants to find a set of packages compatible > with GHC-X, then it must pick precisely the version of bytestring that > GHC-X depends on. (I'm assuming here that GHC-X fixes a particular > version, even though bytestring is reinstallable? Certainly, a > /distribution/ of GHC-X will do so.) > > If meanwhile the bytestring author has decided to use a newer version of > .cabal file syntax, then GHC-X is stuck with that. Or would have to go > back to an earlier version of bytestring, for which there might be material > disadvantages. > > That would make it hard to GHC to guarantee to downstream tools that it > doesn't depend on any packages whose .cabal files use new syntax; which is > where this thread started. > > Hmm. I wonder if I have understood this correctly. Perhaps Michael would > like to comment? > > > Stackage does in fact pin snapshots down to precisely one version of each package. And in the case of non-reinstallable packages, it ensures that those package's transitive dependency set are pinned to the same version that ships with GHC. I know there's work around making more package reinstallable, and the ghc package itself may have crossed that line now, but for the moment Stackage assumes that the ghc package and all its dependencies are non-reinstallable. Therefore bytestring, process, containers, transformers, and many more will be pinned in a Stackage snapshot. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Fri Dec 15 15:23:29 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 15 Dec 2017 15:23:29 +0000 Subject: Fwd: Release policies In-Reply-To: References: <87fu8df9kf.fsf@ben-laptop.smart-cactus.org> Message-ID: Therefore bytestring, process, containers, transformers, and many more will be pinned in a Stackage snapshot. So that would make it significantly harder, even impossible, for GHC releases to make any promises about the .cabal-file format of these packages, wouldn’t it? So even if we made some back-compat promise for non-reinstallable things like integer-gmp or base, we could not do so for bytestring. Does that give you cause for concern? After all, it’s where Trac #14558 started. I don’t see how we can avoid the original problem, since we don’t have control over the .cabal file format used by the authors of the packages on which we depend. Still: GHC can only depend on a package P if the version X of Cabal that GHC is using can parse P.cabal. So if we fix Cabal-X some while in advance and announce that, perhaps that would serve the purpose? Simon From: Michael Snoyman [mailto:michael at snoyman.com] Sent: 15 December 2017 09:27 To: Simon Peyton Jones Cc: Boespflug, Mathieu ; Ben Gamari ; ghc-devs Subject: Re: Fwd: Release policies On Fri, Dec 15, 2017 at 12:10 PM, Simon Peyton Jones via ghc-devs > wrote: | at this point in time Stackage works | hard to ensure that in any given package set, there is *exactly one* | version of any package. That's why Stackage aligns versions of core | packages to whatever ships with the GHC version the package set is | based on. Ah. It follows that if Stackage wants to find a set of packages compatible with GHC-X, then it must pick precisely the version of bytestring that GHC-X depends on. (I'm assuming here that GHC-X fixes a particular version, even though bytestring is reinstallable? Certainly, a /distribution/ of GHC-X will do so.) If meanwhile the bytestring author has decided to use a newer version of .cabal file syntax, then GHC-X is stuck with that. Or would have to go back to an earlier version of bytestring, for which there might be material disadvantages. That would make it hard to GHC to guarantee to downstream tools that it doesn't depend on any packages whose .cabal files use new syntax; which is where this thread started. Hmm. I wonder if I have understood this correctly. Perhaps Michael would like to comment? Stackage does in fact pin snapshots down to precisely one version of each package. And in the case of non-reinstallable packages, it ensures that those package's transitive dependency set are pinned to the same version that ships with GHC. I know there's work around making more package reinstallable, and the ghc package itself may have crossed that line now, but for the moment Stackage assumes that the ghc package and all its dependencies are non-reinstallable. Therefore bytestring, process, containers, transformers, and many more will be pinned in a Stackage snapshot. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at well-typed.com Fri Dec 15 15:32:13 2017 From: ben at well-typed.com (Ben Gamari) Date: Fri, 15 Dec 2017 10:32:13 -0500 Subject: [GHC DevOps Group] Fwd: Release policies In-Reply-To: References: Message-ID: <87tvwsdn2m.fsf@ben-laptop.smart-cactus.org> "Boespflug, Mathieu" writes: > Thanks for the feedback, Michael. > > Manuel, I believe you are also a Cabal-the-library consumer in Haskell For Mac? > > Michael, you brought up another problem tangentially related to the > original integer-gmp issue but that was not in my original list > earlier in this thread: > > * Cabal-2.0.0 had breaking changes in the API. > > This means that by association GHC itself broke BC, because it shipped > with Cabal-2.0, without the usual grace period. > I'm a bit confused; by "the usual grace period" do you mean the Core Library Committee's three release policy? AFAIK this policy only applies to libraries under CLC control (e.g. those defined in the Report and perhaps template-haskell). The only other compatibility guarantee that GHC provides is the "two release policy", which stipulates that GHC should be bootstrappable with the two most recent major GHC releases. GHC has never, as far as I am aware, considered major version bumps of its dependencies to be part of its interface. We perform a major bump of most libraries with nearly every release [1]. Perhaps I've misunderstood your statement? Cheers, - Ben [1] https://ghc.haskell.org/trac/ghc/wiki/Commentary/Libraries/VersionHistory -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From m at tweag.io Fri Dec 15 17:37:18 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Fri, 15 Dec 2017 18:37:18 +0100 Subject: [GHC DevOps Group] Fwd: Release policies In-Reply-To: <87tvwsdn2m.fsf@ben-laptop.smart-cactus.org> References: <87tvwsdn2m.fsf@ben-laptop.smart-cactus.org> Message-ID: On 15 December 2017 at 16:32, Ben Gamari wrote: > "Boespflug, Mathieu" writes: > >> Thanks for the feedback, Michael. >> >> Manuel, I believe you are also a Cabal-the-library consumer in Haskell For Mac? >> >> Michael, you brought up another problem tangentially related to the >> original integer-gmp issue but that was not in my original list >> earlier in this thread: >> >> * Cabal-2.0.0 had breaking changes in the API. >> >> This means that by association GHC itself broke BC, because it shipped >> with Cabal-2.0, without the usual grace period. >> > I'm a bit confused; by "the usual grace period" do you mean the Core > Library Committee's three release policy? I did mean that one, yes. That was my question earlier - is Cabal along with *all* core libraries covered by the CLC's 3-release policy? The *Core Libraries* Committee (CLC) defines a "core library" as "Our definition of "core library" is a library that ships with GHC." (See https://wiki.haskell.org/Library_submissions#The_Libraries) But indeed, Cabal is not part of the CLC libraries list on that page. So I'm confused too: a) is Cabal a "core library", b) does that mean Cabal is bound by the 3-release policy? > GHC has never, as far as I am aware, considered major version bumps of > its dependencies to be part of its interface. We perform a major bump of > most libraries with nearly every release [1]. Yes, and major version bumps are not necessarily BC. From gershomb at gmail.com Fri Dec 15 18:03:18 2017 From: gershomb at gmail.com (Gershom B) Date: Fri, 15 Dec 2017 13:03:18 -0500 Subject: [GHC DevOps Group] Fwd: Release policies In-Reply-To: References: <87tvwsdn2m.fsf@ben-laptop.smart-cactus.org> Message-ID: On Fri, Dec 15, 2017 at 12:37 PM, Boespflug, Mathieu wrote: > I did mean that one, yes. That was my question earlier - is Cabal > along with *all* core libraries covered by the CLC's 3-release policy? The 3 release policy does not apply to all libraries maintained by the CLC. It applies to "basic libraries": https://prime.haskell.org/wiki/Libraries/3-Release-Policy The general notion is that it applies to things surrounding the prelude, base, and things perhaps adjacent to that. That is to say, more or less, things that would be defined in the libraries section of the Haskell Report: https://www.haskell.org/onlinereport/haskell2010/haskellpa2.html > The *Core Libraries* Committee (CLC) defines a "core library" as > > "Our definition of "core library" is a library that ships with GHC." > (See https://wiki.haskell.org/Library_submissions#The_Libraries) By that definition, "Cabal" might well be listed in the core libraries that are not maintained by the CLC on that page, and it is perhaps an oversight that it is not? I would ask them. -g From mikhail.glushenkov at gmail.com Fri Dec 15 18:03:44 2017 From: mikhail.glushenkov at gmail.com (Mikhail Glushenkov) Date: Fri, 15 Dec 2017 18:03:44 +0000 Subject: [GHC DevOps Group] Fwd: Release policies In-Reply-To: References: <87tvwsdn2m.fsf@ben-laptop.smart-cactus.org> Message-ID: Hi Mathieu, On 15 December 2017 at 17:37, Boespflug, Mathieu wrote: > b) does that mean > Cabal is bound by the 3-release policy? Historically, it hasn't been the case, and I can say that the 3-release backwards compat policy would be an absolute nightmare for lib:Cabal to implement. From m at tweag.io Fri Dec 15 18:14:49 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Fri, 15 Dec 2017 19:14:49 +0100 Subject: [GHC DevOps Group] Fwd: Release policies In-Reply-To: References: <87tvwsdn2m.fsf@ben-laptop.smart-cactus.org> Message-ID: On 15 December 2017 at 19:03, Gershom B wrote: > On Fri, Dec 15, 2017 at 12:37 PM, Boespflug, Mathieu wrote: >> I did mean that one, yes. That was my question earlier - is Cabal >> along with *all* core libraries covered by the CLC's 3-release policy? > > The 3 release policy does not apply to all libraries maintained by the > CLC. It applies to "basic libraries": > https://prime.haskell.org/wiki/Libraries/3-Release-Policy That clarifies it, thanks! From nboldi at elte.hu Sat Dec 16 03:57:19 2017 From: nboldi at elte.hu (=?UTF-8?B?TsOpbWV0aCBCb2xkaXpzw6Fy?=) Date: Sat, 16 Dec 2017 12:57:19 +0900 Subject: GHC-API unloading from external interpreter In-Reply-To: <82C197A9-8783-4669-BF00-A0BCE834D0C6@lichtzwerge.de> References: <82C197A9-8783-4669-BF00-A0BCE834D0C6@lichtzwerge.de> Message-ID: <94eac8e7-f89a-bda3-7777-63fa3858cf46@elte.hu> Hi, Thank you for mentioning. I already found the Message type, but my problem is that UnloadObj can only unload object files, however while using in-memory linking no object files are generated. I did not find any means of printing out the contents of the iserv process. On the other hand Linker.unload lets me specify what to keep and everything else is unloaded. Boldizsár 2017.12.15. 15:04 keltezéssel, Moritz Angermann írta: > Hi, > > I believe you are looking for the `Message` GADT in `GHCi.Message` > > ``` > -- ----------------------------------------------------------------------------- > -- The RPC protocol between GHC and the interactive server > > -- | A @Message a@ is a message that returns a value of type @a at . > -- These are requests sent from GHC to the server. > data Message a where > ``` > maybe specifically the `UnloadObj` message. > > Cheers, > Moritz > > >> On Dec 15, 2017, at 1:46 PM, Németh Boldizsár wrote: >> >> Dear GHC Developers, >> >> I'm using the GHC API to load Haskell modules and extract their syntax tree. I need to generate code where TH is used (by default I do in-memory linking). I've run into some trouble with external interpreter. When -fexternal-interpreter is NOT set, I use Linker.unload to remove bytecode from the global linker before reloading modules. However it is not applicable when external interpreter is used and I could not find corresponding functionality in the GHCi module (where communication with external interpreter is implemented). >> >> I've recently created 2 tickets related to this question: https://ghc.haskell.org/trac/ghc/ticket/14576, https://ghc.haskell.org/trac/ghc/ticket/14577 >> >> Can someone help me with this problem? >> >> Best Regards, >> Boldizsár Németh >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From lonetiger at gmail.com Sat Dec 16 15:25:46 2017 From: lonetiger at gmail.com (Phyx) Date: Sat, 16 Dec 2017 15:25:46 +0000 Subject: Can't push to haddock In-Reply-To: References: Message-ID: On Fri, Dec 8, 2017, 10:13 Simon Peyton Jones via ghc-devs < ghc-devs at haskell.org> wrote: > | Yes, the mirroring has a little bit of latency (assuming the mirroring > | trigger event notification from github to git.haskell.org didn't get > | lost). How much time did you wait between pushing to github and > | ghc.git? > > I didn't allow any time -- I didn't know that time was needed. Perhaps we > should add a note to > https://ghc.haskell.org/trac/ghc/wiki/Repositories > to explain? Under "Updating sub-repos" perhaps. > > I wonder if it'd be worth us articulating the reason why some submodules > live in github, but some live in git.haskell.org -- with only mirroring > github. I'm sure there's a rationale but I don't get it yet. > > Simon > The general scheme seems to be anything under the haskell organization is primarily on github and mirrored to haskell.org. (this of course includes Hadrian which is in another org). The things under the ghc org are haskell.org focused and mirrored to github. > > | -----Original Message----- > | From: Herbert Valerio Riedel [mailto:hvriedel at gmail.com] > | Sent: 07 December 2017 17:57 > | To: Simon Peyton Jones > | Subject: Re: Can't push to haddock > | > | Hi Simon, > | > | Yes, the mirroring has a little bit of latency (assuming the mirroring > | trigger event notification from github to git.haskell.org didn't get > | lost). How much time did you wait between pushing to github and > | ghc.git? > | > | On Thu, Dec 7, 2017 at 6:53 PM, Simon Peyton Jones via ghc-devs | devs at haskell.org> wrote: > | > But when I try to push the GHC patch, I get this message > | > > | > Ah… it worked after a while. Maybe a mirroring thing? > | > > | > But in pushing to GHC I saw: > | > > | > git push > | > > | > Counting objects: 45, done. > | > > | > Delta compression using up to 32 threads. > | > > | > Compressing objects: 100% (45/45), done. > | > > | > Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. > | > > | > Total 45 (delta 43), reused 0 (delta 0) > | > > | > remote: performing commit message validations... > | > > | > remote: Commit message validation passed! > | > > | > remote: performing submodule-ref update validations... > | > > | > remote: Submodule update(s) detected in > | > fa29df02a1b0b926afb2525a258172dcbf0ea460: > | > > | > remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 > | > > | > remote: utils/hsc2hs => 9483ad10064fbbb97ab525280623826b1ef63959 > | > > | > remote: OK > | > > | > remote: performing whitespace validations... > | > > | > remote: whitespace validation passed! > | > > | > remote: mirroring ssh://git at git.haskell.org/ghc to > | > ssh://git at github.com/ghc/ghc ... > | > > | > remote: To ssh://git at github.com/ghc/ghc > | > > | > remote: 5f332e1..fa29df0 master -> master > | > > | > remote: running notifier > | > > | > To ssh://git at git.haskell.org/ghc.git > | > > | > 5f332e1..fa29df0 HEAD -> master > | > > | > simonpj at cam-05-unx:~/code/HEAD$ > | > > | > I did not intend to monkey around with hsc2hs. I can’t think how > | that > | > happened, or whether it matter. > | > > | > With many apologies, would a wiser person that me like to see if > | I’ve > | > accidentally messed up hsc2hs. > | > > | > Thanks > | > > | > Simon > | > > | > > | > > | > From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of > | > Simon Peyton Jones via ghc-devs > | > Sent: 07 December 2017 17:32 > | > To: ghc-devs at haskell.org > | > Subject: Can't push to haddock > | > > | > > | > > | > I’m trying to push a patch that needs a supporting change to > | haddock. > | > > | > I’ve pushed the haddock change to the ghc-head branch of > | > ssh://git at github.com/haskell/haddock.git, which is (according to > | > ‘packages’) the relevant haddock upstream repo. > | > > | > But when I try to push the GHC patch, I get this message > | > > | > bash$ git push > | > > | > Counting objects: 45, done. > | > > | > Delta compression using up to 32 threads. > | > > | > Compressing objects: 100% (45/45), done. > | > > | > Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. > | > > | > Total 45 (delta 43), reused 0 (delta 0) > | > > | > remote: performing commit message validations... > | > > | > remote: Commit message validation passed! > | > > | > remote: performing submodule-ref update validations... > | > > | > remote: Submodule update(s) detected in > | > fa29df02a1b0b926afb2525a258172dcbf0ea460: > | > > | > remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 > | > > | > remote: *FAIL* commit not found in submodule repo ('../haddock.git') > | > > | > remote: or not reachable from persistent branches > | > > | > remote: hooklet hooks/update.secondary.d/check-submodule-refs failed > | > > | > remote: hooks/update.secondary died > | > > | > remote: error: hook declined to update refs/heads/master > | > > | > To ssh://git at git.haskell.org/ghc.git > | > > | > ! [remote rejected] HEAD -> master (hook declined) > | > > | > error: failed to push some refs to > | 'ssh://git at git.haskell.org/ghc.git' > | > > | > simonpj at cam-05-unx:~/code/HEAD$ > | > > | > > | > > | > What’s up? I have pushed the haddock commit! > | > > | > THanks > | > > | > Simon > | > > | > > | > > | > > | > _______________________________________________ > | > ghc-devs mailing list > | > ghc-devs at haskell.org > | > > | https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.h > | > askell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- > | devs&data=02%7C01%7Csimonpj%40microsoft.com%7C684b5c6cdac34213317708d5 > | 3d9be387%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6364826622509770 > | 90&sdata=kMhG2iTALLRxhwyDw%2BzTN8VvMMn%2FqfvnSn9cPm0AK4Q%3D&reserved=0 > | > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at snoyman.com Sat Dec 16 18:35:10 2017 From: michael at snoyman.com (Michael Snoyman) Date: Sat, 16 Dec 2017 18:35:10 +0000 Subject: Fwd: Release policies In-Reply-To: References: <87fu8df9kf.fsf@ben-laptop.smart-cactus.org> Message-ID: On Fri, Dec 15, 2017, 6:23 PM Simon Peyton Jones wrote: > Therefore bytestring, process, containers, transformers, and many more > will be pinned in a Stackage snapshot. > > So that would make it significantly harder, even impossible, for GHC > releases to make any promises about the .cabal-file format of these > packages, wouldn’t it? > > > > So even if we made some back-compat promise for non-reinstallable things > like integer-gmp or base, we could not do so for bytestring. > > > > Does that give you cause for concern? After all, it’s where Trac #14558 > started. I don’t see how we can avoid the original problem, since we don’t > have control over the .cabal file format used by the authors of the > packages on which we depend. > > > > Still: GHC can only depend on a package P if the version X of Cabal that > GHC is using can parse P.cabal. So if we fix Cabal-X some while in advance > and announce that, perhaps that would serve the purpose? > > > > Simon > > > That will certainly help. Even if GHC can't force any behavior on upstream packages, perhaps just an official request that new features in the cabal file format be held off on would be sufficient. After all, the case in the Trac issue was a situation where the new cabal feature want necessary. I would imagine that in the vast majority of cases, maintaining backwards compatibility in these packages will not only be desirable, but relatively trivial. *From:* Michael Snoyman [mailto:michael at snoyman.com] > *Sent:* 15 December 2017 09:27 > > > *To:* Simon Peyton Jones > > *Cc:* Boespflug, Mathieu ; Ben Gamari ; > ghc-devs > > > *Subject:* Re: Fwd: Release policies > > > > > > > > On Fri, Dec 15, 2017 at 12:10 PM, Simon Peyton Jones via ghc-devs < > ghc-devs at haskell.org> wrote: > > | at this point in time Stackage works > | hard to ensure that in any given package set, there is *exactly one* > | version of any package. That's why Stackage aligns versions of core > | packages to whatever ships with the GHC version the package set is > | based on. > > Ah. It follows that if Stackage wants to find a set of packages compatible > with GHC-X, then it must pick precisely the version of bytestring that > GHC-X depends on. (I'm assuming here that GHC-X fixes a particular > version, even though bytestring is reinstallable? Certainly, a > /distribution/ of GHC-X will do so.) > > If meanwhile the bytestring author has decided to use a newer version of > .cabal file syntax, then GHC-X is stuck with that. Or would have to go > back to an earlier version of bytestring, for which there might be material > disadvantages. > > That would make it hard to GHC to guarantee to downstream tools that it > doesn't depend on any packages whose .cabal files use new syntax; which is > where this thread started. > > Hmm. I wonder if I have understood this correctly. Perhaps Michael would > like to comment? > > > > Stackage does in fact pin snapshots down to precisely one version of each > package. And in the case of non-reinstallable packages, it ensures that > those package's transitive dependency set are pinned to the same version > that ships with GHC. I know there's work around making more package > reinstallable, and the ghc package itself may have crossed that line now, > but for the moment Stackage assumes that the ghc package and all its > dependencies are non-reinstallable. Therefore bytestring, process, > containers, transformers, and many more will be pinned in a Stackage > snapshot. > > > > Michael > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Mon Dec 18 09:01:57 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Mon, 18 Dec 2017 09:01:57 +0000 Subject: Can't push to haddock In-Reply-To: References: Message-ID: The general scheme seems to be anything under the haskell organization is primarily on github and mirrored to haskell.org. (this of course includes Hadrian which is in another org). The things under the ghc org are haskell.org focused and mirrored to github. My question is: why mirror? At the moment, I think * we always pull from git.haskell.org * but for other-org packages we push to github * …and mirror on git.haskell.org. But why don’t we just pull from github rather than mirroring on git.haskell.org? Simon From: Phyx [mailto:lonetiger at gmail.com] Sent: 16 December 2017 15:26 To: Simon Peyton Jones Cc: ghc-devs at haskell.org Subject: Re: Can't push to haddock On Fri, Dec 8, 2017, 10:13 Simon Peyton Jones via ghc-devs > wrote: | Yes, the mirroring has a little bit of latency (assuming the mirroring | trigger event notification from github to git.haskell.org didn't get | lost). How much time did you wait between pushing to github and | ghc.git? I didn't allow any time -- I didn't know that time was needed. Perhaps we should add a note to https://ghc.haskell.org/trac/ghc/wiki/Repositories to explain? Under "Updating sub-repos" perhaps. I wonder if it'd be worth us articulating the reason why some submodules live in github, but some live in git.haskell.org -- with only mirroring github. I'm sure there's a rationale but I don't get it yet. Simon The general scheme seems to be anything under the haskell organization is primarily on github and mirrored to haskell.org. (this of course includes Hadrian which is in another org). The things under the ghc org are haskell.org focused and mirrored to github. | -----Original Message----- | From: Herbert Valerio Riedel [mailto:hvriedel at gmail.com] | Sent: 07 December 2017 17:57 | To: Simon Peyton Jones > | Subject: Re: Can't push to haddock | | Hi Simon, | | Yes, the mirroring has a little bit of latency (assuming the mirroring | trigger event notification from github to git.haskell.org didn't get | lost). How much time did you wait between pushing to github and | ghc.git? | | On Thu, Dec 7, 2017 at 6:53 PM, Simon Peyton Jones via ghc-devs > wrote: | > But when I try to push the GHC patch, I get this message | > | > Ah… it worked after a while. Maybe a mirroring thing? | > | > But in pushing to GHC I saw: | > | > git push | > | > Counting objects: 45, done. | > | > Delta compression using up to 32 threads. | > | > Compressing objects: 100% (45/45), done. | > | > Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. | > | > Total 45 (delta 43), reused 0 (delta 0) | > | > remote: performing commit message validations... | > | > remote: Commit message validation passed! | > | > remote: performing submodule-ref update validations... | > | > remote: Submodule update(s) detected in | > fa29df02a1b0b926afb2525a258172dcbf0ea460: | > | > remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 | > | > remote: utils/hsc2hs => 9483ad10064fbbb97ab525280623826b1ef63959 | > | > remote: OK | > | > remote: performing whitespace validations... | > | > remote: whitespace validation passed! | > | > remote: mirroring ssh://git at git.haskell.org/ghc to | > ssh://git at github.com/ghc/ghc ... | > | > remote: To ssh://git at github.com/ghc/ghc | > | > remote: 5f332e1..fa29df0 master -> master | > | > remote: running notifier | > | > To ssh://git at git.haskell.org/ghc.git | > | > 5f332e1..fa29df0 HEAD -> master | > | > simonpj at cam-05-unx:~/code/HEAD$ | > | > I did not intend to monkey around with hsc2hs. I can’t think how | that | > happened, or whether it matter. | > | > With many apologies, would a wiser person that me like to see if | I’ve | > accidentally messed up hsc2hs. | > | > Thanks | > | > Simon | > | > | > | > From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of | > Simon Peyton Jones via ghc-devs | > Sent: 07 December 2017 17:32 | > To: ghc-devs at haskell.org | > Subject: Can't push to haddock | > | > | > | > I’m trying to push a patch that needs a supporting change to | haddock. | > | > I’ve pushed the haddock change to the ghc-head branch of | > ssh://git at github.com/haskell/haddock.git, which is (according to | > ‘packages’) the relevant haddock upstream repo. | > | > But when I try to push the GHC patch, I get this message | > | > bash$ git push | > | > Counting objects: 45, done. | > | > Delta compression using up to 32 threads. | > | > Compressing objects: 100% (45/45), done. | > | > Writing objects: 100% (45/45), 27.56 KiB | 0 bytes/s, done. | > | > Total 45 (delta 43), reused 0 (delta 0) | > | > remote: performing commit message validations... | > | > remote: Commit message validation passed! | > | > remote: performing submodule-ref update validations... | > | > remote: Submodule update(s) detected in | > fa29df02a1b0b926afb2525a258172dcbf0ea460: | > | > remote: utils/haddock => 24841386cff6fdccc11accf9daa815c2c7444d65 | > | > remote: *FAIL* commit not found in submodule repo ('../haddock.git') | > | > remote: or not reachable from persistent branches | > | > remote: hooklet hooks/update.secondary.d/check-submodule-refs failed | > | > remote: hooks/update.secondary died | > | > remote: error: hook declined to update refs/heads/master | > | > To ssh://git at git.haskell.org/ghc.git | > | > ! [remote rejected] HEAD -> master (hook declined) | > | > error: failed to push some refs to | 'ssh://git at git.haskell.org/ghc.git' | > | > simonpj at cam-05-unx:~/code/HEAD$ | > | > | > | > What’s up? I have pushed the haddock commit! | > | > THanks | > | > Simon | > | > | > | > | > _______________________________________________ | > ghc-devs mailing list | > ghc-devs at haskell.org | > | https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.h | > askell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- | devs&data=02%7C01%7Csimonpj%40microsoft.com%7C684b5c6cdac34213317708d5 | 3d9be387%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6364826622509770 | 90&sdata=kMhG2iTALLRxhwyDw%2BzTN8VvMMn%2FqfvnSn9cPm0AK4Q%3D&reserved=0 | > _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From m at tweag.io Mon Dec 18 11:03:22 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Mon, 18 Dec 2017 12:03:22 +0100 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: I think Mikhail's point is that if a package says build-type: Simple, then we know exactly what its Setup.hs says, and therefore also which part of the Cabal API it's using. Easy enough to keep that part stable even if others change. Case in point: Cabal-2.0 brought a number of changes to the overall API, but nothing that broke calling defaultMain from Distribution.Simple (which is what a build-type: Simple script does). At the end of the day the consumers of the wider Cabal API are pretty small. A substantial number of misc packages on Hackage do it but rarely heavily. Other than that it essentially comes down to Stack, cabal-install, Haskell For Mac and... any others? My takeaway from the discussion so far is that the number of heavy consumers looks small enough that a draconian BC policy for Cabal-the-library sounds overkill, provided, crucially, that everything is in place, by GHC feature freeze at the very latest, to allow a smooth migration. A "smooth transition" means having a migration guide available before start of feature freeze etc, but to Ben's concern stated earlier in this thread (about GHC/upstream coupling), ideally also a release. I should note that to the extent that GHC tracks upstream releases only (not git commits in unknown state), GHC can be released on a timely schedule without needing any coordination from upstream maintainers to await new releases on their part. So quite apart from the Cabal thing specifically, it's worth thinking about asking that the versions of all upstream packages only make it into GHC, at the behest of their respective maintainers, after a new release of upstream is made. This was already proposed earlier in the thread: > * [Proposal:] GHC does not track git commits of upstream dependencies > in an unknown state of quality, but tracks vetted and tested releases > instead. Potentially, this could even mean drastically cutting down on the number of git submodules carried in the GHC repo. Since these packages could as well be downloaded from Hackage. On 18 December 2017 at 05:04, Manuel M T Chakravarty wrote: > Yes, you are right Haskell for Mac also links against Cabal-the-library and API changes have regularly required me to fix my code. I guess, I have never been particularly stressed about it, because I also link against GHC API and that doesn’t even know how to spell API stability — i.e., changes required by Cabal are usually drowned out by the chaos inflicted by GHC. > > In any case, you are making a good point. > > Mikhail, I don’t understand your response to Mathieu at all. What does the build-type have to do with this? > > Cheers, > Manuel > >> 15.12.2017, 19:41 Boespflug, Mathieu : >> >> Thanks for the feedback, Michael. >> >> Manuel, I believe you are also a Cabal-the-library consumer in Haskell For Mac? >> >> Michael, you brought up another problem tangentially related to the >> original integer-gmp issue but that was not in my original list >> earlier in this thread: >> >> * Cabal-2.0.0 had breaking changes in the API. >> >> This means that by association GHC itself broke BC, because it shipped >> with Cabal-2.0, without the usual grace period. >> >> Now, there are far fewer users of Cabal than of base. All, Michael in >> his previous email seems to be okay with breaking changes in Cabal >> given the conditions he stated (2 months grace period, advance notice >> of when the 2 months start). And perhaps this points to the lack of a >> need for the regular grace period applying to Cabal. How many other >> users of Cabal-the-library are there? In principle, every single >> Hackage package out there, which all have a Setup.hs script. Most of >> them are trivial, but how many did break because of these API changes? >> I for one am pretty happy for Cabal to move fast, but I'm concerned >> that these breaking changes happened without any kind of advance >> notice. To Simon's original point - there does not to be a clear >> policy and a good process surrounding Cabal itself and other GHC >> dependencies. So far we discussed mostly metadata changes, not API >> changes. >> >> And to be clear, folks did get some (post facto) notice in September: >> http://coldwa.st/e/blog/2017-09-09-Cabal-2-0.html. That's helpful, but >> I submit that in the future this really should be part of the GHC >> release announcement (which happened over a month before that), and in >> fact a migration guide circulated before the feature freeze, so >> downstream tooling authors can adapt. If this is not possible, then >> perhaps it's premature for GHC to include that given Cabal release. >> Again, GHC should always have the option to stick to the old Cabal >> version until things get ironed out. >> >> >> On 15 December 2017 at 08:42, Michael Snoyman wrote: >>> >>> >>> On Thu, Dec 14, 2017 at 12:27 PM, Boespflug, Mathieu wrote: >>> >>> [snip] >>> >>>> * Or a middle ground: make feature freeze a thing. Meaning that for a >>>> couple of months before a major GHC release, the major new Cabal isn't >>>> technically released yet, but like GHC itself within this period, it's >>>> pretty staid, so not so much a moving target, and something downstream >>>> tooling authors can possibly adapt to even without any grace period on >>>> new metadata features. This assumes that the 2 months of feature >>>> freeze are enough time for downstream tooling. Thoughts from any of >>>> those maintainers? >>>> >>> >>> Short answer: if there's a clear idea in advance of when this feature freeze >>> is going to happen, I think we can coordinate releases of downstream tooling >>> (Stack being the most important, but stackage-curator playing in as well) so >>> that 2 months is sufficient. I'll talk with the rest of the Stack team to >>> see if there are any concerns. >>> >>> Longer answer: Stack intentionally avoids depending on the internals of >>> Cabal wherever possible. Instead of calling library functions directly from >>> within Haskell code to perform builds, for example, it interacts with the >>> Setup.hs files over their command line interface.[1] This has two results: >>> >>> * Stack can usually start using new GHC/Cabal versions without a new Stack >>> release, since it's just shelling out for the actual build >>> * There's not usually very much code churn needed in Stack to upgrade to a >>> newer Cabal release >>> >>> This past release was an exception because of all of the changes that >>> landed, both the new cabal grammar to support the ^>= operator (making the >>> old parser incapable of lossily parsing new files) and API changes (I think >>> mostly around Backpack, though there was some code cleanup as well). In >>> particular, the main interface we need from Cabal—the package description >>> data types and parser—changed significantly enough that it took significant >>> effort to upgrade. There were also new features added (like sub libraries >>> and foreign libraries) that weren't immediately supported by the old Stack >>> version, and had to be manually added in. >>> >>> Tying this up: generally upgrading to a new Cabal release should be fine, >>> and the only concern I'd have is fitting it into a release schedule with >>> Stack. The complications that could slow that down are: >>> >>> * Changes to the command line interface that Stack uses (hopefully those are >>> exceedingly rare) >>> * Major overhauls to the Stack-facing API >>> >>> Michael >>> >>> [1] This allows for more reproducible builds of older snapshots, insuring >>> that the exact same Cabal library is performing the builds >> _______________________________________________ >> Ghc-devops-group mailing list >> Ghc-devops-group at haskell.org >> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devops-group > From simonpj at microsoft.com Mon Dec 18 11:08:56 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Mon, 18 Dec 2017 11:08:56 +0000 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: This thread sounds as if it has been productive, though I have not followed the details. Does anyone feel able to draw it together into a proposed release policy? Along with a summary of the reasoning that led to it? Thanks Simon | -----Original Message----- | From: Ghc-devops-group [mailto:ghc-devops-group-bounces at haskell.org] On | Behalf Of Boespflug, Mathieu | Sent: 18 December 2017 11:03 | To: Manuel M T Chakravarty | Cc: ghc-devops-group at haskell.org; ghc-devs at haskell.org Devs | Subject: Re: [GHC DevOps Group] Release policies | | I think Mikhail's point is that if a package says build-type: Simple, then | we know exactly what its Setup.hs says, and therefore also which part of the | Cabal API it's using. Easy enough to keep that part stable even if others | change. Case in point: Cabal-2.0 brought a number of changes to the overall | API, but nothing that broke calling defaultMain from Distribution.Simple | (which is what a build-type: Simple script does). At the end of the day the | consumers of the wider Cabal API are pretty small. A substantial number of | misc packages on Hackage do it but rarely heavily. Other than that it | essentially comes down to Stack, cabal-install, Haskell For Mac and... any | others? | | My takeaway from the discussion so far is that the number of heavy consumers | looks small enough that a draconian BC policy for Cabal-the-library sounds | overkill, provided, crucially, that everything is in place, by GHC feature | freeze at the very latest, to allow a smooth migration. A "smooth | transition" means having a migration guide available before start of feature | freeze etc, but to Ben's concern stated earlier in this thread (about | GHC/upstream coupling), ideally also a release. | | I should note that to the extent that GHC tracks upstream releases only (not | git commits in unknown state), GHC can be released on a timely schedule | without needing any coordination from upstream maintainers to await new | releases on their part. So quite apart from the Cabal thing specifically, | it's worth thinking about asking that the versions of all upstream packages | only make it into GHC, at the behest of their respective maintainers, after | a new release of upstream is made. This was already proposed earlier in the | thread: | | > * [Proposal:] GHC does not track git commits of upstream dependencies | > in an unknown state of quality, but tracks vetted and tested releases | > instead. | | Potentially, this could even mean drastically cutting down on the number of | git submodules carried in the GHC repo. Since these packages could as well | be downloaded from Hackage. | | | On 18 December 2017 at 05:04, Manuel M T Chakravarty | wrote: | > Yes, you are right Haskell for Mac also links against Cabal-the-library | and API changes have regularly required me to fix my code. I guess, I have | never been particularly stressed about it, because I also link against GHC | API and that doesn’t even know how to spell API stability — i.e., changes | required by Cabal are usually drowned out by the chaos inflicted by GHC. | > | > In any case, you are making a good point. | > | > Mikhail, I don’t understand your response to Mathieu at all. What does the | build-type have to do with this? | > | > Cheers, | > Manuel | > | >> 15.12.2017, 19:41 Boespflug, Mathieu : | >> | >> Thanks for the feedback, Michael. | >> | >> Manuel, I believe you are also a Cabal-the-library consumer in Haskell | For Mac? | >> | >> Michael, you brought up another problem tangentially related to the | >> original integer-gmp issue but that was not in my original list | >> earlier in this thread: | >> | >> * Cabal-2.0.0 had breaking changes in the API. | >> | >> This means that by association GHC itself broke BC, because it | >> shipped with Cabal-2.0, without the usual grace period. | >> | >> Now, there are far fewer users of Cabal than of base. All, Michael in | >> his previous email seems to be okay with breaking changes in Cabal | >> given the conditions he stated (2 months grace period, advance notice | >> of when the 2 months start). And perhaps this points to the lack of a | >> need for the regular grace period applying to Cabal. How many other | >> users of Cabal-the-library are there? In principle, every single | >> Hackage package out there, which all have a Setup.hs script. Most of | >> them are trivial, but how many did break because of these API changes? | >> I for one am pretty happy for Cabal to move fast, but I'm concerned | >> that these breaking changes happened without any kind of advance | >> notice. To Simon's original point - there does not to be a clear | >> policy and a good process surrounding Cabal itself and other GHC | >> dependencies. So far we discussed mostly metadata changes, not API | >> changes. | >> | >> And to be clear, folks did get some (post facto) notice in September: | >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcoldw | >> a.st%2Fe%2Fblog%2F2017-09-09-Cabal-2-0.html&data=02%7C01%7Csimonpj%40 | >> microsoft.com%7Ca4ef8935c10c4da1766f08d546070073%7C72f988bf86f141af91 | >> ab2d7cd011db47%7C1%7C0%7C636491918245390697&sdata=YNAuG7XcS9NiRMyklKe | >> 1LyL6LrxKr%2BlIsu6oxFXb%2Byg%3D&reserved=0. That's helpful, but I | >> submit that in the future this really should be part of the GHC release | announcement (which happened over a month before that), and in fact a | migration guide circulated before the feature freeze, so downstream tooling | authors can adapt. If this is not possible, then perhaps it's premature for | GHC to include that given Cabal release. | >> Again, GHC should always have the option to stick to the old Cabal | >> version until things get ironed out. | >> | >> | >> On 15 December 2017 at 08:42, Michael Snoyman | wrote: | >>> | >>> | >>> On Thu, Dec 14, 2017 at 12:27 PM, Boespflug, Mathieu wrote: | >>> | >>> [snip] | >>> | >>>> * Or a middle ground: make feature freeze a thing. Meaning that for | >>>> a couple of months before a major GHC release, the major new Cabal | >>>> isn't technically released yet, but like GHC itself within this | >>>> period, it's pretty staid, so not so much a moving target, and | >>>> something downstream tooling authors can possibly adapt to even | >>>> without any grace period on new metadata features. This assumes | >>>> that the 2 months of feature freeze are enough time for downstream | >>>> tooling. Thoughts from any of those maintainers? | >>>> | >>> | >>> Short answer: if there's a clear idea in advance of when this | >>> feature freeze is going to happen, I think we can coordinate | >>> releases of downstream tooling (Stack being the most important, but | >>> stackage-curator playing in as well) so that 2 months is sufficient. | >>> I'll talk with the rest of the Stack team to see if there are any | concerns. | >>> | >>> Longer answer: Stack intentionally avoids depending on the internals | >>> of Cabal wherever possible. Instead of calling library functions | >>> directly from within Haskell code to perform builds, for example, it | >>> interacts with the Setup.hs files over their command line interface.[1] | This has two results: | >>> | >>> * Stack can usually start using new GHC/Cabal versions without a new | >>> Stack release, since it's just shelling out for the actual build | >>> * There's not usually very much code churn needed in Stack to | >>> upgrade to a newer Cabal release | >>> | >>> This past release was an exception because of all of the changes | >>> that landed, both the new cabal grammar to support the ^>= operator | >>> (making the old parser incapable of lossily parsing new files) and | >>> API changes (I think mostly around Backpack, though there was some | >>> code cleanup as well). In particular, the main interface we need | >>> from Cabal—the package description data types and parser—changed | >>> significantly enough that it took significant effort to upgrade. | >>> There were also new features added (like sub libraries and foreign | >>> libraries) that weren't immediately supported by the old Stack version, | and had to be manually added in. | >>> | >>> Tying this up: generally upgrading to a new Cabal release should be | >>> fine, and the only concern I'd have is fitting it into a release | >>> schedule with Stack. The complications that could slow that down are: | >>> | >>> * Changes to the command line interface that Stack uses (hopefully | >>> those are exceedingly rare) | >>> * Major overhauls to the Stack-facing API | >>> | >>> Michael | >>> | >>> [1] This allows for more reproducible builds of older snapshots, | >>> insuring that the exact same Cabal library is performing the builds | >> _______________________________________________ | >> Ghc-devops-group mailing list | >> Ghc-devops-group at haskell.org | >> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devops-group | > | _______________________________________________ | Ghc-devops-group mailing list | Ghc-devops-group at haskell.org | https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devops-group From moritz.angermann at gmail.com Mon Dec 18 11:18:26 2017 From: moritz.angermann at gmail.com (Moritz Angermann) Date: Mon, 18 Dec 2017 19:18:26 +0800 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: <326FDA10-DC08-426F-8A36-EA1D7E847537@gmail.com> Hi, this might only be tangentially relevant. However, you might consider this a working example of GHC and Cabal bleeding edge symbiosis. Some might have seen that I built some *relocatable* GHC releases for cross compilation (however those include the full base compiler for macOS and linux (deb8) as well) at http://hackage.mobilehaskell.org/. To facility those builds, I did not only need to make changes to GHC to allow it to detect its library folder relative to `ghc`. I also did made quite a lot of changes to hadrian, and cabal(!) to actually support describing GHC packages (primarily rts and ghc-prim) as cabal packages without resorting to hacks in ghc-cabal. And getting rid of ghc-cabal altogether. Any overly restrictive policy on GHC and Cabal releases will result in changes like theses to become a lot harder to do. After all a lot of work on GHC is performed by volunteers in their spare time, and I honestly can not see myself forcing someone else to spend even more time on streamlining project integrations, if even higher barriers are put into place. If we start dropping submodule dependencies, we need to make it trivial to put them back into place when hacking on GHC. I would therefore rather suggest we keep submodules in the development tree of GHC, but put a policy into place that says that submodules have to be replaced with their proper hackage dependencies (and versions) prior to any release. This would allow to keep working across ghc and multiple dependencies as source, while giving some additional non-in-flight guarantees about GHC releases and their dependencies. Another example would be my llvm-ng (bitcode producing llvm backend), which is naturally also a set of submodules in my ghc tree, as working on the code gen and ghc at the same time would either mean I need to fully integrate those libraries into GHC, or start bumping them on hackage for every minimal change while working on GHC and the code gen. By the end of the day, I believe we want to make hacking on GHC as easy for everyone as possible while at the same time improving the release quality. Cheers, Moritz > On Dec 18, 2017, at 7:03 PM, Boespflug, Mathieu wrote: > > I think Mikhail's point is that if a package says build-type: Simple, > then we know exactly what its Setup.hs says, and therefore also which > part of the Cabal API it's using. Easy enough to keep that part stable > even if others change. Case in point: Cabal-2.0 brought a number of > changes to the overall API, but nothing that broke calling defaultMain > from Distribution.Simple (which is what a build-type: Simple script > does). At the end of the day the consumers of the wider Cabal API are > pretty small. A substantial number of misc packages on Hackage do it > but rarely heavily. Other than that it essentially comes down to > Stack, cabal-install, Haskell For Mac and... any others? > > My takeaway from the discussion so far is that the number of heavy > consumers looks small enough that a draconian BC policy for > Cabal-the-library sounds overkill, provided, crucially, that > everything is in place, by GHC feature freeze at the very latest, to > allow a smooth migration. A "smooth transition" means having a > migration guide available before start of feature freeze etc, but to > Ben's concern stated earlier in this thread (about GHC/upstream > coupling), ideally also a release. > > I should note that to the extent that GHC tracks upstream releases > only (not git commits in unknown state), GHC can be released on a > timely schedule without needing any coordination from upstream > maintainers to await new releases on their part. So quite apart from > the Cabal thing specifically, it's worth thinking about asking that > the versions of all upstream packages only make it into GHC, at the > behest of their respective maintainers, after a new release of > upstream is made. This was already proposed earlier in the thread: > >> * [Proposal:] GHC does not track git commits of upstream dependencies >> in an unknown state of quality, but tracks vetted and tested releases >> instead. > > Potentially, this could even mean drastically cutting down on the > number of git submodules carried in the GHC repo. Since these packages > could as well be downloaded from Hackage. > > > On 18 December 2017 at 05:04, Manuel M T Chakravarty > wrote: >> Yes, you are right Haskell for Mac also links against Cabal-the-library and API changes have regularly required me to fix my code. I guess, I have never been particularly stressed about it, because I also link against GHC API and that doesn’t even know how to spell API stability — i.e., changes required by Cabal are usually drowned out by the chaos inflicted by GHC. >> >> In any case, you are making a good point. >> >> Mikhail, I don’t understand your response to Mathieu at all. What does the build-type have to do with this? >> >> Cheers, >> Manuel >> >>> 15.12.2017, 19:41 Boespflug, Mathieu : >>> >>> Thanks for the feedback, Michael. >>> >>> Manuel, I believe you are also a Cabal-the-library consumer in Haskell For Mac? >>> >>> Michael, you brought up another problem tangentially related to the >>> original integer-gmp issue but that was not in my original list >>> earlier in this thread: >>> >>> * Cabal-2.0.0 had breaking changes in the API. >>> >>> This means that by association GHC itself broke BC, because it shipped >>> with Cabal-2.0, without the usual grace period. >>> >>> Now, there are far fewer users of Cabal than of base. All, Michael in >>> his previous email seems to be okay with breaking changes in Cabal >>> given the conditions he stated (2 months grace period, advance notice >>> of when the 2 months start). And perhaps this points to the lack of a >>> need for the regular grace period applying to Cabal. How many other >>> users of Cabal-the-library are there? In principle, every single >>> Hackage package out there, which all have a Setup.hs script. Most of >>> them are trivial, but how many did break because of these API changes? >>> I for one am pretty happy for Cabal to move fast, but I'm concerned >>> that these breaking changes happened without any kind of advance >>> notice. To Simon's original point - there does not to be a clear >>> policy and a good process surrounding Cabal itself and other GHC >>> dependencies. So far we discussed mostly metadata changes, not API >>> changes. >>> >>> And to be clear, folks did get some (post facto) notice in September: >>> http://coldwa.st/e/blog/2017-09-09-Cabal-2-0.html. That's helpful, but >>> I submit that in the future this really should be part of the GHC >>> release announcement (which happened over a month before that), and in >>> fact a migration guide circulated before the feature freeze, so >>> downstream tooling authors can adapt. If this is not possible, then >>> perhaps it's premature for GHC to include that given Cabal release. >>> Again, GHC should always have the option to stick to the old Cabal >>> version until things get ironed out. >>> >>> >>> On 15 December 2017 at 08:42, Michael Snoyman wrote: >>>> >>>> >>>> On Thu, Dec 14, 2017 at 12:27 PM, Boespflug, Mathieu wrote: >>>> >>>> [snip] >>>> >>>>> * Or a middle ground: make feature freeze a thing. Meaning that for a >>>>> couple of months before a major GHC release, the major new Cabal isn't >>>>> technically released yet, but like GHC itself within this period, it's >>>>> pretty staid, so not so much a moving target, and something downstream >>>>> tooling authors can possibly adapt to even without any grace period on >>>>> new metadata features. This assumes that the 2 months of feature >>>>> freeze are enough time for downstream tooling. Thoughts from any of >>>>> those maintainers? >>>>> >>>> >>>> Short answer: if there's a clear idea in advance of when this feature freeze >>>> is going to happen, I think we can coordinate releases of downstream tooling >>>> (Stack being the most important, but stackage-curator playing in as well) so >>>> that 2 months is sufficient. I'll talk with the rest of the Stack team to >>>> see if there are any concerns. >>>> >>>> Longer answer: Stack intentionally avoids depending on the internals of >>>> Cabal wherever possible. Instead of calling library functions directly from >>>> within Haskell code to perform builds, for example, it interacts with the >>>> Setup.hs files over their command line interface.[1] This has two results: >>>> >>>> * Stack can usually start using new GHC/Cabal versions without a new Stack >>>> release, since it's just shelling out for the actual build >>>> * There's not usually very much code churn needed in Stack to upgrade to a >>>> newer Cabal release >>>> >>>> This past release was an exception because of all of the changes that >>>> landed, both the new cabal grammar to support the ^>= operator (making the >>>> old parser incapable of lossily parsing new files) and API changes (I think >>>> mostly around Backpack, though there was some code cleanup as well). In >>>> particular, the main interface we need from Cabal—the package description >>>> data types and parser—changed significantly enough that it took significant >>>> effort to upgrade. There were also new features added (like sub libraries >>>> and foreign libraries) that weren't immediately supported by the old Stack >>>> version, and had to be manually added in. >>>> >>>> Tying this up: generally upgrading to a new Cabal release should be fine, >>>> and the only concern I'd have is fitting it into a release schedule with >>>> Stack. The complications that could slow that down are: >>>> >>>> * Changes to the command line interface that Stack uses (hopefully those are >>>> exceedingly rare) >>>> * Major overhauls to the Stack-facing API >>>> >>>> Michael >>>> >>>> [1] This allows for more reproducible builds of older snapshots, insuring >>>> that the exact same Cabal library is performing the builds >>> _______________________________________________ >>> Ghc-devops-group mailing list >>> Ghc-devops-group at haskell.org >>> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devops-group >> > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From simonpj at microsoft.com Mon Dec 18 16:01:11 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Mon, 18 Dec 2017 16:01:11 +0000 Subject: Can't push to haddock In-Reply-To: References: Message-ID: | It's for technical reasons, and the strongest one being: GitHub doesn't | allow us to establish strong invariants regarding submodule gitlink | referential integrity for submodules (which I implemented a couple years ago | for git.haskell.org). Interesting. It'd be good to document what the technical reasons are. For example I don’t know what the strong invariants are. A good place to describe them might be the Repositories pages https://ghc.haskell.org/trac/ghc/wiki/Repositories Many thanks Simon | -----Original Message----- | From: Herbert Valerio Riedel [mailto:hvriedel at gmail.com] | Sent: 18 December 2017 11:13 | To: Simon Peyton Jones | Subject: Re: Can't push to haddock | | On Mon, Dec 18, 2017 at 10:01 AM, Simon Peyton Jones via ghc-devs wrote: | > But why don’t we just pull from github rather than mirroring on | > git.haskell.org? | | It's for technical reasons, and the strongest one being: GitHub doesn't | allow us to establish strong invariants regarding submodule gitlink | referential integrity for submodules (which I implemented a couple years ago | for git.haskell.org). From m at tweag.io Mon Dec 18 18:51:27 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Mon, 18 Dec 2017 19:51:27 +0100 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: Hi Herbert, On 18 December 2017 at 12:22, Herbert Valerio Riedel wrote: > Hi Mathieu, > > On Mon, Dec 18, 2017 at 12:03 PM, Boespflug, Mathieu wrote: >> it's worth thinking about asking that >> the versions of all upstream packages only make it into GHC, at the >> behest of their respective maintainers, after a new release of >> upstream is made. > > Let me try to formulate the invariant such a procedure would demand: > > That would require a guarantee that the APIs provided by GHC (mostly > ghc-prim/base, but possibly more, including other boot libs; as well > as GHC's own behaviour) my package(s) rely upon are frozen to the > point that any such release of my packages advertising compatiblity > with the imminent GHC release will remain compatible with said final > GHC release. > > Is this something you're ready to guarantee? That's exactly it: a tradeoff. As you note, any package release now can't possibly anticipate all changes in future GHC. Furthermore, if a new GHC feature crucially depends on upstream but no upstream release is available yet, under this proposal merging the new GHC feature would need to be delayed. But on the other hand, if indeed GHC is to have more frequent releases, we can't have a GHC release perennially held up by upstream maintainers cutting their own releases one after the other, or worse still, releases happening *after* it already shipped in GHC as we just saw, or with breaking changes not announced to downstream tooling authors ahead of time. This is a problem that was brought up by Ben at ICFP, and again here. It's a problem relevant to the discussion at hand, which started as the result of upstream releases showing up on Hackage long after the release, and downstream tooling authors not afforded any advance notice to adapt. When this was brought up at ICFP, several GHC DevOps Group members recommended to Ben that he avoid needing *any* cooperation from upstream maintainers on the critical path towards a release. Of the packages you mention, base can't introduce breaking changes without a grace period. Are any upstream packages that closely tied to ghc-prim etc that a breaking change in the latter is likely between feature freeze and the release date? On the off-chance that a BC change does happen, package releases are cheap, so would that really be a problem? If a package is that closely tied to ghc-prim, base or any other boot lib, and conversely GHC is closely tied to it, then shouldn't that package just be part of the GHC codebase proper, rather than managed separately outside of GHC devs' control? From gershomb at gmail.com Mon Dec 18 19:41:57 2017 From: gershomb at gmail.com (Gershom B) Date: Mon, 18 Dec 2017 14:41:57 -0500 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: Let me try to formulate a synthetic policy as per Simon's request: Policy: Bundled library maintainers agree to the following: 1) When GHC cuts a feature-freeze branch, they too (if anything has changed) cut a feature-freeze branch within two weeks at the maximum (ideally sooner), to be included in the main GHC freeze branch. If they do not do so, the last released version will be included instead. 2) When GHC releases the first release candidate, maintainers (if anything has changed) release new versions of their packages, to then be depended on directly in the GHC repo. All submodules are then replaced with their proper released versions for GHC release. This policy can be enforced by GHC hq as part of the release process with the exception of a case in which there's coupling so that a new GHC _requires_ a new submodule release, and also the maintainer is not responsive. We'll have to deal with that case directly, likely by just appealing to the libraries committee or something to force a new release :-) Motivation: This should help address multiple issues: 1) holdup of ghc on other releases. 2) lack of synchronization with ghc and other releases. 3) low lead-time for people to adapt to API changes in forthcoming library releases tied to ghc releases. In particular, because Cabal is part of this policy, it should help circumvent the sorts of problems that led to this thread initially. Further, because this only applies to freeze/release branches, it should not slow down rapid-implementation of cross-cutting changes more generally. Cheers, Gershom From svenpanne at gmail.com Tue Dec 19 07:31:06 2017 From: svenpanne at gmail.com (Sven Panne) Date: Tue, 19 Dec 2017 08:31:06 +0100 Subject: Can't push to haddock In-Reply-To: References: Message-ID: 2017-12-18 17:01 GMT+01:00 Simon Peyton Jones via ghc-devs < ghc-devs at haskell.org>: > | It's for technical reasons, and the strongest one being: GitHub doesn't > | allow us to establish strong invariants regarding submodule gitlink > | referential integrity for submodules (which I implemented a couple > years ago > | for git.haskell.org). > > Interesting. It'd be good to document what the technical reasons are. > For example I don’t know what the strong invariants are. [...] > Me neither. :-] Looking at the repositories Wiki page, it seems to be related to the fact that GitHub doesn't offer git hooks, which are used to check the invariants. This leads to another question: Is it *really* necessary to have the invariant checks implemented as a git hook? If you use any kind of continuous integration, which GHC obviously does, one can move the checks to e.g. CircleCI (or whatever CI is used). This is a tradeoff: Doing it that way, you catch incorrect commits a little bit later, but it makes the overall arcane repository magic quite a bit simpler, probably removing the need for mirroring. This seems to be a good tradeoff, but of course I might be missing some details here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hvriedel at gmail.com Tue Dec 19 08:50:16 2017 From: hvriedel at gmail.com (Herbert Valerio Riedel) Date: Tue, 19 Dec 2017 09:50:16 +0100 Subject: Can't push to haddock In-Reply-To: (Sven Panne's message of "Tue, 19 Dec 2017 08:31:06 +0100") References: Message-ID: <87k1xj14qf.fsf@gmail.com> Hi, On 2017-12-19 at 08:31:06 +0100, Sven Panne wrote: > This is a tradeoff: Doing it that way, you catch incorrect commits a > little bit later, but it makes the overall arcane repository magic > quite a bit simpler, probably removing the need for mirroring. We'd need mirroring anyway, as we want to keep control over our infrastructure and not have to trust a 3rd party infrastructure to safely handle our family jewels: GHC's source tree. Also, catching bad commits "a bit later" is just asking for trouble -- by the time they're caught the git repos have already lost their invariant and its a big mess to recover; the invariant I devised and whose validation I implemented 4 years ago has served us pretty well, and has ensured that we never glitched into incorrectness; I'm also not sure why it's being suggested to switch to a less principled and more fragile scheme now. As a Haskell programmer, I rather err on the side of correctness for mission critical things, and shifting checks we can (and already) do statically to CI feels to me like embracing `-fdefer-type-errors`... :-) Cheers, HVR From svenpanne at gmail.com Tue Dec 19 09:30:18 2017 From: svenpanne at gmail.com (Sven Panne) Date: Tue, 19 Dec 2017 10:30:18 +0100 Subject: Can't push to haddock In-Reply-To: <87k1xj14qf.fsf@gmail.com> References: <87k1xj14qf.fsf@gmail.com> Message-ID: 2017-12-19 9:50 GMT+01:00 Herbert Valerio Riedel : > We'd need mirroring anyway, as we want to keep control over our > infrastructure and not have to trust a 3rd party infrastructure to > safely handle our family jewels: GHC's source tree. > I think this is a question of perspective: Having the master repository on GitHub doesn't mean you are in immediate danger or lose your "family jewels". IMHO it's quite the contrary: I'm e.g. sure that in case that something goes wrong with GitHub, there is far more manpower behind it to fix that than for any self-hosted repository. And you can of course have some mirror of your GitHub repo in case of e.g. an earthquake/meteor/... in the San Francisco area... ;-) It seems to me that there is some hostility towards GitHub in GHC HQ, but I don't really understand why. GitHub serves other similar projects quite well, e.g. Rust, and I can't see why we should be special. > Also, catching bad commits "a bit later" is just asking for trouble -- > by the time they're caught the git repos have already lost their > invariant and its a big mess to recover; This is by no means different than saying: "I want to run 'validate' in the commit hook, otherwise it's a big mess." We don't do this for obvious reasons, and what is the "big mess" if there is some incorrect submodule reference for a short time span? How is that different from somebody introducing e.g. a subtle compiler bug in a commit? > the invariant I devised and > whose validation I implemented 4 years ago has served us pretty well, > and has ensured that we never glitched into incorrectness; I'm also not > sure why it's being suggested to switch to a less principled and more > fragile scheme now. [...] Because the whole repository structure is overly complicated and simply hosting everything on GitHub would simplify things. Again: I'm well aware that there are tradeoffs involved, but I would really appreciate simplifications. I have the impression that the entry barrier to GHC development has become larger and larger over the years, partly because of very non-standard tooling, partly because of the increasingly arcane repository organization. There are reasons that other projects like Rust attract far more developers... :-/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Tue Dec 19 09:47:15 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Tue, 19 Dec 2017 09:47:15 +0000 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: It seems to me that there is some hostility towards GitHub in GHC HQ, but I don't really understand why. GitHub serves other similar projects quite well, e.g. Rust, and I can't see why we should be special. Speaking for myself, I have no hostility towards GitHub, and there is no GHC-HQ bias against it that I know of. If it serves the purpose better, we should use it. Indeed that’s why I asked my original question. I agree with your point that data may actually be safer in GitHub than in our own repo. (And there is nothing to stop a belt-and-braces mirror backup system.) The issue is: does GitHub serve the purpose better? We have frequently debated this multi-dimensional question. And we should continue to do so: the answers may change over time (GitHub’s facilities are not static; and its increasing dominance is itself a cultural familiarity factor that simply was not the case five years ago). Simon From: Sven Panne [mailto:svenpanne at gmail.com] Sent: 19 December 2017 09:30 To: Herbert Valerio Riedel Cc: Simon Peyton Jones ; ghc-devs at haskell.org Devs Subject: Re: Can't push to haddock 2017-12-19 9:50 GMT+01:00 Herbert Valerio Riedel >: We'd need mirroring anyway, as we want to keep control over our infrastructure and not have to trust a 3rd party infrastructure to safely handle our family jewels: GHC's source tree. I think this is a question of perspective: Having the master repository on GitHub doesn't mean you are in immediate danger or lose your "family jewels". IMHO it's quite the contrary: I'm e.g. sure that in case that something goes wrong with GitHub, there is far more manpower behind it to fix that than for any self-hosted repository. And you can of course have some mirror of your GitHub repo in case of e.g. an earthquake/meteor/... in the San Francisco area... ;-) It seems to me that there is some hostility towards GitHub in GHC HQ, but I don't really understand why. GitHub serves other similar projects quite well, e.g. Rust, and I can't see why we should be special. Also, catching bad commits "a bit later" is just asking for trouble -- by the time they're caught the git repos have already lost their invariant and its a big mess to recover; This is by no means different than saying: "I want to run 'validate' in the commit hook, otherwise it's a big mess." We don't do this for obvious reasons, and what is the "big mess" if there is some incorrect submodule reference for a short time span? How is that different from somebody introducing e.g. a subtle compiler bug in a commit? the invariant I devised and whose validation I implemented 4 years ago has served us pretty well, and has ensured that we never glitched into incorrectness; I'm also not sure why it's being suggested to switch to a less principled and more fragile scheme now. [...] Because the whole repository structure is overly complicated and simply hosting everything on GitHub would simplify things. Again: I'm well aware that there are tradeoffs involved, but I would really appreciate simplifications. I have the impression that the entry barrier to GHC development has become larger and larger over the years, partly because of very non-standard tooling, partly because of the increasingly arcane repository organization. There are reasons that other projects like Rust attract far more developers... :-/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonetiger at gmail.com Tue Dec 19 10:07:59 2017 From: lonetiger at gmail.com (Phyx) Date: Tue, 19 Dec 2017 10:07:59 +0000 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: On Tue, Dec 19, 2017, 09:48 Simon Peyton Jones via ghc-devs < ghc-devs at haskell.org> wrote: > It seems to me that there is some hostility towards GitHub in GHC HQ, but > I don't really understand why. GitHub serves other similar projects quite > well, e.g. Rust, and I can't see why we should be special. > > Speaking for myself, I have no hostility towards GitHub, and there is no > GHC-HQ bias against it that I know of. If it serves the purpose better, we > should use it. Indeed that’s why I asked my original question. I agree > with your point that data may actually be safer in GitHub than in our own > repo. (And there is nothing to stop a belt-and-braces mirror backup > system.) > > > These are just a few of the times github has been down in 2017 http://currentlydown.com/github.com compared to haskell.org http://currentlydown.com/haskell.org Other third parties such as gitlab.com have suffered catastrophic data failures and by the very virtue of them being free means they don't owe you anything. I have nothing against github for small projects. I have nothing but hate for it for large ones. And I don't see that changing any time soon as everything they do seems to be half baked and the bare minimum > The issue is: does GitHub serve the purpose better? > http://currentlydown.co have frequently debated this multi-dimensional > question. And we should continue to do so: the answers may change over > time (GitHub’s facilities are not static; and its increasing dominance is > itself a cultural familiarity factor that simply was not the case five > years ago). > As is often the case in computing history. Dominance does not mean best nor fit for purpose. Supposedly switching to these cloud based CIs were suppose to solve all our issues. And to this day none of them are working not withstanding the massive amount of effort wasted to get them to work. Simon > > > > *From:* Sven Panne [mailto:svenpanne at gmail.com] > *Sent:* 19 December 2017 09:30 > *To:* Herbert Valerio Riedel > *Cc:* Simon Peyton Jones ; ghc-devs at haskell.org > Devs > > > *Subject:* Re: Can't push to haddock > > > > 2017-12-19 9:50 GMT+01:00 Herbert Valerio Riedel : > > We'd need mirroring anyway, as we want to keep control over our > infrastructure and not have to trust a 3rd party infrastructure to > safely handle our family jewels: GHC's source tree. > > > > I think this is a question of perspective: Having the master repository on > GitHub doesn't mean you are in immediate danger or lose your "family > jewels". IMHO it's quite the contrary: I'm e.g. sure that in case that > something goes wrong with GitHub, there is far more manpower behind it to > fix that than for any self-hosted repository. And you can of course have > some mirror of your GitHub repo in case of e.g. an earthquake/meteor/... in > the San Francisco area... ;-) > > > > It seems to me that there is some hostility towards GitHub in GHC HQ, but > I don't really understand why. GitHub serves other similar projects quite > well, e.g. Rust, and I can't see why we should be special. > > > > Also, catching bad commits "a bit later" is just asking for trouble -- > by the time they're caught the git repos have already lost their > invariant and its a big mess to recover; > > > > This is by no means different than saying: "I want to run 'validate' in > the commit hook, otherwise it's a big mess." We don't do this for obvious > reasons, and what is the "big mess" if there is some incorrect submodule > reference for a short time span? How is that different from somebody > introducing e.g. a subtle compiler bug in a commit? > > > > the invariant I devised and > whose validation I implemented 4 years ago has served us pretty well, > and has ensured that we never glitched into incorrectness; I'm also not > sure why it's being suggested to switch to a less principled and more > fragile scheme now. [...] > > > > Because the whole repository structure is overly complicated and simply > hosting everything on GitHub would simplify things. Again: I'm well aware > that there are tradeoffs involved, but I would really appreciate > simplifications. I have the impression that the entry barrier to GHC > development has become larger and larger over the years, partly because of > very non-standard tooling, partly because of the increasingly arcane > repository organization. There are reasons that other projects like Rust > attract far more developers... :-/ > > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chak at justtesting.org Tue Dec 19 10:15:48 2017 From: chak at justtesting.org (Manuel M T Chakravarty) Date: Tue, 19 Dec 2017 21:15:48 +1100 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: <6CCFE7BC-8180-4D73-B188-9BE9F2BC9223@justtesting.org> I believe the standard policy would be to say that even master may only dependent on released versions of dependencies. That is after all the only way to have a master that is always ready to be cut for a release (as per modern CI practices). Given the tight coupling of some of the dependencies of GHC with GHC, maybe we need to consider something weaker, but I think, the weakest reasonable (from a CI standpoint) policy is to say that, while master may depend on pre-release versions, release branches can *only* depend on released dependencies. In other words, a release branch can only be cut when master has progressed to a point where it only depends on released versions of its dependencies. Under that compromise, cutting a GHC release branch may be delayed by a delayed upstream release, but hopefully the approx 3 month release process has enough slack to tolerate that. (It is obviously not ideal, though.) Cheers, Manuel PS: Simon, I am sorry, but IMHO it is too early for a summary and policy proposal as the discussion hasn’t really converged yet. In any case, I am happy to write a summary Trac page once we are there. Is that ok? > 19.12.2017 06:41 Gershom B : > > Let me try to formulate a synthetic policy as per Simon's request: > > Policy: > Bundled library maintainers agree to the following: > 1) When GHC cuts a feature-freeze branch, they too (if anything has > changed) cut a feature-freeze branch within two weeks at the maximum > (ideally sooner), to be included in the main GHC freeze branch. If > they do not do so, the last released version will be included instead. > 2) When GHC releases the first release candidate, maintainers (if > anything has changed) release new versions of their packages, to then > be depended on directly in the GHC repo. All submodules are then > replaced with their proper released versions for GHC release. > > This policy can be enforced by GHC hq as part of the release process > with the exception of a case in which there's coupling so that a new > GHC _requires_ a new submodule release, and also the maintainer is not > responsive. We'll have to deal with that case directly, likely by just > appealing to the libraries committee or something to force a new > release :-) > > Motivation: > This should help address multiple issues: 1) holdup of ghc on other > releases. 2) lack of synchronization with ghc and other releases. 3) > low lead-time for people to adapt to API changes in forthcoming > library releases tied to ghc releases. In particular, because Cabal is > part of this policy, it should help circumvent the sorts of problems > that led to this thread initially. Further, because this only applies > to freeze/release branches, it should not slow down > rapid-implementation of cross-cutting changes more generally. > > Cheers, > Gershom > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From simonpj at microsoft.com Tue Dec 19 10:17:33 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Tue, 19 Dec 2017 10:17:33 +0000 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: Dominance does not mean best nor fit for purpose. I could not agree more. Dominance leads to familiarity, and that /is/ valuable. And dominance suggests that it is fit for purpose for a large group. But the question is: what is fit for our purposes? I think that is all that Herbert was getting at, and it’s the right question. I’m making no assumptions about the answer, just saying that we should have no built-in bias (for or against) cloud solutions. (And perhaps you are right to question my suggestion that a cloud repo is more reliable than a home-grown one. I have no data.) Simon From: Phyx [mailto:lonetiger at gmail.com] Sent: 19 December 2017 10:08 To: Simon Peyton Jones Cc: Herbert Valerio Riedel ; Sven Panne ; ghc-devs at haskell.org Devs Subject: Re: Can't push to haddock On Tue, Dec 19, 2017, 09:48 Simon Peyton Jones via ghc-devs > wrote: It seems to me that there is some hostility towards GitHub in GHC HQ, but I don't really understand why. GitHub serves other similar projects quite well, e.g. Rust, and I can't see why we should be special. Speaking for myself, I have no hostility towards GitHub, and there is no GHC-HQ bias against it that I know of. If it serves the purpose better, we should use it. Indeed that’s why I asked my original question. I agree with your point that data may actually be safer in GitHub than in our own repo. (And there is nothing to stop a belt-and-braces mirror backup system.) These are just a few of the times github has been down in 2017 http://currentlydown.com/github.com compared to haskell.org http://currentlydown.com/haskell.org Other third parties such as gitlab.com have suffered catastrophic data failures and by the very virtue of them being free means they don't owe you anything. I have nothing against github for small projects. I have nothing but hate for it for large ones. And I don't see that changing any time soon as everything they do seems to be half baked and the bare minimum The issue is: does GitHub serve the purpose better? http://currentlydown.co have frequently debated this multi-dimensional question. And we should continue to do so: the answers may change over time (GitHub’s facilities are not static; and its increasing dominance is itself a cultural familiarity factor that simply was not the case five years ago). As is often the case in computing history. Dominance does not mean best nor fit for purpose. Supposedly switching to these cloud based CIs were suppose to solve all our issues. And to this day none of them are working not withstanding the massive amount of effort wasted to get them to work. Simon From: Sven Panne [mailto:svenpanne at gmail.com] Sent: 19 December 2017 09:30 To: Herbert Valerio Riedel > Cc: Simon Peyton Jones >; ghc-devs at haskell.org Devs > Subject: Re: Can't push to haddock 2017-12-19 9:50 GMT+01:00 Herbert Valerio Riedel >: We'd need mirroring anyway, as we want to keep control over our infrastructure and not have to trust a 3rd party infrastructure to safely handle our family jewels: GHC's source tree. I think this is a question of perspective: Having the master repository on GitHub doesn't mean you are in immediate danger or lose your "family jewels". IMHO it's quite the contrary: I'm e.g. sure that in case that something goes wrong with GitHub, there is far more manpower behind it to fix that than for any self-hosted repository. And you can of course have some mirror of your GitHub repo in case of e.g. an earthquake/meteor/... in the San Francisco area... ;-) It seems to me that there is some hostility towards GitHub in GHC HQ, but I don't really understand why. GitHub serves other similar projects quite well, e.g. Rust, and I can't see why we should be special. Also, catching bad commits "a bit later" is just asking for trouble -- by the time they're caught the git repos have already lost their invariant and its a big mess to recover; This is by no means different than saying: "I want to run 'validate' in the commit hook, otherwise it's a big mess." We don't do this for obvious reasons, and what is the "big mess" if there is some incorrect submodule reference for a short time span? How is that different from somebody introducing e.g. a subtle compiler bug in a commit? the invariant I devised and whose validation I implemented 4 years ago has served us pretty well, and has ensured that we never glitched into incorrectness; I'm also not sure why it's being suggested to switch to a less principled and more fragile scheme now. [...] Because the whole repository structure is overly complicated and simply hosting everything on GitHub would simplify things. Again: I'm well aware that there are tradeoffs involved, but I would really appreciate simplifications. I have the impression that the entry barrier to GHC development has become larger and larger over the years, partly because of very non-standard tooling, partly because of the increasingly arcane repository organization. There are reasons that other projects like Rust attract far more developers... :-/ _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonpj at microsoft.com Tue Dec 19 10:20:05 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Tue, 19 Dec 2017 10:20:05 +0000 Subject: [GHC DevOps Group] Release policies In-Reply-To: <6CCFE7BC-8180-4D73-B188-9BE9F2BC9223@justtesting.org> References: <6CCFE7BC-8180-4D73-B188-9BE9F2BC9223@justtesting.org> Message-ID: | PS: Simon, I am sorry, but IMHO it is too early for a summary and policy | proposal as the discussion hasn’t really converged yet. In any case, I am | happy to write a summary Trac page once we are there. Is that ok? Yes, I'm perfectly happy with that, thank you. I just wanted to be sure that the discussion eventually converged rather than petering out. Many thanks to Gershom for putting out a concrete suggestion; I think that concrete proposals can help to focus a debate. Simon | -----Original Message----- | From: Manuel M T Chakravarty [mailto:chak at justtesting.org] | Sent: 19 December 2017 10:16 | To: Gershom Bazerman ; Simon Peyton Jones | | Cc: ghc-devs ; ghc-devops-group at haskell.org | Subject: Re: [GHC DevOps Group] Release policies | | I believe the standard policy would be to say that even master may only | dependent on released versions of dependencies. That is after all the | only way to have a master that is always ready to be cut for a release | (as per modern CI practices). | | Given the tight coupling of some of the dependencies of GHC with GHC, | maybe we need to consider something weaker, but I think, the weakest | reasonable (from a CI standpoint) policy is to say that, while master may | depend on pre-release versions, release branches can *only* depend on | released dependencies. In other words, a release branch can only be cut | when master has progressed to a point where it only depends on released | versions of its dependencies. | | Under that compromise, cutting a GHC release branch may be delayed by a | delayed upstream release, but hopefully the approx 3 month release | process has enough slack to tolerate that. (It is obviously not ideal, | though.) | | Cheers, | Manuel | | PS: Simon, I am sorry, but IMHO it is too early for a summary and policy | proposal as the discussion hasn’t really converged yet. In any case, I am | happy to write a summary Trac page once we are there. Is that ok? | | > 19.12.2017 06:41 Gershom B : | > | > Let me try to formulate a synthetic policy as per Simon's request: | > | > Policy: | > Bundled library maintainers agree to the following: | > 1) When GHC cuts a feature-freeze branch, they too (if anything has | > changed) cut a feature-freeze branch within two weeks at the maximum | > (ideally sooner), to be included in the main GHC freeze branch. If | > they do not do so, the last released version will be included instead. | > 2) When GHC releases the first release candidate, maintainers (if | > anything has changed) release new versions of their packages, to then | > be depended on directly in the GHC repo. All submodules are then | > replaced with their proper released versions for GHC release. | > | > This policy can be enforced by GHC hq as part of the release process | > with the exception of a case in which there's coupling so that a new | > GHC _requires_ a new submodule release, and also the maintainer is not | > responsive. We'll have to deal with that case directly, likely by just | > appealing to the libraries committee or something to force a new | > release :-) | > | > Motivation: | > This should help address multiple issues: 1) holdup of ghc on other | > releases. 2) lack of synchronization with ghc and other releases. 3) | > low lead-time for people to adapt to API changes in forthcoming | > library releases tied to ghc releases. In particular, because Cabal is | > part of this policy, it should help circumvent the sorts of problems | > that led to this thread initially. Further, because this only applies | > to freeze/release branches, it should not slow down | > rapid-implementation of cross-cutting changes more generally. | > | > Cheers, | > Gershom | > _______________________________________________ | > ghc-devs mailing list | > ghc-devs at haskell.org | > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From lonetiger at gmail.com Tue Dec 19 10:48:37 2017 From: lonetiger at gmail.com (Phyx) Date: Tue, 19 Dec 2017 10:48:37 +0000 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: On Tue, Dec 19, 2017, 09:32 Sven Panne wrote: > 2017-12-19 9:50 GMT+01:00 Herbert Valerio Riedel : > >> We'd need mirroring anyway, as we want to keep control over our >> infrastructure and not have to trust a 3rd party infrastructure to >> safely handle our family jewels: GHC's source tree. >> > > I think this is a question of perspective: Having the master repository on > GitHub doesn't mean you are in immediate danger or lose your "family > jewels". IMHO it's quite the contrary: I'm e.g. sure that in case that > something goes wrong with GitHub, there is far more manpower behind it to > fix that than for any self-hosted repository. And you can of course have > some mirror of your GitHub repo in case of e.g. an earthquake/meteor/... in > the San Francisco area... ;-) > > It seems to me that there is some hostility towards GitHub in GHC HQ, but > I don't really understand why. GitHub serves other similar projects quite > well, e.g. Rust, and I can't see why we should be special. > Rust and Roslyn which also uses github both have essentially replicated phabricator features to github to make things manageable. People often ignore this on this off-handed remark that Rust uses github. This https://github.com/rust-lang-nursery/rust-forge/blob/master/infrastructure.md is part of the changes rust which has the backing of a major sponsor has to maintain to even start handling github. And I point out we have all of those just build into phabricator. And of all the tools I've used. Github has by far the worst interface to do code reviews. It's handling of rebases which will wipe all existing review comments when you push (collapsing them into oblivion) is very problematic. I'm not even sure they fixed the bug that pushing a later PR with the same branch name as an existing PR will permanently remove all review comments from the older PR. We're not special, we just don't want to trade a superior tool for a more popular but inferior one. Aside from being popular. Does github objectively have on redeeming feature? > > >> Also, catching bad commits "a bit later" is just asking for trouble -- >> by the time they're caught the git repos have already lost their >> invariant and its a big mess to recover; > > > This is by no means different than saying: "I want to run 'validate' in > the commit hook, otherwise it's a big mess." We don't do this for obvious > reasons, and what is the "big mess" if there is some incorrect submodule > reference for a short time span? How is that different from somebody > introducing e.g. a subtle compiler bug in a commit? > > >> the invariant I devised and >> whose validation I implemented 4 years ago has served us pretty well, >> and has ensured that we never glitched into incorrectness; I'm also not >> sure why it's being suggested to switch to a less principled and more >> > fragile scheme now. [...] > > > Because the whole repository structure is overly complicated and simply > hosting everything on GitHub would simplify things. Again: I'm well aware > that there are tradeoffs involved, but I would really appreciate > simplifications. I have the impression that the entry barrier to GHC > development has become larger and larger over the years, partly because of > very non-standard tooling, partly because of the increasingly arcane > repository organization. There are reasons that other projects like Rust > attract far more developers... :-/ > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From svenpanne at gmail.com Tue Dec 19 10:56:20 2017 From: svenpanne at gmail.com (Sven Panne) Date: Tue, 19 Dec 2017 11:56:20 +0100 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: 2017-12-19 11:07 GMT+01:00 Phyx : > These are just a few of the times github has been down in 2017 > http://currentlydown.com/github.com compared to haskell.org http:// > currentlydown.com/haskell.org [...] > I can't see any data for haskell.org on that page, apart from the fact that it is up right now. Furthermore, I very much question the data on currentlydown.com: According to it, Google, Facebook, YouTube, Yahoo! and Amazon were down on March 25th for roughly an hour. A much more probable explanation: currentlydown.com had problems, not the five of the biggest sites in the world. This undermines the trust in the rest of the outage reports a bit... -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonetiger at gmail.com Tue Dec 19 11:47:29 2017 From: lonetiger at gmail.com (Phyx) Date: Tue, 19 Dec 2017 11:47:29 +0000 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: Cool, then let's turn to media reports then such as https://techcrunch.com/2017/07/31/github-goes-down-and-takes-developer-productivity-with-it/ do you have one for git.haskell.org going down? On Tue, Dec 19, 2017, 10:56 Sven Panne wrote: > 2017-12-19 11:07 GMT+01:00 Phyx : > >> These are just a few of the times github has been down in 2017 >> http://currentlydown.com/github.com compared to haskell.org >> http://currentlydown.com/haskell.org [...] >> > > I can't see any data for haskell.org on that page, apart from the fact > that it is up right now. Furthermore, I very much question the data on > currentlydown.com: According to it, Google, Facebook, YouTube, Yahoo! and > Amazon were down on March 25th for roughly an hour. A much more probable > explanation: currentlydown.com had problems, not the five of the biggest > sites in the world. This undermines the trust in the rest of the outage > reports a bit... > -------------- next part -------------- An HTML attachment was scrubbed... URL: From svenpanne at gmail.com Tue Dec 19 14:34:33 2017 From: svenpanne at gmail.com (Sven Panne) Date: Tue, 19 Dec 2017 15:34:33 +0100 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: 2017-12-19 12:47 GMT+01:00 Phyx : > Cool, then let's turn to media reports then such as > https://techcrunch.com/2017/07/31/github-goes-down-and-takes-developer- > productivity-with-it/ do you have one for git.haskell.org going down? Of course this question is a classic example of "the absence of evidence is not the evidence of absence" fallacy, but anyway: * https://www.reddit.com/r/haskell/comments/4gppm8/ann_hackagehaskellorg_is_down/ * http://blog.haskell.org/post/4/outages_and_improvements.../ * Searchs ghc-devs@ for posts regarding Phabricator updates, Server moves, problems with arc... (not exactly all downtimes, but in effect of the incidents are the same) I am not saying that the haskell.org infrastructure is bad, far from it, but it would be an illusion to think that it has a much higher effective uptime than GitHub. Furthermore: I don't think that the argument should revolve around uptime. We have a distributed version control system where people can happily work for an extended time span without *any* network at all, and the GHC source repository is not a financial application which would cause the loss of millions of dollars per minute if it's temporarily unavailable. The arguments should be about simplicity, ease of use, etc. Anyway, for my part the discussion is over, there *is* more or less open hostility towards GitHub/more standardized environments here. Is it an instance of the common "not invented here" syndrome or general mistrust in any kind of organization? I don't know... :-/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at snoyman.com Tue Dec 19 15:12:37 2017 From: michael at snoyman.com (Michael Snoyman) Date: Tue, 19 Dec 2017 17:12:37 +0200 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: Thanks for spelling this out Gershom. Reading it through, here are my questions: 1. What's the definition of "feature freeze"? Does it mean API stability? Does it mean not code changes at all except to fix a bug? Are performance fixes allowed in that case? 2. What's the minimum time between GHC cutting a feature-freeze branch and the first release candidate? And the minimum time between first release candidate and official release? Obviously, if each of these is 1 week (which I can't imagine would be the case), then these libraries could cut a feature-freeze branch after the official release, which obviously isn't intended. I apologize if these timings are already well established, I'm not familiar enough with GHC release cadence to know. I can't speak to GHC development itself, but from a downstream perspective, this sounds like the right direction. On Mon, Dec 18, 2017 at 9:41 PM, Gershom B wrote: > Let me try to formulate a synthetic policy as per Simon's request: > > Policy: > Bundled library maintainers agree to the following: > 1) When GHC cuts a feature-freeze branch, they too (if anything has > changed) cut a feature-freeze branch within two weeks at the maximum > (ideally sooner), to be included in the main GHC freeze branch. If > they do not do so, the last released version will be included instead. > 2) When GHC releases the first release candidate, maintainers (if > anything has changed) release new versions of their packages, to then > be depended on directly in the GHC repo. All submodules are then > replaced with their proper released versions for GHC release. > > This policy can be enforced by GHC hq as part of the release process > with the exception of a case in which there's coupling so that a new > GHC _requires_ a new submodule release, and also the maintainer is not > responsive. We'll have to deal with that case directly, likely by just > appealing to the libraries committee or something to force a new > release :-) > > Motivation: > This should help address multiple issues: 1) holdup of ghc on other > releases. 2) lack of synchronization with ghc and other releases. 3) > low lead-time for people to adapt to API changes in forthcoming > library releases tied to ghc releases. In particular, because Cabal is > part of this policy, it should help circumvent the sorts of problems > that led to this thread initially. Further, because this only applies > to freeze/release branches, it should not slow down > rapid-implementation of cross-cutting changes more generally. > > Cheers, > Gershom > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gershomb at gmail.com Tue Dec 19 17:28:43 2017 From: gershomb at gmail.com (Gershom B) Date: Tue, 19 Dec 2017 12:28:43 -0500 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: Good questions. In my below proposal I think I made an error in naming things. I checked back at the wiki page for the new release calendar schedule: https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Releases/NewSchedule Based on that, what I was calling "freeze" is really just cutting the branch. But it isn't intended as a full freeze. That happens 3 months before release. The "feature freeze" in that calendar only comes with the first RC, 1 month before release. I think that this timing still works with the proposal I have however -- bundled libs branch when GHC branches (T-3), and cut releases when GHC cuts the first RC (T-1). For bundled libs, I think we'd want to treat that branch (T-3) as closer to a feature freeze. However, and here I disagree with Manuel, I think there's plenty of reason to _not_ cut release versions of libs at the time of the T-3 branch. In particular, due to the coupling, this may cause trouble if there are cross-cutting changes that need to be implemented for the sake of GHC working properly over the three month duration of the alpha. If there's a feature in a library designed to work in conjunction with a change in GHC, and that change in GHC needs to be altered in the course of the alpha (which may not be uncommon -- bug testing can often reveal such things) then it is likely the library may need to be changed too. I don't see any concrete goal solved in making this process significantly more difficult. I thought Moritz' examples in this thread were very revealing with regards to such possibilities. It is not clear what cost function the stronger proposal is trying to optimize for. If it is that we want a branch that is "always ready to be cut for release" (why? is such a thing even possible anytime in the foreseeable future?), one middle ground may be to cut _candidate_ releases of bundled libs on branch (T-3). --Gershom On Tue, Dec 19, 2017 at 10:12 AM, Michael Snoyman wrote: > Thanks for spelling this out Gershom. Reading it through, here are my > questions: > > 1. What's the definition of "feature freeze"? Does it mean API stability? > Does it mean not code changes at all except to fix a bug? Are performance > fixes allowed in that case? > 2. What's the minimum time between GHC cutting a feature-freeze branch and > the first release candidate? And the minimum time between first release > candidate and official release? Obviously, if each of these is 1 week (which > I can't imagine would be the case), then these libraries could cut a > feature-freeze branch after the official release, which obviously isn't > intended. I apologize if these timings are already well established, I'm not > familiar enough with GHC release cadence to know. > > I can't speak to GHC development itself, but from a downstream perspective, > this sounds like the right direction. > > On Mon, Dec 18, 2017 at 9:41 PM, Gershom B wrote: >> >> Let me try to formulate a synthetic policy as per Simon's request: >> >> Policy: >> Bundled library maintainers agree to the following: >> 1) When GHC cuts a feature-freeze branch, they too (if anything has >> changed) cut a feature-freeze branch within two weeks at the maximum >> (ideally sooner), to be included in the main GHC freeze branch. If >> they do not do so, the last released version will be included instead. >> 2) When GHC releases the first release candidate, maintainers (if >> anything has changed) release new versions of their packages, to then >> be depended on directly in the GHC repo. All submodules are then >> replaced with their proper released versions for GHC release. >> >> This policy can be enforced by GHC hq as part of the release process >> with the exception of a case in which there's coupling so that a new >> GHC _requires_ a new submodule release, and also the maintainer is not >> responsive. We'll have to deal with that case directly, likely by just >> appealing to the libraries committee or something to force a new >> release :-) >> >> Motivation: >> This should help address multiple issues: 1) holdup of ghc on other >> releases. 2) lack of synchronization with ghc and other releases. 3) >> low lead-time for people to adapt to API changes in forthcoming >> library releases tied to ghc releases. In particular, because Cabal is >> part of this policy, it should help circumvent the sorts of problems >> that led to this thread initially. Further, because this only applies >> to freeze/release branches, it should not slow down >> rapid-implementation of cross-cutting changes more generally. >> >> Cheers, >> Gershom >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > From allbery.b at gmail.com Tue Dec 19 17:53:06 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Tue, 19 Dec 2017 12:53:06 -0500 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: On Tue, Dec 19, 2017 at 4:30 AM, Sven Panne wrote: > I think this is a question of perspective: Having the master repository on > GitHub doesn't mean you are in immediate danger or lose your "family > jewels". IMHO it's quite the contrary: I'm e.g. sure that in case that > something goes wrong with GitHub, there is far more manpower behind it to > fix that than for any self-hosted repository. And you can of course have > some mirror of your GitHub repo in case of e.g. an earthquake/meteor/... in > the San Francisco area... ;-) > You're also assuming github doesn't suddenly pull a SourceForge (or a Gitorious for that matter). Business cares not what it steamrolls in the name of profit. I fail to understand why, with multiple examples of the folly of this belief out there, people are still willing to bet on *this* company being *different* from all others and absolutely safe to trust. -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From gershomb at gmail.com Tue Dec 19 18:02:12 2017 From: gershomb at gmail.com (Gershom B) Date: Tue, 19 Dec 2017 13:02:12 -0500 Subject: Can't push to haddock Message-ID: > You're also assuming github doesn't suddenly pull a SourceForge (or a > Gitorious for that matter). Business cares not what it steamrolls in the > name of profit. > > I fail to understand why, with multiple examples of the folly of this > belief out there, people are still willing to bet on *this* company being > *different* from all others and absolutely safe to trust. What the heck is everyone arguing over? The initial statement was that even if we moved everything to github "We'd need mirroring anyway". That's it! There's no either/or involved. Just a statement that when you have data in one location, no matter how trustworthy, you want a backup as well. And ideally you want the backup under your control. We can debate moving anything anywhere all we want, but the idea that stuff should also be backed up, regardless, in a source not under third-party control, seems inoffensive and besides the point. --Gershom From michael at snoyman.com Tue Dec 19 20:38:11 2017 From: michael at snoyman.com (Michael Snoyman) Date: Tue, 19 Dec 2017 22:38:11 +0200 Subject: ghc-prim 0.5.1.1 not on Hackage Message-ID: The Stackage issue tracker just received an issue about ghc-prim 0.5.1.1. https://github.com/fpco/stackage/issues/3115 This version of the package has not been uploaded to Hackage, so: * The Stackage snapshots refer to 0.5.1.1 * The stackage.org documentation shows version 0.5.1.1 * `stack unpack` and `cabal unpack` both fail on ghc-prim-0.5.1.1 Also, it appears that the GHC 8.2.2 release notes still refer to ghc-prim 0.5.1.0. I'm happy to file an issue for this, but last time this popped up it was unclear if the issue should be filed on GHC Trac or the Hackage Trustees issue tracker. Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From chak at justtesting.org Wed Dec 20 01:15:42 2017 From: chak at justtesting.org (Manuel M T Chakravarty) Date: Wed, 20 Dec 2017 12:15:42 +1100 Subject: [GHC DevOps Group] Release policies In-Reply-To: References: Message-ID: <0383353F-5894-4993-96E2-71EEE64E3CB5@justtesting.org> Thanks for the terminology clarification, Gershom. As a general note, adding features or completing hitherto incomplete features on the release branch is something that should be avoided as much as possible. For starters, it is generally more work than doing it before the release branch is cut as things need to be added to master and the release branch, which slowly diverge. Moreover, the main purpose of the release branch is to stabilise the code base and to do so in a timely manner. As an example, if there is a new type system extension, but the error message are still bad, it may be allowed on the release branch with the understanding that the error messages are going to be fixed during the first month or so of the release branch lifecycle (i.e., the bulk of the work is done and tested before the release branch is cut). This in particular implies that everything merged to the release branch has to have been well tested (the wiki page states, ”[o]nly previously agreed on, stable and tested new functionality is allowed in.”) Implicitly adding new functionality by depending on a moving library dependency, which is out of the quality control of the GHC team, is not something that I would call ”stable and tested functionality". If we depend on the release version of a library on the release branch, we are still free to bump the library version if that is necessary to fix bugs (which may creep up due to GHC testing as you suggest) — I would expect that to be patch level bumps, though. If new library features are not sufficiently stable to move to that less tightly coupled process from T-3, then that feature set simply has to wait for the next GHC release (which by the new schedule will come much more quickly than before). Let me reiterate that the tighter release process is aimed at being able to achieve more frequent and more predictable GHC releases. This again ought to help the library development, too. In other words, we slow down at the right place to move faster overall (an old Kung Fu trick ;) Cheers, Manuel > 20.12.2017, 04:28 Gershom B : > > Good questions. In my below proposal I think I made an error in naming > things. I checked back at the wiki page for the new release calendar > schedule: https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Releases/NewSchedule > > Based on that, what I was calling "freeze" is really just cutting the > branch. But it isn't intended as a full freeze. That happens 3 months > before release. The "feature freeze" in that calendar only comes with > the first RC, 1 month before release. > > I think that this timing still works with the proposal I have however > -- bundled libs branch when GHC branches (T-3), and cut releases when > GHC cuts the first RC (T-1). For bundled libs, I think we'd want to > treat that branch (T-3) as closer to a feature freeze. > > However, and here I disagree with Manuel, I think there's plenty of > reason to _not_ cut release versions of libs at the time of the T-3 > branch. In particular, due to the coupling, this may cause trouble if > there are cross-cutting changes that need to be implemented for the > sake of GHC working properly over the three month duration of the > alpha. If there's a feature in a library designed to work in > conjunction with a change in GHC, and that change in GHC needs to be > altered in the course of the alpha (which may not be uncommon -- bug > testing can often reveal such things) then it is likely the library > may need to be changed too. I don't see any concrete goal solved in > making this process significantly more difficult. I thought Moritz' > examples in this thread were very revealing with regards to such > possibilities. It is not clear what cost function the stronger > proposal is trying to optimize for. > > If it is that we want a branch that is "always ready to be cut for > release" (why? is such a thing even possible anytime in the > foreseeable future?), one middle ground may be to cut _candidate_ > releases of bundled libs on branch (T-3). > > --Gershom > > > On Tue, Dec 19, 2017 at 10:12 AM, Michael Snoyman wrote: >> Thanks for spelling this out Gershom. Reading it through, here are my >> questions: >> >> 1. What's the definition of "feature freeze"? Does it mean API stability? >> Does it mean not code changes at all except to fix a bug? Are performance >> fixes allowed in that case? >> 2. What's the minimum time between GHC cutting a feature-freeze branch and >> the first release candidate? And the minimum time between first release >> candidate and official release? Obviously, if each of these is 1 week (which >> I can't imagine would be the case), then these libraries could cut a >> feature-freeze branch after the official release, which obviously isn't >> intended. I apologize if these timings are already well established, I'm not >> familiar enough with GHC release cadence to know. >> >> I can't speak to GHC development itself, but from a downstream perspective, >> this sounds like the right direction. >> >> On Mon, Dec 18, 2017 at 9:41 PM, Gershom B wrote: >>> >>> Let me try to formulate a synthetic policy as per Simon's request: >>> >>> Policy: >>> Bundled library maintainers agree to the following: >>> 1) When GHC cuts a feature-freeze branch, they too (if anything has >>> changed) cut a feature-freeze branch within two weeks at the maximum >>> (ideally sooner), to be included in the main GHC freeze branch. If >>> they do not do so, the last released version will be included instead. >>> 2) When GHC releases the first release candidate, maintainers (if >>> anything has changed) release new versions of their packages, to then >>> be depended on directly in the GHC repo. All submodules are then >>> replaced with their proper released versions for GHC release. >>> >>> This policy can be enforced by GHC hq as part of the release process >>> with the exception of a case in which there's coupling so that a new >>> GHC _requires_ a new submodule release, and also the maintainer is not >>> responsive. We'll have to deal with that case directly, likely by just >>> appealing to the libraries committee or something to force a new >>> release :-) >>> >>> Motivation: >>> This should help address multiple issues: 1) holdup of ghc on other >>> releases. 2) lack of synchronization with ghc and other releases. 3) >>> low lead-time for people to adapt to API changes in forthcoming >>> library releases tied to ghc releases. In particular, because Cabal is >>> part of this policy, it should help circumvent the sorts of problems >>> that led to this thread initially. Further, because this only applies >>> to freeze/release branches, it should not slow down >>> rapid-implementation of cross-cutting changes more generally. >>> >>> Cheers, >>> Gershom >>> _______________________________________________ >>> ghc-devs mailing list >>> ghc-devs at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> >> > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From chak at justtesting.org Wed Dec 20 01:30:45 2017 From: chak at justtesting.org (Manuel M T Chakravarty) Date: Wed, 20 Dec 2017 12:30:45 +1100 Subject: Can't push to haddock In-Reply-To: References: Message-ID: Thank you for that word of reason. (In addition to your very well stated point, the whole point of Git is that it is a *distributed* RCS. I don’t think, anything less than a full scale planetary nuclear war could really wipe out the GHC source code at this point.) Manuel > 20.12.2017 05:02 Gershom B : > >> You're also assuming github doesn't suddenly pull a SourceForge (or a >> Gitorious for that matter). Business cares not what it steamrolls in the >> name of profit. >> >> I fail to understand why, with multiple examples of the folly of this >> belief out there, people are still willing to bet on *this* company being >> *different* from all others and absolutely safe to trust. > > What the heck is everyone arguing over? The initial statement was that > even if we moved everything to github "We'd need mirroring anyway". > That's it! There's no either/or involved. Just a statement that when > you have data in one location, no matter how trustworthy, you want a > backup as well. And ideally you want the backup under your control. > > We can debate moving anything anywhere all we want, but the idea that > stuff should also be backed up, regardless, in a source not under > third-party control, seems inoffensive and besides the point. > > --Gershom > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From chak at justtesting.org Wed Dec 20 01:47:00 2017 From: chak at justtesting.org (Manuel M T Chakravarty) Date: Wed, 20 Dec 2017 12:47:00 +1100 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: <31114271-8CCA-4A38-B5D7-4885D4F6D131@justtesting.org> I think, what Sven is getting at here —and I do have to say, I concur— is that there is a bit of NIH (Not Invented Here) syndrome in parts of the Haskell community. I think, part of it is just inertia and the desire to keep things the same, because that is easier and more familiar. One aspect that complicates this discussion significantly is that GHC dev has developed certain work arounds and ways of doing things, where third party infrastructure seems lacking in features, because it doesn’t support all these quirks. However, it turns out that if we are only prepared to change our workflow and processes to align with modern software development practices, many of theses ”features” aren’t actually necessary. We have seen quite a bit of that in the CI discussion. I am not writing this to blame anything or anybody. I think, it is a normal part of a healthy process of change. However, it complicates the discussion as people get hung up on individual technicalities, such as this or that feature is missing, without considering the big picture. Generally, I think, a worthwhile golden rule in ops is that custom infrastructure is bad. It creates extra work, technical debt, and failure points. So, IMHO the default ought to be to use 3rd part infrastructure (like GitHub) and only augment that where absolutely necessary. This will simply leave us with more time to write Haskell code in GHC instead of building, maintaining, and supporting GHC infrastructure. Cheers, Manuel > 19.12.2017 20:47 Simon Peyton Jones via ghc-devs : > > It seems to me that there is some hostility towards GitHub in GHC HQ, but I don't really understand why. GitHub serves other similar projects quite well, e.g. Rust, and I can't see why we should be special. > > Speaking for myself, I have no hostility towards GitHub, and there is no GHC-HQ bias against it that I know of. If it serves the purpose better, we should use it. Indeed that’s why I asked my original question. I agree with your point that data may actually be safer in GitHub than in our own repo. (And there is nothing to stop a belt-and-braces mirror backup system.) > > The issue is: does GitHub serve the purpose better? We have frequently debated this multi-dimensional question. And we should continue to do so: the answers may change over time (GitHub’s facilities are not static; and its increasing dominance is itself a cultural familiarity factor that simply was not the case five years ago). > > Simon > > From: Sven Panne [mailto:svenpanne at gmail.com] > Sent: 19 December 2017 09:30 > To: Herbert Valerio Riedel > Cc: Simon Peyton Jones ; ghc-devs at haskell.org Devs > Subject: Re: Can't push to haddock > > 2017-12-19 9:50 GMT+01:00 Herbert Valerio Riedel >: > > We'd need mirroring anyway, as we want to keep control over our > infrastructure and not have to trust a 3rd party infrastructure to > safely handle our family jewels: GHC's source tree. > > > > I think this is a question of perspective: Having the master repository on GitHub doesn't mean you are in immediate danger or lose your "family jewels". IMHO it's quite the contrary: I'm e.g. sure that in case that something goes wrong with GitHub, there is far more manpower behind it to fix that than for any self-hosted repository. And you can of course have some mirror of your GitHub repo in case of e.g. an earthquake/meteor/... in the San Francisco area... ;-) > > > > It seems to me that there is some hostility towards GitHub in GHC HQ, but I don't really understand why. GitHub serves other similar projects quite well, e.g. Rust, and I can't see why we should be special. > > > > Also, catching bad commits "a bit later" is just asking for trouble -- > by the time they're caught the git repos have already lost their > invariant and its a big mess to recover; > > > > This is by no means different than saying: "I want to run 'validate' in the commit hook, otherwise it's a big mess." We don't do this for obvious reasons, and what is the "big mess" if there is some incorrect submodule reference for a short time span? How is that different from somebody introducing e.g. a subtle compiler bug in a commit? > > > > the invariant I devised and > whose validation I implemented 4 years ago has served us pretty well, > and has ensured that we never glitched into incorrectness; I'm also not > sure why it's being suggested to switch to a less principled and more > fragile scheme now. [...] > > > > Because the whole repository structure is overly complicated and simply hosting everything on GitHub would simplify things. Again: I'm well aware that there are tradeoffs involved, but I would really appreciate simplifications. I have the impression that the entry barrier to GHC development has become larger and larger over the years, partly because of very non-standard tooling, partly because of the increasingly arcane repository organization. There are reasons that other projects like Rust attract far more developers... :-/ > > > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From gershomb at gmail.com Wed Dec 20 01:53:22 2017 From: gershomb at gmail.com (Gershom B) Date: Tue, 19 Dec 2017 20:53:22 -0500 Subject: [GHC DevOps Group] Release policies In-Reply-To: <0383353F-5894-4993-96E2-71EEE64E3CB5@justtesting.org> References: <0383353F-5894-4993-96E2-71EEE64E3CB5@justtesting.org> Message-ID: On December 19, 2017 at 8:15:49 PM, Manuel M T Chakravarty (chak at justtesting.org) wrote: > > > This in particular implies that everything merged to the release > branch has to have been well tested (the wiki page states, ”[o]nly > previously agreed on, stable and tested new functionality is > allowed in.”) Ok — here’s where I get confused. In my experience, “well tested” is a relative term. Certainly if we want a three month period between branch and release, that’s because we’re expecting a _fair amount_ of bugs to shake out over that period. As you point out, the wiki page says “agreed on, stable and tested.” But nonetheless — that’s leaving a fair amount of room for bugs to be found. Since there’s a period when features are written, and another in which focus is all on bugfixing, then this is to be expected. Keeping moving the barrier for making it into even a _branch_ higher and higher seems weird to me. We’re already creating a new set of significant barriers by even starting to have this branch process at all. > Implicitly adding new functionality by depending > on a moving library dependency, which is out of the quality control > of the GHC team, is not something that I would call ”stable and > tested functionality”. And now here’s where you lose me entirely. The point is you wouldn’t be depending on a moving library dependency. You’d be depending on a _release branch_ just the same as GHC. Unless you mean to say that we shouldn’t trust the maintainers of bundled packages to only put “stable and tested” features in to a release branch? In the abstract, sure. If we were just including random github repos sourced from stackoverflow answers, sure. But in the actual concrete history of GHC and Haskell development — we know the maintainers of these libs. We know they move slowly in general, and they have processes too. And we know that if these libs, which are hard to upgrade on their own (because they’re bundled with GHC), are going to get a wide exposure to not just internal tests, but external users, it will be via being bundled with GHC. Since I would expect, based on past experience, that bundled libraries will often need small bugfixes and tweaks, as you agree, then what you’ve just sort of proposed is that we release extra versions of them that end up not bundled with GHC versions, and which are less well tested. What is the difference between cutting a branch and depending on it, which is what I propose, and what you propose, except that we’ll end up with extra version bumps in your scheme, and hackage packages with bugs that haven’t had a chance to be shaken out, and may, in some cases (integer-gmp, ghc-prim, base), not even make _sense_ outside of a GHC release. I understand that its not pleasant, but GHC and the bundled packages have, for the time being, a very special relationship. We can’t decouple them by administrative fiat. GHC depends on them, and they also need GHC to run. So their lifecycles are intertwined, and their development processes are intertwined. This is how they have been developed and maintained for years. Why do we suddenly want to pretend that now these maintainers are “out of the quality control of the GHC team” like they’re foreign entities? I also want to underline this is not about “new library features” as such — this is about cross-cutting development of the sort Moritz described that requires modifying GHC and bundled libs both. Another element of the two-way character of this relationship is that when GHC develops a new feature, often it is the bundled libs that are the first to take advantage of it — and this is a good thing, as it allows further stress-testing of the feature. (And sometimes, with certain deprication warnings, etc., the feature is even especially _for_ those libs). But if the feature turns out to need tweaks in the stability period (and this is far from unheard of) then it is the bundled libs that need to change to adapt. If you have already pinned yourself to released versions of libs, this is very hard! It would be nice if bundled libs were upstream of GHC, but they’re not, so we should stop pretending. Everyone’s in the same stream together, and everyone will have to agree to row :-) Again — what is objectionable to having a release branch cut instead of a full release at T-3? What danger from this do you anticipate? Personally, I see only upside. More flexibility — same mitigation of risk, same alignment of processes. We already have a number of changes in the pipeline, not least the new schedule in any form. How about we try that, along with a more modest proposal for bundled libs, and just _see how it feels_ before making any futher decisions. A “big bang” in process doesn’t need to be bigger — that only introduces more risk factors that will prevent us from evaluating the first changeset independently. Honestly, before making any further policy I’d just like to see if one or two releases can be done with the new schedule at all, at which point people will better be able to judge what the remaining pain points really are, instead of speculating about other future problems. —Gershom From lonetiger at gmail.com Wed Dec 20 10:16:45 2017 From: lonetiger at gmail.com (Phyx) Date: Wed, 20 Dec 2017 10:16:45 +0000 Subject: ghc-prim 0.5.1.1 not on Hackage In-Reply-To: References: Message-ID: Hmm I think this one belongs on the ghc trac. The version doesn't seem to exist in master either https://github.com/ghc/ghc/commits/master/libraries/ghc-prim/ghc-prim.cabal and only exists in the 8.2 branch. The commit and bug report it references #14171 doesn't seem to have any code changes to ghc-prim (that I can see). So I'm not sure why this was bumped. So this version is a bit of a mystery.. On Tue, Dec 19, 2017, 20:47 Michael Snoyman wrote: > The Stackage issue tracker just received an issue about ghc-prim 0.5.1.1. > > https://github.com/fpco/stackage/issues/3115 > > This version of the package has not been uploaded to Hackage, so: > > * The Stackage snapshots refer to 0.5.1.1 > * The stackage.org documentation shows version 0.5.1.1 > * `stack unpack` and `cabal unpack` both fail on ghc-prim-0.5.1.1 > > Also, it appears that the GHC 8.2.2 release notes still refer to ghc-prim > 0.5.1.0. > > I'm happy to file an issue for this, but last time this popped up it was > unclear if the issue should be filed on GHC Trac or the Hackage Trustees > issue tracker. > > Michael > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at smart-cactus.org Wed Dec 20 16:55:36 2017 From: ben at smart-cactus.org (Ben Gamari) Date: Wed, 20 Dec 2017 11:55:36 -0500 Subject: ghc-prim 0.5.1.1 not on Hackage In-Reply-To: References: Message-ID: <87ind1cpa4.fsf@ben-laptop.smart-cactus.org> Phyx writes: > Hmm I think this one belongs on the ghc trac. > > The version doesn't seem to exist in master either > https://github.com/ghc/ghc/commits/master/libraries/ghc-prim/ghc-prim.cabal > and only exists in the 8.2 branch. > > The commit and bug report it references #14171 doesn't seem to have any > code changes to ghc-prim (that I can see). So I'm not sure why this was > bumped. > The change in that commit fixes the semantics of retry# which is exported from GHC.Prim, so I felt that a minor bump at very least was necessary. > So this version is a bit of a mystery.. > > On Tue, Dec 19, 2017, 20:47 Michael Snoyman wrote: > >> The Stackage issue tracker just received an issue about ghc-prim 0.5.1.1. >> >> https://github.com/fpco/stackage/issues/3115 >> >> This version of the package has not been uploaded to Hackage, so: >> >> * The Stackage snapshots refer to 0.5.1.1 >> * The stackage.org documentation shows version 0.5.1.1 >> * `stack unpack` and `cabal unpack` both fail on ghc-prim-0.5.1.1 >> >> Also, it appears that the GHC 8.2.2 release notes still refer to ghc-prim >> 0.5.1.0. >> Indeed, keeping this in sync has always been a nightmare. I've reworked the release notes in 8.4 to make this correct by construction. >> I'm happy to file an issue for this, but last time this popped up it was >> unclear if the issue should be filed on GHC Trac or the Hackage Trustees >> issue tracker. >> Herbert says he will upload ghc-prim in the next day or so. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From ben at well-typed.com Wed Dec 20 17:36:28 2017 From: ben at well-typed.com (Ben Gamari) Date: Wed, 20 Dec 2017 12:36:28 -0500 Subject: Can't push to haddock In-Reply-To: References: <87k1xj14qf.fsf@gmail.com> Message-ID: <87efnpcne1.fsf@ben-laptop.smart-cactus.org> Sven Panne writes: > 2017-12-19 12:47 GMT+01:00 Phyx : > >> Cool, then let's turn to media reports then such as >> https://techcrunch.com/2017/07/31/github-goes-down-and-takes-developer- >> productivity-with-it/ do you have one for git.haskell.org going down? > > > Of course this question is a classic example of "the absence of evidence is > not the evidence of absence" fallacy, but anyway: > > * > https://www.reddit.com/r/haskell/comments/4gppm8/ann_hackagehaskellorg_is_down/ > * http://blog.haskell.org/post/4/outages_and_improvements.../ > * Searchs ghc-devs@ for posts regarding Phabricator updates, Server moves, > problems with arc... (not exactly all downtimes, but in effect of the > incidents are the same) > > I am not saying that the haskell.org infrastructure is bad, far from it, > but it would be an illusion to think that it has a much higher effective > uptime than GitHub. Furthermore: I don't think that the argument should > revolve around uptime. We have a distributed version control system where > people can happily work for an extended time span without *any* network at > all, and the GHC source repository is not a financial application which > would cause the loss of millions of dollars per minute if it's temporarily > unavailable. The arguments should be about simplicity, ease of use, etc. > > Anyway, for my part the discussion is over, there *is* more or less open > hostility towards GitHub/more standardized environments here. Is it an > instance of the common "not invented here" syndrome or general mistrust in > any kind of organization? I don't know... :-/ I'm not sure that it's either of these; rather I think GHC is simply a large project with a rather distinct set of needs than most smaller FOSS projects. It is not at all uncommon for large projects to have their own infrastructure: LLVM, GCC, golang, GNOME, KDE, the Linux kernel, blender, firefox, FreeBSD, and many others all use their own infrastructure for code review, issue tracking, code hosting or all three. We are quite far from being alone in this regard. For what it's worth, I'm not necessarily opposed to moving hosting of GHC's repositories to GitHub, GitLab or nearly any other hosting solution assuming that a few things can be ensured: * Trac notifications continue to work * Commits containing bad submodule references don't make it into the tree * We have a means of controlling who can push to which branch namespaces * We don't need to manually synchronize contributor keys to/from Phabricator Note that moving code review or issue tracking to GitHub is a much different question and I think there are good reasons to be skeptical of such proposals, especially in the case of the issue tracking. Regardless, I suspect this is a discussion best had on the devops list. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From ben at well-typed.com Wed Dec 20 20:48:00 2017 From: ben at well-typed.com (Ben Gamari) Date: Wed, 20 Dec 2017 15:48:00 -0500 Subject: [ANNOUNCE] GHC 8.4.1-alpha1 available Message-ID: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> The GHC development team is pleased to announce the first alpha release of the 8.4.1 release. The usual release artifacts are available from https://downloads.haskell.org/~ghc/8.4.1-alpha1 Note that this release drops compatibility with GCC 4.6 and earlier. While we generally try to place as few constraints on system toolchain as possible, this release depends upon the __atomic__ builtins provided by GCC 4.7 and later (see #14244). === Notes on release scheduling === The 8.4.1 release marks the first release where GHC will be adhering to its new, higher-cadence release schedule [1]. Under this new scheme, major releases will be made in 6-month intervals with interstitial minor releases as necessary. In order to minimize the likelihood of schedule slippage and to ensure adequate testing, each major release will be preceeded by a number of regular alpha releases. We will begin issuing these releases roughly three months before the final date of the major release and will issue roughly one every two weeks during this period. This high release cadence will allow us to quickly get fixes in to users hands and allow better feedback on the status of the release. GHC 8.4 is slated to be released in mid-February but, due to technical constraints, we are starting the alpha-release cycle a bit later than planned under the above schedule. For this reason, it would be greatly appreciated if users could put this alpha through its paces to make up for lost time. As always, do let us know if you encounter any trouble in the course of testing. Thanks for your help! Cheers, - Ben [1] https://ghc.haskell.org/trac/ghc/blog/2017-release-schedule -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From george.colpitts at gmail.com Thu Dec 21 20:16:01 2017 From: george.colpitts at gmail.com (George Colpitts) Date: Thu, 21 Dec 2017 20:16:01 +0000 Subject: [ANNOUNCE] GHC 8.4.1-alpha1 available In-Reply-To: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> References: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> Message-ID: Thanks Ben. I installed the Mac binaries. For others who are wondering, you need llvm 5 if you want to use llvm with this. Needless to say, many libraries, e.g. haskell-src-exts, primitive, and intero won't compile with this even with --allow-newer I'll notify those libraries about that in case they want to get started on 8.4.1 Cheers George On Wed, Dec 20, 2017 at 4:48 PM Ben Gamari wrote: > > The GHC development team is pleased to announce the first alpha release > of the 8.4.1 release. The usual release artifacts are available from > > https://downloads.haskell.org/~ghc/8.4.1-alpha1 > > Note that this release drops compatibility with GCC 4.6 and earlier. > While we generally try to place as few constraints on system toolchain > as possible, this release depends upon the __atomic__ builtins provided > by GCC 4.7 and later (see #14244). > > > === Notes on release scheduling === > > The 8.4.1 release marks the first release where GHC will be adhering to > its new, higher-cadence release schedule [1]. Under this new scheme, > major releases will be made in 6-month intervals with interstitial minor > releases as necessary. > > In order to minimize the likelihood of schedule slippage and to ensure > adequate testing, each major release will be preceeded by a number of > regular alpha releases. We will begin issuing these releases roughly > three months before the final date of the major release and will issue > roughly one every two weeks during this period. This high release > cadence will allow us to quickly get fixes in to users hands and allow > better feedback on the status of the release. > > GHC 8.4 is slated to be released in mid-February but, due to technical > constraints, we are starting the alpha-release cycle a bit later than > planned under the above schedule. For this reason, it would be greatly > appreciated if users could put this alpha through its paces to make up > for lost time. > > As always, do let us know if you encounter any trouble in the course of > testing. Thanks for your help! > > Cheers, > > - Ben > > > [1] https://ghc.haskell.org/trac/ghc/blog/2017-release-schedule > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.grenrus at iki.fi Thu Dec 21 20:48:45 2017 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Thu, 21 Dec 2017 22:48:45 +0200 Subject: [ANNOUNCE] GHC 8.4.1-alpha1 available In-Reply-To: References: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> Message-ID: <8a344c58-3a9b-944e-baa2-d4e10827136d@iki.fi> I copy & paste Hervert's reddit answer here [1], for ones who don't follow it: As the suffix "alpha" implies, this is a very bleeding edge release with very little guarantees regarding API stability (c.f. new GHC schedule [2] ). Put differently, a package that works now with GHC 8.4.1-alpha1 may not necessarily work with the final GHC 8.4.1 release. In order to support early adopters in testing GHC 8.4.1-alpha, there's a new Overlay Hackage Package Index [3] which provides packages patched for unreleased GHCs (currently GHC 8.4.1-alpha1 & GHC 8.5/HEAD). See its README [4] for instructions on how to use it; there's also a shell script included which automates common workflows; finally there's also support for HEAD.hackage in themake-travis-yml Travis CI script generator . [5] Don't hesitate to ask if you have questions! As usual, there's already an (incomplete & work-in-progress) GHC 8.4.x Migration Guide [6] you can consult and maybe even help complete. Links: - [1]: https://www.reddit.com/r/haskell/comments/7l4b19/announce_ghc_841alpha1_available/drjlc3w/ - [2]: https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Releases/NewSchedule - [3]: https://github.com/hvr/head.hackage - [4]: https://github.com/hvr/head.hackage#README - [5]: https://github.com/haskell-hvr/multi-ghc-travis - [6]: https://ghc.haskell.org/trac/ghc/wiki/Migration/8.4 Cheers, Oleg On 21.12.2017 22:16, George Colpitts wrote: > Thanks Ben. I installed the Mac binaries. > > For others who are wondering, you need llvm 5 if you want to use llvm > with this. > > Needless to say, many libraries, e.g. haskell-src-exts, primitive, and > intero won't compile with this even with --allow-newer > > I'll notify those libraries about that in case they want to get > started on 8.4.1 > > Cheers > George > > On Wed, Dec 20, 2017 at 4:48 PM Ben Gamari > wrote: > > > The GHC development team is pleased to announce the first alpha > release > of the 8.4.1 release. The usual release artifacts are available from > >     https://downloads.haskell.org/~ghc/8.4.1-alpha1 > > > Note that this release drops compatibility with GCC 4.6 and earlier. > While we generally try to place as few constraints on system toolchain > as possible, this release depends upon the __atomic__ builtins > provided > by GCC 4.7 and later (see #14244). > > > === Notes on release scheduling === > > The 8.4.1 release marks the first release where GHC will be > adhering to > its new, higher-cadence release schedule [1]. Under this new scheme, > major releases will be made in 6-month intervals with interstitial > minor > releases as necessary. > > In order to minimize the likelihood of schedule slippage and to ensure > adequate testing, each major release will be preceeded by a number of > regular alpha releases. We will begin issuing these releases roughly > three months before the final date of the major release and will issue > roughly one every two weeks during this period. This high release > cadence will allow us to quickly get fixes in to users hands and allow > better feedback on the status of the release. > > GHC 8.4 is slated to be released in mid-February but, due to technical > constraints, we are starting the alpha-release cycle a bit later than > planned under the above schedule. For this reason, it would be greatly > appreciated if users could put this alpha through its paces to make up > for lost time. > > As always, do let us know if you encounter any trouble in the > course of > testing. Thanks for your help! > > Cheers, > > - Ben > > > [1] https://ghc.haskell.org/trac/ghc/blog/2017-release-schedule > _______________________________________________ > Glasgow-haskell-users mailing list > Glasgow-haskell-users at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From tab at snarc.org Thu Dec 21 21:57:49 2017 From: tab at snarc.org (Vincent Hanquez) Date: Thu, 21 Dec 2017 21:57:49 +0000 Subject: [ANNOUNCE] GHC 8.4.1-alpha1 available In-Reply-To: <8a344c58-3a9b-944e-baa2-d4e10827136d@iki.fi> References: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> <8a344c58-3a9b-944e-baa2-d4e10827136d@iki.fi> Message-ID: On 21/12/17 20:48, Oleg Grenrus wrote: > I copy & paste Hervert's reddit answer here [1], for ones who don't > follow it: > > As the suffix "alpha" implies, this is a very bleeding edge release with > very little guarantees regarding API stability (c.f. new GHC schedule > [2] > ). > > Put differently, a package that works now with GHC 8.4.1-alpha1 may not > necessarily work with the final GHC 8.4.1 release. A package that works now with -alpha1 doesn't have to be the same as the one that work with the final release. (And that's only in the unlikely case that an alpha->final break API which in most cases it really shouldn't) Resorting to another system than the common system for testing, means much less people are actually going to have the opportunity to integrate it in their test suite, which ultimately reduces GHC QA at large. -- Vincent From george.colpitts at gmail.com Fri Dec 22 13:22:12 2017 From: george.colpitts at gmail.com (George Colpitts) Date: Fri, 22 Dec 2017 13:22:12 +0000 Subject: [ANNOUNCE] GHC 8.4.1-alpha1 available In-Reply-To: References: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> Message-ID: Probably stating what is obvious and well-know but anyways: - On the status page it would be good to have a link for "Phase 2 of the Semigroup-Monoid Proposal (Herbert Riedel)" - Also IIRC we normally have a page on porting to the new release. It would be good to have that also when we have a chance. It's great that we are getting started early. On Thu, Dec 21, 2017 at 4:16 PM George Colpitts wrote: > Thanks Ben. I installed the Mac binaries. > > For others who are wondering, you need llvm 5 if you want to use llvm with > this. > > Needless to say, many libraries, e.g. haskell-src-exts, primitive, and > intero won't compile with this even with --allow-newer > > I'll notify those libraries about that in case they want to get started on > 8.4.1 > > Cheers > George > > On Wed, Dec 20, 2017 at 4:48 PM Ben Gamari wrote: > >> >> The GHC development team is pleased to announce the first alpha release >> of the 8.4.1 release. The usual release artifacts are available from >> >> https://downloads.haskell.org/~ghc/8.4.1-alpha1 >> >> Note that this release drops compatibility with GCC 4.6 and earlier. >> While we generally try to place as few constraints on system toolchain >> as possible, this release depends upon the __atomic__ builtins provided >> by GCC 4.7 and later (see #14244). >> >> >> === Notes on release scheduling === >> >> The 8.4.1 release marks the first release where GHC will be adhering to >> its new, higher-cadence release schedule [1]. Under this new scheme, >> major releases will be made in 6-month intervals with interstitial minor >> releases as necessary. >> >> In order to minimize the likelihood of schedule slippage and to ensure >> adequate testing, each major release will be preceeded by a number of >> regular alpha releases. We will begin issuing these releases roughly >> three months before the final date of the major release and will issue >> roughly one every two weeks during this period. This high release >> cadence will allow us to quickly get fixes in to users hands and allow >> better feedback on the status of the release. >> >> GHC 8.4 is slated to be released in mid-February but, due to technical >> constraints, we are starting the alpha-release cycle a bit later than >> planned under the above schedule. For this reason, it would be greatly >> appreciated if users could put this alpha through its paces to make up >> for lost time. >> >> As always, do let us know if you encounter any trouble in the course of >> testing. Thanks for your help! >> >> Cheers, >> >> - Ben >> >> >> [1] https://ghc.haskell.org/trac/ghc/blog/2017-release-schedule >> _______________________________________________ >> Glasgow-haskell-users mailing list >> Glasgow-haskell-users at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewtpickering at gmail.com Fri Dec 22 17:08:37 2017 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Fri, 22 Dec 2017 17:08:37 +0000 Subject: Nested CPR patch review Message-ID: Hi all, I recently resurrected akio's nested cpr branch and put it on phabricator for review. https://phabricator.haskell.org/D4244 Sebastian has kindly been going over it and ironed out a few kinks in the last few days. He says now that he believes the patch is correct. Is there anything else which needs to be done before merging this patch? Simon, would you perhaps be able to give the patch a look over? Cheers, Matt From ben at well-typed.com Fri Dec 22 17:08:47 2017 From: ben at well-typed.com (Ben Gamari) Date: Fri, 22 Dec 2017 12:08:47 -0500 Subject: [ANNOUNCE] GHC 8.4.1-alpha1 available In-Reply-To: References: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> Message-ID: <871sjmd71h.fsf@ben-laptop.smart-cactus.org> George Colpitts writes: > Probably stating what is obvious and well-know but anyways: > > - On the status page > it would be > good to have a link for "Phase 2 of the Semigroup-Monoid Proposal (Herbert > Riedel)" Good catch. I've added a link. > - Also IIRC we normally have a page on porting to the new release. It > would be good to have that also when we have a chance. > Indeed, the migration page can be found here: https://ghc.haskell.org/trac/ghc/wiki/Migration/8.4. I've added a link to the 8.4 status page. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From simonpj at microsoft.com Fri Dec 22 17:27:54 2017 From: simonpj at microsoft.com (Simon Peyton Jones) Date: Fri, 22 Dec 2017 17:27:54 +0000 Subject: Nested CPR patch review In-Reply-To: References: Message-ID: Terrific! What are the nofib results? Can we have a couple of artificial benchmarks in cpranal/should_run that show substantial perf improvements because the nested CPR wins in some inner loop? Is https://ghc.haskell.org/trac/ghc/wiki/NestedCPR still an accurate summary of the idea? And the Akio2017 sub-page? It would be easier to review the code if the design documentation accurately described it. I'll look in the new year. Thanks! Simon | -----Original Message----- | From: Matthew Pickering [mailto:matthewtpickering at gmail.com] | Sent: 22 December 2017 17:09 | To: GHC developers ; Simon Peyton Jones | ; Joachim Breitner ; | tkn.akio at gmail.com; Sebastian Graf | Subject: Nested CPR patch review | | Hi all, | | I recently resurrected akio's nested cpr branch and put it on phabricator | for review. | | https://phabricator.haskell.org/D4244 | | Sebastian has kindly been going over it and ironed out a few kinks in the | last few days. He says now that he believes the patch is correct. | | Is there anything else which needs to be done before merging this patch? | | Simon, would you perhaps be able to give the patch a look over? | | Cheers, | | Matt From carter.schonwald at gmail.com Sun Dec 24 22:02:15 2017 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Sun, 24 Dec 2017 17:02:15 -0500 Subject: validate failure on Mac OSX for ghc head (validate fails with clang) Message-ID: hey All, the current settings for warnings etc for ghc validate do not work on mac, this is because some gcc flag isn't in clang, or vice versa, or some version of gcc related matter the relevant error is: error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option] the culprit seems to be apple clang, at least if my reading of the config output by validate is correct Configure completed successfully. Building GHC version : 8.5.20171223 Git commit id : d7d0aa316f9d23d73ae617e0cc1b147907667ef4 Build platform : x86_64-apple-darwin Host platform : x86_64-apple-darwin Target platform : x86_64-apple-darwin Bootstrapping using : /Users/carter/.install-ghc/ghc-8.2.2-hq/bin/ghc which is version : 8.2.2 Using (for bootstrapping) : /usr/bin/clang Using gcc : /usr/local/bin/gcc-7 which is version : 7.2.0 Building a cross compiler : NO Unregisterised : NO hs-cpp : /usr/local/bin/gcc-7 hs-cpp-flags : -E -undef -traditional there seem to be several take aways: 1) clang doesn't support unused-but-set-variable 1.5) no one has run validate on OSX in the past few months with a vanilla checkout / env? 2) how do i change the compiler selected for boot strapping, whether via env variables or other twiddles thanks! -Carter -------------- next part -------------- An HTML attachment was scrubbed... URL: From carter.schonwald at gmail.com Sun Dec 24 22:04:08 2017 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Sun, 24 Dec 2017 17:04:08 -0500 Subject: validate failure on Mac OSX for ghc head (validate fails with clang) In-Reply-To: References: Message-ID: digging around in configure.ac it looks like i need to set CC_STAGE0 env variable to my desired CC :) hope this helps other folks... but it definiely seems like the current logic for CC_STAGE0 is more brittle than for CC On Sun, Dec 24, 2017 at 5:02 PM, Carter Schonwald < carter.schonwald at gmail.com> wrote: > hey All, the current settings for warnings etc for ghc validate do not > work on mac, > > this is because some gcc flag isn't in clang, or vice versa, or some > version of gcc related matter > > the relevant error is: > > error: unknown warning option '-Werror=unused-but-set-variable'; did you > mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option] > > the culprit seems to be apple clang, at least if my reading of the config > output by validate is correct > > Configure completed successfully. > > Building GHC version : 8.5.20171223 > Git commit id : d7d0aa316f9d23d73ae617e0cc1b147907667ef4 > > Build platform : x86_64-apple-darwin > Host platform : x86_64-apple-darwin > Target platform : x86_64-apple-darwin > > Bootstrapping using : /Users/carter/.install-ghc/ghc-8.2.2-hq/bin/ghc > which is version : 8.2.2 > > Using (for bootstrapping) : /usr/bin/clang > Using gcc : /usr/local/bin/gcc-7 > which is version : 7.2.0 > Building a cross compiler : NO > Unregisterised : NO > hs-cpp : /usr/local/bin/gcc-7 > hs-cpp-flags : -E -undef -traditional > > > there seem to be several take aways: > > 1) clang doesn't support unused-but-set-variable > 1.5) no one has run validate on OSX in the past few months with a vanilla > checkout / env? > 2) how do i change the compiler selected for boot strapping, whether via > env variables or other twiddles > > thanks! > > -Carter > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotsmanov89 at gmail.com Tue Dec 26 20:11:46 2017 From: lotsmanov89 at gmail.com (Viacheslav Lotsmanov) Date: Wed, 27 Dec 2017 01:11:46 +0500 Subject: How do I build basic GHC packages with -fPIC? Message-ID: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> Hi there. My actual main goal is to build my own shared library written in Haskell that would be compatible with application written in C even without knowing that is is written in Haskell. So for now I compiled my shared library but I only could dynamically link it to Haskell dependencies such as "base" and "ghc-prim" packages. But I want to statically link Haskell dependencies but I realized it isn't simple and straightforward task. On Freenode's #haskell I was advised I should build GHC from scratch with -fPIC, on the Linux (I'm using Fedora Workstation 25 on x86_64) I couldn't go forward without this step. So I wrote some Dockerfile based on Debian 9, skipping first part which is containing 'apt-get update' and installing 'build-essential' here is what I have: COPY my-build.mk /my-build.mk RUN mkdir /compile && cd /compile \     && wget https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz \     && tar -xvf ghc-8.2.2-src.tar.xz \     && rm ghc-8.2.2-src.tar.xz \     && cd ghc-8.2.2/ \     && ./configure --prefix=/ghc-8.2.2-fpic --disable-library-profiling --enable-shared \     && cp /my-build.mk mk/build.mk \     && make install \     && cd /usr/local/bin \     && ls /ghc-8.2.2-fpic/bin/ | xargs -I{} ln -s /ghc-8.2.2-fpic/bin/{} And as you can see I just use my own prepared /my-build.mk/ file which is: SRC_HC_OPTS          = -H64m -O EXTRA_HC_OPTS        = -fPIC SRC_CC_OPTS          = -fPIC -O GhcStage1HcOpts      = -fasm -O0 GhcStage2HcOpts      = -fasm -O0 GhcLibHcOpts         = -fasm -O2 GhcLibWays           = v dyn DYNAMIC_GHC_PROGRAMS = YES DYNAMIC_BY_DEFAULT   = NO SplitObjs            = NO HADDOCK_DOCS         = NO BUILD_DOCBOOK_HTML   = NO BUILD_DOCBOOK_PS     = NO BUILD_DOCBOOK_PDF    = NO V                    = 1 LATEX_DOCS           = NO HSCOLOUR_SRCS        = NO BeConservative       = YES I just combined it from parts I found in the internet during searching answers to my questions. So I built this container, I also installed dependencies by this commands: cd /mnt cabal update cabal sandbox init cabal install --enable-shared --ghc-option=-fPIC happy alex cabal install --enable-shared --ghc-option=-fPIC base-unicode-symbols filepath process directory lens containers qm-interpolated-string And when I tried to build my app by following commands (first command compiles some C-code to automatically initialize Haskell runtime, see link posted below, not sure if /-static/, /-shared/ or /-fPIC/ means something here but it's work in progress): ghc -static -shared -fPIC -optc-DMODULE=Foo src/lib-autoinit.c -outputdir builddir ghc -package-db=SOME_CABALS_SANDBOX_PKGDB_DIR --make-static-shared-fPIC src/Foo.hs builddir/src/lib-autoinit.o -o builddir/libfoo.o -isrc -outputdir builddir -Wall -O2 I failed with a lot of similar errors like this one: /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; recompile with -fPIC What have I missed? What should I do to make this happen? Any progress could be found here (Dockerfile, sources of modules, build-scripts): https://github.com/unclechu/haskell-experiment-shared-library-for-c-application Related stack overflow issue: https://stackoverflow.com/questions/47978884/how-do-i-recompile-ghc-with-fpic -------------- next part -------------- An HTML attachment was scrubbed... URL: From rae at cs.brynmawr.edu Tue Dec 26 21:15:18 2017 From: rae at cs.brynmawr.edu (Richard Eisenberg) Date: Tue, 26 Dec 2017 16:15:18 -0500 Subject: CircleCI failed for me Message-ID: <5240A633-E7B9-46BB-8AA5-700AE366ECD8@cs.brynmawr.edu> Hi devs, I've enabled CircleCI on my GitHub fork of GHC in order to get good validation results. This worked several months ago. But now, I see failures around performance tests: https://circleci.com/gh/goldfirere/ghc/12 This is a tiny patch on top of HEAD; I can't imagine my patch is at fault here. Does anyone know what settings I should look into to fix this? Thanks! Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: From alberto at toscat.net Wed Dec 27 08:15:09 2017 From: alberto at toscat.net (Alberto Valverde) Date: Wed, 27 Dec 2017 09:15:09 +0100 Subject: How do I build basic GHC packages with -fPIC? In-Reply-To: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> References: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> Message-ID: Hi, I'm manage to link statically all haskell libraries to a dynamically loadable postgreSQL extension written in haskell using: SRC_HC_OPTS += -fPIC SRC_CC_OPTS += -fPIC in build.mk and passing these options to every package cabal builds: --ghc-option=-fPIC --ghc-option=-optc-fPIC I'm using nix but it should work in any environment if you make sure every package cabal build gets these options (maybe by setting them in $HOME/.cabal/config?) HTH, Alberto On Tue, Dec 26, 2017 at 9:11 PM, Viacheslav Lotsmanov wrote: > Hi there. My actual main goal is to build my own shared library written in > Haskell that would be compatible with application written in C even without > knowing that is is written in Haskell. So for now I compiled my shared > library but I only could dynamically link it to Haskell dependencies such > as "base" and "ghc-prim" packages. But I want to statically link Haskell > dependencies but I realized it isn't simple and straightforward task. > > On Freenode's #haskell I was advised I should build GHC from scratch with > -fPIC, on the Linux (I'm using Fedora Workstation 25 on x86_64) I couldn't > go forward without this step. So I wrote some Dockerfile based on Debian 9, > skipping first part which is containing 'apt-get update' and installing > 'build-essential' here is what I have: > COPY my-build.mk /my-build.mk > > RUN mkdir /compile && cd /compile \ > && wget https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz > \ > && tar -xvf ghc-8.2.2-src.tar.xz \ > && rm ghc-8.2.2-src.tar.xz \ > && cd ghc-8.2.2/ \ > && ./configure --prefix=/ghc-8.2.2-fpic --disable-library-profiling > --enable-shared \ > && cp /my-build.mk mk/build.mk \ > && make install \ > && cd /usr/local/bin \ > && ls /ghc-8.2.2-fpic/bin/ | xargs -I{} ln -s /ghc-8.2.2-fpic/bin/{} > > And as you can see I just use my own prepared *my-build.mk > * file which is: > SRC_HC_OPTS = -H64m -O > EXTRA_HC_OPTS = -fPIC > SRC_CC_OPTS = -fPIC -O > GhcStage1HcOpts = -fasm -O0 > GhcStage2HcOpts = -fasm -O0 > GhcLibHcOpts = -fasm -O2 > GhcLibWays = v dyn > DYNAMIC_GHC_PROGRAMS = YES > DYNAMIC_BY_DEFAULT = NO > SplitObjs = NO > HADDOCK_DOCS = NO > BUILD_DOCBOOK_HTML = NO > BUILD_DOCBOOK_PS = NO > BUILD_DOCBOOK_PDF = NO > V = 1 > LATEX_DOCS = NO > HSCOLOUR_SRCS = NO > BeConservative = YES > > I just combined it from parts I found in the internet during searching > answers to my questions. So I built this container, I also installed > dependencies by this commands: > cd /mnt > cabal update > cabal sandbox init > cabal install --enable-shared --ghc-option=-fPIC happy alex > cabal install --enable-shared --ghc-option=-fPIC base-unicode-symbols > filepath process directory lens containers qm-interpolated-string > > And when I tried to build my app by following commands (first command > compiles some C-code to automatically initialize Haskell runtime, see link > posted below, not sure if *-static*, *-shared* or *-fPIC* means something > here but it's work in progress): > ghc -static -shared -fPIC -optc-DMODULE=Foo src/lib-autoinit.c -outputdir > builddir > ghc -package-db=SOME_CABALS_SANDBOX_PKGDB_DIR --make -static -shared -fPIC > src/Foo.hs builddir/src/lib-autoinit.o -o builddir/libfoo.o -isrc > -outputdir builddir -Wall -O2 > > I failed with a lot of similar errors like this one: > /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ > ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic > R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; > recompile with -fPIC > > What have I missed? What should I do to make this happen? > > Any progress could be found here (Dockerfile, sources of modules, > build-scripts): https://github.com/unclechu/haskell-experiment-shared- > library-for-c-application > Related stack overflow issue: https://stackoverflow.com/ > questions/47978884/how-do-i-recompile-ghc-with-fpic > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alberto at toscat.net Wed Dec 27 08:20:30 2017 From: alberto at toscat.net (Alberto Valverde) Date: Wed, 27 Dec 2017 09:20:30 +0100 Subject: How do I build basic GHC packages with -fPIC? In-Reply-To: References: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> Message-ID: BTW, this is the Makefile that builds the extension I mentioned: https://github.com/albertov/pg_schedule/blob/master/Makefile. When LINK_STATICALLY=TRUE it produces an '.so' which only links dynamically to system libraries, all haskell libraries are linked statically: alberto at albertows:~/src/thelonius$ ldd /nix/store/1cy055y8ycs2acqa8w8qf6dbsnx7cc1b-pg_schedule-1.0/lib/schedule.so linux-vdso.so.1 (0x00007fff191b9000) libm.so.6 => /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libm.so.6 (0x00007fae8aec6000) libgmp.so.10 => /nix/store/jc8l6hlwl8hc590riqqkk0pr55sjfng2-gmp-6.1.2/lib/libgmp.so.10 (0x00007fae8ac33000) libc.so.6 => /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libc.so.6 (0x00007fae8a880000) /nix/store/h1a1ncbkkhapzm0509plqjlfrgxw22f3-glibc-2.25-49/lib64/ld-linux-x86-64.so.2 (0x00007fae8cd4d000) On Wed, Dec 27, 2017 at 9:15 AM, Alberto Valverde wrote: > Hi, > > I'm manage to link statically all haskell libraries to a dynamically > loadable postgreSQL extension written in haskell using: > > SRC_HC_OPTS += -fPIC > SRC_CC_OPTS += -fPIC > > in build.mk and passing these options to every package cabal builds: > > --ghc-option=-fPIC --ghc-option=-optc-fPIC > > I'm using nix but it should work in any environment if you make sure every > package cabal build gets these options (maybe by setting them in > $HOME/.cabal/config?) > > HTH, > Alberto > > On Tue, Dec 26, 2017 at 9:11 PM, Viacheslav Lotsmanov < > lotsmanov89 at gmail.com> wrote: > >> Hi there. My actual main goal is to build my own shared library written >> in Haskell that would be compatible with application written in C even >> without knowing that is is written in Haskell. So for now I compiled my >> shared library but I only could dynamically link it to Haskell dependencies >> such as "base" and "ghc-prim" packages. But I want to statically link >> Haskell dependencies but I realized it isn't simple and straightforward >> task. >> >> On Freenode's #haskell I was advised I should build GHC from scratch with >> -fPIC, on the Linux (I'm using Fedora Workstation 25 on x86_64) I couldn't >> go forward without this step. So I wrote some Dockerfile based on Debian 9, >> skipping first part which is containing 'apt-get update' and installing >> 'build-essential' here is what I have: >> COPY my-build.mk /my-build.mk >> >> RUN mkdir /compile && cd /compile \ >> && wget https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz >> \ >> && tar -xvf ghc-8.2.2-src.tar.xz \ >> && rm ghc-8.2.2-src.tar.xz \ >> && cd ghc-8.2.2/ \ >> && ./configure --prefix=/ghc-8.2.2-fpic --disable-library-profiling >> --enable-shared \ >> && cp /my-build.mk mk/build.mk \ >> && make install \ >> && cd /usr/local/bin \ >> && ls /ghc-8.2.2-fpic/bin/ | xargs -I{} ln -s /ghc-8.2.2-fpic/bin/{} >> >> And as you can see I just use my own prepared *my-build.mk >> * file which is: >> SRC_HC_OPTS = -H64m -O >> EXTRA_HC_OPTS = -fPIC >> SRC_CC_OPTS = -fPIC -O >> GhcStage1HcOpts = -fasm -O0 >> GhcStage2HcOpts = -fasm -O0 >> GhcLibHcOpts = -fasm -O2 >> GhcLibWays = v dyn >> DYNAMIC_GHC_PROGRAMS = YES >> DYNAMIC_BY_DEFAULT = NO >> SplitObjs = NO >> HADDOCK_DOCS = NO >> BUILD_DOCBOOK_HTML = NO >> BUILD_DOCBOOK_PS = NO >> BUILD_DOCBOOK_PDF = NO >> V = 1 >> LATEX_DOCS = NO >> HSCOLOUR_SRCS = NO >> BeConservative = YES >> >> I just combined it from parts I found in the internet during searching >> answers to my questions. So I built this container, I also installed >> dependencies by this commands: >> cd /mnt >> cabal update >> cabal sandbox init >> cabal install --enable-shared --ghc-option=-fPIC happy alex >> cabal install --enable-shared --ghc-option=-fPIC base-unicode-symbols >> filepath process directory lens containers qm-interpolated-string >> >> And when I tried to build my app by following commands (first command >> compiles some C-code to automatically initialize Haskell runtime, see link >> posted below, not sure if *-static*, *-shared* or *-fPIC* means >> something here but it's work in progress): >> ghc -static -shared -fPIC -optc-DMODULE=Foo src/lib-autoinit.c -outputdir >> builddir >> ghc -package-db=SOME_CABALS_SANDBOX_PKGDB_DIR --make -static -shared -fPIC >> src/Foo.hs builddir/src/lib-autoinit.o -o builddir/libfoo.o -isrc >> -outputdir builddir -Wall -O2 >> >> I failed with a lot of similar errors like this one: >> /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ >> ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic >> R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; >> recompile with -fPIC >> >> What have I missed? What should I do to make this happen? >> >> Any progress could be found here (Dockerfile, sources of modules, >> build-scripts): https://github.com/unclechu/ha >> skell-experiment-shared-library-for-c-application >> Related stack overflow issue: https://stackoverflow.com/ques >> tions/47978884/how-do-i-recompile-ghc-with-fpic >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From BalterNotz at foxmail.com Wed Dec 27 13:48:09 2017 From: BalterNotz at foxmail.com (BalterNotz) Date: Wed, 27 Dec 2017 21:48:09 +0800 Subject: =?utf-8?Q?=E7=AD=94=E5=A4=8D:_ghc-devs_Digest,_Vol_172,_Issue_40?= In-Reply-To: References: Message-ID: mis_7BD3F8482CE5C1752FC77AE2@unknown.com 发送自 Windows 10 版邮件应用 发件人: ghc-devs-request at haskell.org 发送时间: 2017年12月27日 20:32 主题: ghc-devs Digest, Vol 172, Issue 40 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotsmanov89 at gmail.com Wed Dec 27 22:24:50 2017 From: lotsmanov89 at gmail.com (Viacheslav Lotsmanov) Date: Thu, 28 Dec 2017 03:24:50 +0500 Subject: How do I build basic GHC packages with -fPIC? In-Reply-To: References: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> Message-ID: I've tried to replace my whole /build.mk/ with your example: SRC_HC_OPTS += -fPIC SRC_CC_OPTS += -fPIC And then got this error: Installing library in /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghci-8.2.2 "inplace/bin/ghc-cabal" copy compiler stage2 "strip" '' '/ghc-8.2.2-fpic' '/ghc-8.2.2-fpic/lib/ghc-8.2.2' '/ghc-8.2.2-fpic/share/doc/ghc-8.2.2/html/libraries' 'v p dyn' Installing library in /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-8.2.2 ghc-cabal: Error: Could not find module: DriverBkp with any suffix: ["p_hi"] in the search path: ["stage2/build"] ghc.mk:986: recipe for target 'install_packages' failed make[1]: *** [install_packages] Error 1 make: *** [install] Error 2 Makefile:122: recipe for target 'install' failed The command '/bin/sh -c mkdir /compile && cd /compile   && wget https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz && tar -xvf ghc-8.2.2-src.tar.xz        && rm ghc-8.2.2-src.tar.xz     && cd ghc-8.2.2/ && ./configure --prefix=/ghc-8.2.2-fpic --disable-library-profiling            --enable-shared && cp /my-build.mk mk/build.mk  && make install        && rm -rf /compile /my-build.mk && cd /usr/local/bin    && ls /ghc-8.2.2-fpic/bin/ | xargs -I{} ln -s /ghc-8.2.2-fpic/bin/{}' returned a non-zero code: 2 Should I add something else to this file? On 12/27/2017 01:20 PM, Alberto Valverde wrote: > BTW, this is the Makefile that builds the extension I mentioned: > https://github.com/albertov/pg_schedule/blob/master/Makefile. > When LINK_STATICALLY=TRUE it produces an '.so' which only links > dynamically to system libraries, all haskell libraries are linked > statically: > > alberto at albertows:~/src/thelonius$ ldd > /nix/store/1cy055y8ycs2acqa8w8qf6dbsnx7cc1b-pg_schedule-1.0/lib/schedule.so > >        linux-vdso.so.1 (0x00007fff191b9000) >        libm.so.6 => > /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libm.so.6 > (0x00007fae8aec6000) >        libgmp.so.10 => > /nix/store/jc8l6hlwl8hc590riqqkk0pr55sjfng2-gmp-6.1.2/lib/libgmp.so.10 > (0x00007fae8ac33000) >        libc.so.6 => > /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libc.so.6 > (0x00007fae8a880000) >        /nix/store/h1a1ncbkkhapzm0509plqjlfrgxw22f3-glibc-2.25-49/lib64/ld-linux-x86-64.so.2 > (0x00007fae8cd4d000) > > > On Wed, Dec 27, 2017 at 9:15 AM, Alberto Valverde > wrote: > > Hi, > > I'm manage to link statically all haskell libraries to a > dynamically loadable postgreSQL extension written in haskell using: > > SRC_HC_OPTS += -fPIC > SRC_CC_OPTS += -fPIC > > in build.mk and passing these options to every > package cabal builds: > > --ghc-option=-fPIC --ghc-option=-optc-fPIC > > I'm using nix but it should work in any environment if you make > sure every package cabal build gets these options (maybe by > setting them in $HOME/.cabal/config?) > > HTH, > Alberto > > On Tue, Dec 26, 2017 at 9:11 PM, Viacheslav Lotsmanov > > wrote: > > Hi there. My actual main goal is to build my own shared > library written in Haskell that would be compatible with > application written in C even without knowing that is is > written in Haskell. So for now I compiled my shared library > but I only could dynamically link it to Haskell dependencies > such as "base" and "ghc-prim" packages. But I want to > statically link Haskell dependencies but I realized it isn't > simple and straightforward task. > > On Freenode's #haskell I was advised I should build GHC from > scratch with -fPIC, on the Linux (I'm using Fedora Workstation > 25 on x86_64) I couldn't go forward without this step. So I > wrote some Dockerfile based on Debian 9, skipping first part > which is containing 'apt-get update' and installing > 'build-essential' here is what I have: > > COPY my-build.mk /my-build.mk > > > RUN mkdir /compile && cd /compile \ >     && wget > https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz > > \ >     && tar -xvf ghc-8.2.2-src.tar.xz \ >     && rm ghc-8.2.2-src.tar.xz \ >     && cd ghc-8.2.2/ \ >     && ./configure --prefix=/ghc-8.2.2-fpic > --disable-library-profiling --enable-shared \ >     && cp /my-build.mk mk/build.mk > \ >     && make install \ >     && cd /usr/local/bin \ >     && ls /ghc-8.2.2-fpic/bin/ | xargs -I{} ln -s > /ghc-8.2.2-fpic/bin/{} > > And as you can see I just use my own prepared /my-build.mk > / file which is: > > SRC_HC_OPTS          = -H64m -O > EXTRA_HC_OPTS        = -fPIC > SRC_CC_OPTS          = -fPIC -O > GhcStage1HcOpts      = -fasm -O0 > GhcStage2HcOpts      = -fasm -O0 > GhcLibHcOpts         = -fasm -O2 > GhcLibWays           = v dyn > DYNAMIC_GHC_PROGRAMS = YES > DYNAMIC_BY_DEFAULT   = NO > SplitObjs            = NO > HADDOCK_DOCS         = NO > BUILD_DOCBOOK_HTML   = NO > BUILD_DOCBOOK_PS     = NO > BUILD_DOCBOOK_PDF    = NO > V                    = 1 > LATEX_DOCS           = NO > HSCOLOUR_SRCS        = NO > BeConservative       = YES > > I just combined it from parts I found in the internet during > searching answers to my questions. So I built this container, > I also installed dependencies by this commands: > > cd /mnt > cabal update > cabal sandbox init > cabal install --enable-shared --ghc-option=-fPIC happy alex > cabal install --enable-shared --ghc-option=-fPIC > base-unicode-symbols filepath process directory lens > containers qm-interpolated-string > > And when I tried to build my app by following commands (first > command compiles some C-code to automatically initialize > Haskell runtime, see link posted below, not sure if /-static/, > /-shared/ or /-fPIC/ means something here but it's work in > progress): > > ghc -static -shared -fPIC -optc-DMODULE=Foo src/lib-autoinit.c > -outputdir builddir > ghc -package-db=SOME_CABALS_SANDBOX_PKGDB_DIR > --make-static-shared-fPIC src/Foo.hs > builddir/src/lib-autoinit.o -o builddir/libfoo.o -isrc > -outputdir builddir -Wall -O2 > > I failed with a lot of similar errors like this one: > > /usr/bin/ld.gold: error: > /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): > requires dynamic R_X86_64_PC32 reloc against 'stg_ap_0_fast' > which may overflow at runtime; recompile with -fPIC > > What have I missed? What should I do to make this happen? > > Any progress could be found here (Dockerfile, sources of > modules, build-scripts): > https://github.com/unclechu/haskell-experiment-shared-library-for-c-application > > Related stack overflow issue: > https://stackoverflow.com/questions/47978884/how-do-i-recompile-ghc-with-fpic > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lotsmanov89 at gmail.com Thu Dec 28 11:44:55 2017 From: lotsmanov89 at gmail.com (Viacheslav Lotsmanov) Date: Thu, 28 Dec 2017 16:44:55 +0500 Subject: How do I build basic GHC packages with -fPIC? In-Reply-To: References: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> Message-ID: <38856e22-4ed5-6cb4-01b1-d416e501096a@gmail.com> Now I took my build.mk and just replaced lines with SRC_HC_OPTS and SRC_CC_OPTS with ones from your example: SRC_HC_OPTS += -fPIC SRC_CC_OPTS += -fPIC And also I run every `cabal install` with `--ghc-option=-fPIC --ghc-option=-optc-fPIC` but still gets the same errors: /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; recompile with -fPIC collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) Is it even possible? On 12/28/2017 03:24 AM, Viacheslav Lotsmanov wrote: > > I've tried to replace my whole /build.mk/ with your example: > > SRC_HC_OPTS += -fPIC > SRC_CC_OPTS += -fPIC > > And then got this error: > > Installing library in /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghci-8.2.2 > "inplace/bin/ghc-cabal" copy compiler stage2 "strip" '' > '/ghc-8.2.2-fpic' '/ghc-8.2.2-fpic/lib/ghc-8.2.2' > '/ghc-8.2.2-fpic/share/doc/ghc-8.2.2/html/libraries' 'v p dyn' > Installing library in /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-8.2.2 > ghc-cabal: Error: Could not find module: DriverBkp with any suffix: > ["p_hi"] > in the search path: ["stage2/build"] > ghc.mk:986: recipe for target 'install_packages' failed > make[1]: *** [install_packages] Error 1 > make: *** [install] Error 2 > Makefile:122: recipe for target 'install' failed > The command '/bin/sh -c mkdir /compile && cd /compile   && wget > https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz && tar > -xvf ghc-8.2.2-src.tar.xz        && rm ghc-8.2.2-src.tar.xz     && cd > ghc-8.2.2/ && ./configure --prefix=/ghc-8.2.2-fpic > --disable-library-profiling            --enable-shared && cp > /my-build.mk mk/build.mk  && make install        && rm -rf /compile > /my-build.mk && cd /usr/local/bin    && ls /ghc-8.2.2-fpic/bin/ | > xargs -I{} ln -s /ghc-8.2.2-fpic/bin/{}' returned a non-zero code: 2 > > Should I add something else to this file? > > > On 12/27/2017 01:20 PM, Alberto Valverde wrote: >> BTW, this is the Makefile that builds the extension I mentioned: >> https://github.com/albertov/pg_schedule/blob/master/Makefile. >> When LINK_STATICALLY=TRUE it produces an '.so' which only links >> dynamically to system libraries, all haskell libraries are linked >> statically: >> >> alberto at albertows:~/src/thelonius$ ldd >> /nix/store/1cy055y8ycs2acqa8w8qf6dbsnx7cc1b-pg_schedule-1.0/lib/schedule.so >> >>        linux-vdso.so.1 (0x00007fff191b9000) >>        libm.so.6 => >> /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libm.so.6 >> (0x00007fae8aec6000) >>        libgmp.so.10 => >> /nix/store/jc8l6hlwl8hc590riqqkk0pr55sjfng2-gmp-6.1.2/lib/libgmp.so.10 >> (0x00007fae8ac33000) >>        libc.so.6 => >> /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libc.so.6 >> (0x00007fae8a880000) >>        /nix/store/h1a1ncbkkhapzm0509plqjlfrgxw22f3-glibc-2.25-49/lib64/ld-linux-x86-64.so.2 >> (0x00007fae8cd4d000) >> >> >> On Wed, Dec 27, 2017 at 9:15 AM, Alberto Valverde > > wrote: >> >> Hi, >> >> I'm manage to link statically all haskell libraries to a >> dynamically loadable postgreSQL extension written in haskell using: >> >> SRC_HC_OPTS += -fPIC >> SRC_CC_OPTS += -fPIC >> >> in build.mk and passing these options to every >> package cabal builds: >> >> --ghc-option=-fPIC --ghc-option=-optc-fPIC >> >> I'm using nix but it should work in any environment if you make >> sure every package cabal build gets these options (maybe by >> setting them in $HOME/.cabal/config?) >> >> HTH, >> Alberto >> >> On Tue, Dec 26, 2017 at 9:11 PM, Viacheslav Lotsmanov >> > wrote: >> >> Hi there. My actual main goal is to build my own shared >> library written in Haskell that would be compatible with >> application written in C even without knowing that is is >> written in Haskell. So for now I compiled my shared library >> but I only could dynamically link it to Haskell dependencies >> such as "base" and "ghc-prim" packages. But I want to >> statically link Haskell dependencies but I realized it isn't >> simple and straightforward task. >> >> On Freenode's #haskell I was advised I should build GHC from >> scratch with -fPIC, on the Linux (I'm using Fedora >> Workstation 25 on x86_64) I couldn't go forward without this >> step. So I wrote some Dockerfile based on Debian 9, skipping >> first part which is containing 'apt-get update' and >> installing 'build-essential' here is what I have: >> >> COPY my-build.mk /my-build.mk >> >> >> RUN mkdir /compile && cd /compile \ >>     && wget >> https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz >> >> \ >>     && tar -xvf ghc-8.2.2-src.tar.xz \ >>     && rm ghc-8.2.2-src.tar.xz \ >>     && cd ghc-8.2.2/ \ >>     && ./configure --prefix=/ghc-8.2.2-fpic >> --disable-library-profiling --enable-shared \ >>     && cp /my-build.mk mk/build.mk >> \ >>     && make install \ >>     && cd /usr/local/bin \ >>     && ls /ghc-8.2.2-fpic/bin/ | xargs -I{} ln -s >> /ghc-8.2.2-fpic/bin/{} >> >> And as you can see I just use my own prepared /my-build.mk >> / file which is: >> >> SRC_HC_OPTS          = -H64m -O >> EXTRA_HC_OPTS        = -fPIC >> SRC_CC_OPTS          = -fPIC -O >> GhcStage1HcOpts      = -fasm -O0 >> GhcStage2HcOpts      = -fasm -O0 >> GhcLibHcOpts         = -fasm -O2 >> GhcLibWays           = v dyn >> DYNAMIC_GHC_PROGRAMS = YES >> DYNAMIC_BY_DEFAULT   = NO >> SplitObjs            = NO >> HADDOCK_DOCS         = NO >> BUILD_DOCBOOK_HTML   = NO >> BUILD_DOCBOOK_PS     = NO >> BUILD_DOCBOOK_PDF    = NO >> V                    = 1 >> LATEX_DOCS           = NO >> HSCOLOUR_SRCS        = NO >> BeConservative       = YES >> >> I just combined it from parts I found in the internet during >> searching answers to my questions. So I built this container, >> I also installed dependencies by this commands: >> >> cd /mnt >> cabal update >> cabal sandbox init >> cabal install --enable-shared --ghc-option=-fPIC happy alex >> cabal install --enable-shared --ghc-option=-fPIC >> base-unicode-symbols filepath process directory lens >> containers qm-interpolated-string >> >> And when I tried to build my app by following commands (first >> command compiles some C-code to automatically initialize >> Haskell runtime, see link posted below, not sure if >> /-static/, /-shared/ or /-fPIC/ means something here but it's >> work in progress): >> >> ghc -static -shared -fPIC -optc-DMODULE=Foo >> src/lib-autoinit.c -outputdir builddir >> ghc -package-db=SOME_CABALS_SANDBOX_PKGDB_DIR >> --make-static-shared-fPIC src/Foo.hs >> builddir/src/lib-autoinit.o -o builddir/libfoo.o -isrc >> -outputdir builddir -Wall -O2 >> >> I failed with a lot of similar errors like this one: >> >> /usr/bin/ld.gold: error: >> /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): >> requires dynamic R_X86_64_PC32 reloc against 'stg_ap_0_fast' >> which may overflow at runtime; recompile with -fPIC >> >> What have I missed? What should I do to make this happen? >> >> Any progress could be found here (Dockerfile, sources of >> modules, build-scripts): >> https://github.com/unclechu/haskell-experiment-shared-library-for-c-application >> >> Related stack overflow issue: >> https://stackoverflow.com/questions/47978884/how-do-i-recompile-ghc-with-fpic >> >> >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alberto at toscat.net Thu Dec 28 13:03:40 2017 From: alberto at toscat.net (Alberto Valverde) Date: Thu, 28 Dec 2017 14:03:40 +0100 Subject: How do I build basic GHC packages with -fPIC? In-Reply-To: <38856e22-4ed5-6cb4-01b1-d416e501096a@gmail.com> References: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> <38856e22-4ed5-6cb4-01b1-d416e501096a@gmail.com> Message-ID: I think you need place the build.mk in it's place before running GHC's configure script. On Thu, Dec 28, 2017 at 12:44 PM, Viacheslav Lotsmanov < lotsmanov89 at gmail.com> wrote: > Now I took my build.mk and just replaced lines with SRC_HC_OPTS and > SRC_CC_OPTS with ones from your example: > > SRC_HC_OPTS += -fPIC > SRC_CC_OPTS += -fPIC > > And also I run every `cabal install` with `--ghc-option=-fPIC > --ghc-option=-optc-fPIC` but still gets the same errors: > > /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ > ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic > R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; > recompile with -fPIC > /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ > ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic > R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; > recompile with -fPIC > collect2: error: ld returned 1 exit status > `gcc' failed in phase `Linker'. (Exit code: 1) > > Is it even possible? > > On 12/28/2017 03:24 AM, Viacheslav Lotsmanov wrote: > > I've tried to replace my whole *build.mk * with your > example: > > SRC_HC_OPTS += -fPIC > SRC_CC_OPTS += -fPIC > > And then got this error: > > Installing library in /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghci-8.2.2 > "inplace/bin/ghc-cabal" copy compiler stage2 "strip" '' '/ghc-8.2.2-fpic' > '/ghc-8.2.2-fpic/lib/ghc-8.2.2' '/ghc-8.2.2-fpic/share/doc/ghc-8.2.2/html/libraries' > 'v p dyn' > Installing library in /ghc-8.2.2-fpic/lib/ghc-8.2.2/ghc-8.2.2 > ghc-cabal: Error: Could not find module: DriverBkp with any suffix: > ["p_hi"] > in the search path: ["stage2/build"] > ghc.mk:986: recipe for target 'install_packages' failed > make[1]: *** [install_packages] Error 1 > make: *** [install] Error 2 > Makefile:122: recipe for target 'install' failed > The command '/bin/sh -c mkdir /compile && cd /compile && wget > https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz && tar > -xvf ghc-8.2.2-src.tar.xz && rm ghc-8.2.2-src.tar.xz && cd > ghc-8.2.2/ && ./configure --prefix=/ghc-8.2.2-fpic > --disable-library-profiling --enable-shared && cp / > my-build.mk mk/build.mk && make install && rm -rf /compile / > my-build.mk && cd /usr/local/bin && ls /ghc-8.2.2-fpic/bin/ | > xargs -I{} ln -s /ghc-8.2.2-fpic/bin/{}' returned a non-zero code: 2 > > Should I add something else to this file? > > On 12/27/2017 01:20 PM, Alberto Valverde wrote: > > BTW, this is the Makefile that builds the extension I mentioned: > https://github.com/albertov/pg_schedule/blob/master/Makefile. > When LINK_STATICALLY=TRUE it produces an '.so' which only links > dynamically to system libraries, all haskell libraries are linked > statically: > > alberto at albertows:~/src/thelonius$ ldd /nix/store/ > 1cy055y8ycs2acqa8w8qf6dbsnx7cc1b-pg_schedule-1.0/lib/schedule.so > linux-vdso.so.1 (0x00007fff191b9000) > libm.so.6 => /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libm.so.6 > (0x00007fae8aec6000) > libgmp.so.10 => /nix/store/jc8l6hlwl8hc590riqqkk0pr55sjfng2-gmp-6.1.2/lib/libgmp.so.10 > (0x00007fae8ac33000) > libc.so.6 => /nix/store/fysbl29a8p8sa9z3wpnqpn56a0b54fap-glibc-2.26-75/lib/libc.so.6 > (0x00007fae8a880000) > /nix/store/h1a1ncbkkhapzm0509plqjlfrgxw22f3-glibc-2.25-49/lib64/ld-linux-x86-64.so.2 > (0x00007fae8cd4d000) > > > On Wed, Dec 27, 2017 at 9:15 AM, Alberto Valverde > wrote: > >> Hi, >> >> I'm manage to link statically all haskell libraries to a dynamically >> loadable postgreSQL extension written in haskell using: >> >> SRC_HC_OPTS += -fPIC >> SRC_CC_OPTS += -fPIC >> >> in build.mk and passing these options to every package cabal builds: >> >> --ghc-option=-fPIC --ghc-option=-optc-fPIC >> >> I'm using nix but it should work in any environment if you make sure >> every package cabal build gets these options (maybe by setting them in >> $HOME/.cabal/config?) >> >> HTH, >> Alberto >> >> On Tue, Dec 26, 2017 at 9:11 PM, Viacheslav Lotsmanov < >> lotsmanov89 at gmail.com> wrote: >> >>> Hi there. My actual main goal is to build my own shared library written >>> in Haskell that would be compatible with application written in C even >>> without knowing that is is written in Haskell. So for now I compiled my >>> shared library but I only could dynamically link it to Haskell dependencies >>> such as "base" and "ghc-prim" packages. But I want to statically link >>> Haskell dependencies but I realized it isn't simple and straightforward >>> task. >>> >>> On Freenode's #haskell I was advised I should build GHC from scratch >>> with -fPIC, on the Linux (I'm using Fedora Workstation 25 on x86_64) I >>> couldn't go forward without this step. So I wrote some Dockerfile based on >>> Debian 9, skipping first part which is containing 'apt-get update' and >>> installing 'build-essential' here is what I have: >>> COPY my-build.mk /my-build.mk >>> >>> RUN mkdir /compile && cd /compile \ >>> && wget https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.x >>> z \ >>> && tar -xvf ghc-8.2.2-src.tar.xz \ >>> && rm ghc-8.2.2-src.tar.xz \ >>> && cd ghc-8.2.2/ \ >>> && ./configure --prefix=/ghc-8.2.2-fpic --disable-library-profiling >>> --enable-shared \ >>> && cp /my-build.mk mk/build.mk \ >>> && make install \ >>> && cd /usr/local/bin \ >>> && ls /ghc-8.2.2-fpic/bin/ | xargs -I{} ln -s /ghc-8.2.2-fpic/bin/{} >>> >>> And as you can see I just use my own prepared *my-build.mk >>> * file which is: >>> SRC_HC_OPTS = -H64m -O >>> EXTRA_HC_OPTS = -fPIC >>> SRC_CC_OPTS = -fPIC -O >>> GhcStage1HcOpts = -fasm -O0 >>> GhcStage2HcOpts = -fasm -O0 >>> GhcLibHcOpts = -fasm -O2 >>> GhcLibWays = v dyn >>> DYNAMIC_GHC_PROGRAMS = YES >>> DYNAMIC_BY_DEFAULT = NO >>> SplitObjs = NO >>> HADDOCK_DOCS = NO >>> BUILD_DOCBOOK_HTML = NO >>> BUILD_DOCBOOK_PS = NO >>> BUILD_DOCBOOK_PDF = NO >>> V = 1 >>> LATEX_DOCS = NO >>> HSCOLOUR_SRCS = NO >>> BeConservative = YES >>> >>> I just combined it from parts I found in the internet during searching >>> answers to my questions. So I built this container, I also installed >>> dependencies by this commands: >>> cd /mnt >>> cabal update >>> cabal sandbox init >>> cabal install --enable-shared --ghc-option=-fPIC happy alex >>> cabal install --enable-shared --ghc-option=-fPIC base-unicode-symbols >>> filepath process directory lens containers qm-interpolated-string >>> >>> And when I tried to build my app by following commands (first command >>> compiles some C-code to automatically initialize Haskell runtime, see link >>> posted below, not sure if *-static*, *-shared* or *-fPIC* means >>> something here but it's work in progress): >>> ghc -static -shared -fPIC -optc-DMODULE=Foo src/lib-autoinit.c >>> -outputdir builddir >>> ghc -package-db=SOME_CABALS_SANDBOX_PKGDB_DIR --make -static -shared -fPIC >>> src/Foo.hs builddir/src/lib-autoinit.o -o builddir/libfoo.o -isrc >>> -outputdir builddir -Wall -O2 >>> >>> I failed with a lot of similar errors like this one: >>> /usr/bin/ld.gold: error: /ghc-8.2.2-fpic/lib/ghc-8.2.2/ >>> ghc-prim-0.5.1.1/libHSghc-prim-0.5.1.1.a(Classes.o): requires dynamic >>> R_X86_64_PC32 reloc against 'stg_ap_0_fast' which may overflow at runtime; >>> recompile with -fPIC >>> >>> What have I missed? What should I do to make this happen? >>> >>> Any progress could be found here (Dockerfile, sources of modules, >>> build-scripts): https://github.com/unclechu/ha >>> skell-experiment-shared-library-for-c-application >>> Related stack overflow issue: https://stackoverflow.com/ques >>> tions/47978884/how-do-i-recompile-ghc-with-fpic >>> >>> _______________________________________________ >>> ghc-devs mailing list >>> ghc-devs at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >>> >>> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at smart-cactus.org Thu Dec 28 18:13:20 2017 From: ben at smart-cactus.org (Ben Gamari) Date: Thu, 28 Dec 2017 13:13:20 -0500 Subject: How do I build basic GHC packages with -fPIC? In-Reply-To: References: <968747a9-1b8c-d142-4dd5-179c3e75174b@gmail.com> <38856e22-4ed5-6cb4-01b1-d416e501096a@gmail.com> Message-ID: <87shbubu11.fsf@ben-laptop.smart-cactus.org> Alberto Valverde writes: > I think you need place the build.mk in it's place before running GHC's > configure script. > AFAICT this shouldn't be necessary; build.mk is only looked at by make. > On Thu, Dec 28, 2017 at 12:44 PM, Viacheslav Lotsmanov < > lotsmanov89 at gmail.com> wrote: > >> Now I took my build.mk and just replaced lines with SRC_HC_OPTS and >> SRC_CC_OPTS with ones from your example: >> >> SRC_HC_OPTS += -fPIC >> SRC_CC_OPTS += -fPIC >> I have a build running to reproduce this. I'll let you know what I find. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From ben at smart-cactus.org Thu Dec 28 18:26:17 2017 From: ben at smart-cactus.org (Ben Gamari) Date: Thu, 28 Dec 2017 13:26:17 -0500 Subject: validate failure on Mac OSX for ghc head (validate fails with clang) In-Reply-To: References: Message-ID: <87mv22btfd.fsf@ben-laptop.smart-cactus.org> Carter Schonwald writes: > digging around in configure.ac it looks like i need to set CC_STAGE0 env > variable to my desired CC :) > > hope this helps other folks... but it definiely seems like the current > logic for CC_STAGE0 is more brittle than for CC > Indeed, I've realized over the last few weeks in attempts to cross-compile GHC that our configure script is a bit... let's say peculiar in several respects. Do record your findings on the Wiki. They will be much easier to find there than buried on ghc-devs. Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From matt.lamari at gmail.com Thu Dec 28 20:28:45 2017 From: matt.lamari at gmail.com (Matthew Lamari) Date: Thu, 28 Dec 2017 14:28:45 -0600 Subject: Haskell Platform 8.2.2 - virus? Message-ID: <37960d7a-6943-8f3e-7bea-f8016fcaee1f@gmail.com> New Haskell install was tripping my Bitdefender like crazy and in weird ways - not new as that's how bitdefender rolls. However, I retested in a clean test, with (free) Hitman Pro I started from a base case with 2 clean windows 8 VMs. New 8.2.2 install - has virus Old 8.0.2 Jan 2017 - no virus According to Hitman Pro, touchy.exe, haddock-8.2.2, ghc-8.2.2.exe, and unlit.exe have some problem post-install. I went no further on the VMs. "Detection Names Kaspersky Trojan-Downloader.Win32.Paph.fsv " Bitdefender didn't get it on install but would lock the whole thing down on the first run of "Cabal". From lonetiger at gmail.com Thu Dec 28 21:00:01 2017 From: lonetiger at gmail.com (lonetiger at gmail.com) Date: Thu, 28 Dec 2017 21:00:01 +0000 Subject: Haskell Platform 8.2.2 - virus? In-Reply-To: <37960d7a-6943-8f3e-7bea-f8016fcaee1f@gmail.com> References: <37960d7a-6943-8f3e-7bea-f8016fcaee1f@gmail.com> Message-ID: <5a455b51.11101c0a.8d50f.f644@mx.google.com> Upload one of the binaries it flagged to https://www.virustotal.com/en/ and send the link. As far as I can tell, they’re all clean https://www.virustotal.com/en/file/9cc2a6032dde8d8ab572f9491041242ab4c76d2b7d36eea5283c82cf9bf9fd69/analysis/ https://www.virustotal.com/en/file/5ffdaa7da4381637ab2a0ec327118cd933398a477430e2f5d94e9d53c53f2782/analysis/ From: Matthew Lamari Sent: Thursday, December 28, 2017 20:29 To: ghc-devs at haskell.org Subject: Haskell Platform 8.2.2 - virus? New Haskell install was tripping my Bitdefender like crazy and in weird ways - not new as that's how bitdefender rolls. However, I retested in a clean test, with (free) Hitman Pro I started from a base case with 2 clean windows 8 VMs. New 8.2.2 install - has virus Old 8.0.2 Jan 2017 - no virus According to Hitman Pro, touchy.exe, haddock-8.2.2, ghc-8.2.2.exe, and unlit.exe have some problem post-install. I went no further on the VMs. "Detection Names Kaspersky Trojan-Downloader.Win32.Paph.fsv " Bitdefender didn't get it on install but would lock the whole thing down on the first run of "Cabal". _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.lamari at gmail.com Thu Dec 28 21:15:23 2017 From: matt.lamari at gmail.com (Matthew Lamari) Date: Thu, 28 Dec 2017 15:15:23 -0600 Subject: Haskell Platform 8.2.2 - virus? In-Reply-To: <5a455b51.11101c0a.8d50f.f644@mx.google.com> References: <37960d7a-6943-8f3e-7bea-f8016fcaee1f@gmail.com> <5a455b51.11101c0a.8d50f.f644@mx.google.com> Message-ID: <1de55708-39dc-0903-c4a8-89cc3a4b0ac8@gmail.com> The site gave me the 5ffdaa sha256 you have below for touchy.exe. That said, I still have the 2 builds yield different results from Hitman Pro on the clean boxes. And Bitdefender, on my machine, (albeit being obtuse) chucks a fit over it. It doesn't detect the EXE files; but detects secondary consequences of them running. *I really think something is afoot here.* On 12/28/2017 3:00 PM, lonetiger at gmail.com wrote: > > Upload one of the binaries it flagged to > https://www.virustotal.com/en/ and send the link. > >   > > As far as I can tell, they’re all clean > >   > > https://www.virustotal.com/en/file/9cc2a6032dde8d8ab572f9491041242ab4c76d2b7d36eea5283c82cf9bf9fd69/analysis/ > > https://www.virustotal.com/en/file/5ffdaa7da4381637ab2a0ec327118cd933398a477430e2f5d94e9d53c53f2782/analysis/ > >   > > *From: *Matthew Lamari > *Sent: *Thursday, December 28, 2017 20:29 > *To: *ghc-devs at haskell.org > *Subject: *Haskell Platform 8.2.2 - virus? > >   > >   > > New Haskell install was tripping my Bitdefender like crazy and in weird > > ways - not new as that's how bitdefender rolls. However, I retested in a > > clean test, with (free) Hitman Pro > >   > > I started from a base case with 2 clean windows 8 VMs. > >   > > New 8.2.2 install - has virus > > Old 8.0.2 Jan 2017 - no virus > >   > >   > > According to Hitman Pro, touchy.exe, haddock-8.2.2, ghc-8.2.2.exe, and > > unlit.exe have some problem post-install. I went no further on the VMs. > >   > > "Detection Names > > Kaspersky           Trojan-Downloader.Win32.Paph.fsv > > " > >   > > Bitdefender didn't get it on install but would lock the whole thing down > > on the first run of "Cabal". > >   > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > >   > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Thu Dec 28 21:29:44 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Thu, 28 Dec 2017 16:29:44 -0500 Subject: Haskell Platform 8.2.2 - virus? In-Reply-To: <1de55708-39dc-0903-c4a8-89cc3a4b0ac8@gmail.com> References: <37960d7a-6943-8f3e-7bea-f8016fcaee1f@gmail.com> <5a455b51.11101c0a.8d50f.f644@mx.google.com> <1de55708-39dc-0903-c4a8-89cc3a4b0ac8@gmail.com> Message-ID: This wouldn't be the first time some program that uses heuristic execution patterns to detect malware decided it didn't like the STG. On Thu, Dec 28, 2017 at 4:15 PM, Matthew Lamari wrote: > > The site gave me the 5ffdaa sha256 you have below for touchy.exe. > > That said, I still have the 2 builds yield different results from Hitman > Pro on the clean boxes. And Bitdefender, on my machine, (albeit being > obtuse) chucks a fit over it. It doesn't detect the EXE files; but detects > secondary consequences of them running. > > > *I really think something is afoot here.* > > > > > On 12/28/2017 3:00 PM, lonetiger at gmail.com wrote: > > Upload one of the binaries it flagged to https://www.virustotal.com/en/ > and send the link. > > > > As far as I can tell, they’re all clean > > > > https://www.virustotal.com/en/file/9cc2a6032dde8d8ab572f949104124 > 2ab4c76d2b7d36eea5283c82cf9bf9fd69/analysis/ > > https://www.virustotal.com/en/file/5ffdaa7da4381637ab2a0ec327118c > d933398a477430e2f5d94e9d53c53f2782/analysis/ > > > > *From: *Matthew Lamari > *Sent: *Thursday, December 28, 2017 20:29 > *To: *ghc-devs at haskell.org > *Subject: *Haskell Platform 8.2.2 - virus? > > > > > > New Haskell install was tripping my Bitdefender like crazy and in weird > > ways - not new as that's how bitdefender rolls. However, I retested in a > > clean test, with (free) Hitman Pro > > > > I started from a base case with 2 clean windows 8 VMs. > > > > New 8.2.2 install - has virus > > Old 8.0.2 Jan 2017 - no virus > > > > > > According to Hitman Pro, touchy.exe, haddock-8.2.2, ghc-8.2.2.exe, and > > unlit.exe have some problem post-install. I went no further on the VMs. > > > > "Detection Names > > Kaspersky Trojan-Downloader.Win32.Paph.fsv > > " > > > > Bitdefender didn't get it on install but would lock the whole thing down > > on the first run of "Cabal". > > > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonetiger at gmail.com Thu Dec 28 22:01:17 2017 From: lonetiger at gmail.com (lonetiger at gmail.com) Date: Thu, 28 Dec 2017 22:01:17 +0000 Subject: Haskell Platform 8.2.2 - virus? In-Reply-To: References: <37960d7a-6943-8f3e-7bea-f8016fcaee1f@gmail.com> <5a455b51.11101c0a.8d50f.f644@mx.google.com> <1de55708-39dc-0903-c4a8-89cc3a4b0ac8@gmail.com> Message-ID: <5a4569ad.43a6df0a.1fea0.706a@mx.google.com> Yes, AV software, especially HitmanPro are not gospel. 67 other AVs came out clean. But let’s say for the sake of argument that they’re all wrong. “Trojan-Downloader” is a class of Trojan that downloads a payload. Which means they need to use a socket somehow. $ sha256sum.exe ghc-8.2.2/lib/bin/touchy.exe 5ffdaa7da4381637ab2a0ec327118cd933398a477430e2f5d94e9d53c53f2782 *ghc-8.2.2/lib/bin/touchy.exe Is the binary I’m looking it, it matches the hash on the total virus link and yours. This is the source of touchy https://github.com/ghc/ghc/blob/ghc-8.2/utils/touchy/touchy.c The application does not import Winsock, so networking seems more unlikely, but it imports GetProcAddress, so let’s say for the sake of argument it’s Dynamically binding to the socket library. http://lpaste.net/3408264924009332736 is the full string table. Which contains no ascii string starting with “WSA”. So unlikely since you need to name the function you want to call, and you need to initialize the sockets, so WSA. This is the full disassembly of touchy.exe http://lpaste.net/7667888088021991424 Below you’ll find an inline copy of main, it pretty much follows the source in touchy.c. I’m pretty confident that HitmanPro is just throwing a false positive, I won’t be going through the CRT startup code. Here’s main: 00000000004015c0
: 4015c0: 41 57 push %r15 4015c2: 41 56 push %r14 4015c4: 41 55 push %r13 4015c6: 41 54 push %r12 4015c8: 55 push %rbp 4015c9: 57 push %rdi 4015ca: 56 push %rsi 4015cb: 53 push %rbx 4015cc: 48 83 ec 68 sub $0x68,%rsp 4015d0: 89 ce mov %ecx,%esi 4015d2: 48 89 d7 mov %rdx,%rdi 4015d5: e8 e6 02 00 00 callq 4018c0 <__main> 4015da: 83 fe 01 cmp $0x1,%esi 4015dd: 74 10 je 4015ef 4015df: b8 00 00 00 00 mov $0x0,%eax 4015e4: 83 fe 01 cmp $0x1,%esi 4015e7: 0f 8e 4d 01 00 00 jle 40173a 4015ed: eb 26 jmp 401615 4015ef: 48 8b 1f mov (%rdi),%rbx 4015f2: ff 15 1c 6d 00 00 callq *0x6d1c(%rip) # 408314 <__imp___iob_func> 4015f8: 48 8d 48 60 lea 0x60(%rax),%rcx 4015fc: 49 89 d8 mov %rbx,%r8 4015ff: 48 8d 15 2a 2a 00 00 lea 0x2a2a(%rip),%rdx # 404030 <.rdata> 401606: e8 65 17 00 00 callq 402d70 40160b: b8 01 00 00 00 mov $0x1,%eax 401610: e9 25 01 00 00 jmpq 40173a 401615: 48 8d 5f 08 lea 0x8(%rdi),%rbx 401619: 8d 46 fe lea -0x2(%rsi),%eax 40161c: 4c 8d 7c c7 10 lea 0x10(%rdi,%rax,8),%r15 401621: 4c 8b 2d ec 6b 00 00 mov 0x6bec(%rip),%r13 # 408214 <__imp_CreateFileA> 401628: 48 8d 7c 24 50 lea 0x50(%rsp),%rdi 40162d: 4c 8b 25 30 6c 00 00 mov 0x6c30(%rip),%r12 # 408264 <__imp_GetSystemTimeAsFileTime> 401634: 48 8b 2d 71 6c 00 00 mov 0x6c71(%rip),%rbp # 4082ac <__imp_SetFileTime> 40163b: 4c 8b 35 ca 6b 00 00 mov 0x6bca(%rip),%r14 # 40820c <__IAT_start__> 401642: 48 89 5c 24 48 mov %rbx,0x48(%rsp) 401647: 48 c7 44 24 30 00 00 movq $0x0,0x30(%rsp) 40164e: 00 00 401650: c7 44 24 28 80 00 00 movl $0x80,0x28(%rsp) 401657: 00 401658: c7 44 24 20 04 00 00 movl $0x4,0x20(%rsp) 40165f: 00 401660: 41 b9 00 00 00 00 mov $0x0,%r9d 401666: 41 b8 00 00 00 00 mov $0x0,%r8d 40166c: ba 00 00 00 40 mov $0x40000000,%edx 401671: 48 8b 0b mov (%rbx),%rcx 401674: 41 ff d5 callq *%r13 401677: 48 89 c6 mov %rax,%rsi 40167a: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 40167e: 75 2b jne 4016ab 401680: 48 8b 44 24 48 mov 0x48(%rsp),%rax 401685: 48 8b 18 mov (%rax),%rbx 401688: ff 15 86 6c 00 00 callq *0x6c86(%rip) # 408314 <__imp___iob_func> 40168e: 48 8d 48 60 lea 0x60(%rax),%rcx 401692: 49 89 d8 mov %rbx,%r8 401695: 48 8d 15 a7 29 00 00 lea 0x29a7(%rip),%rdx # 404043 <.rdata+0x13> 40169c: e8 cf 16 00 00 callq 402d70 4016a1: b9 01 00 00 00 mov $0x1,%ecx 4016a6: e8 cd 16 00 00 callq 402d78 4016ab: 48 89 f9 mov %rdi,%rcx 4016ae: 41 ff d4 callq *%r12 4016b1: 49 89 f9 mov %rdi,%r9 4016b4: 41 b8 00 00 00 00 mov $0x0,%r8d 4016ba: ba 00 00 00 00 mov $0x0,%edx 4016bf: 48 89 f1 mov %rsi,%rcx 4016c2: ff d5 callq *%rbp 4016c4: 85 c0 test %eax,%eax 4016c6: 75 2b jne 4016f3 4016c8: 48 8b 44 24 48 mov 0x48(%rsp),%rax 4016cd: 48 8b 18 mov (%rax),%rbx 4016d0: ff 15 3e 6c 00 00 callq *0x6c3e(%rip) # 408314 <__imp___iob_func> 4016d6: 48 8d 48 60 lea 0x60(%rax),%rcx 4016da: 49 89 d8 mov %rbx,%r8 4016dd: 48 8d 15 74 29 00 00 lea 0x2974(%rip),%rdx # 404058 <.rdata+0x28> 4016e4: e8 87 16 00 00 callq 402d70 4016e9: b9 01 00 00 00 mov $0x1,%ecx 4016ee: e8 85 16 00 00 callq 402d78 4016f3: 48 89 f1 mov %rsi,%rcx 4016f6: 41 ff d6 callq *%r14 4016f9: 85 c0 test %eax,%eax 4016fb: 75 2b jne 401728 4016fd: 48 8b 44 24 48 mov 0x48(%rsp),%rax 401702: 48 8b 18 mov (%rax),%rbx 401705: ff 15 09 6c 00 00 callq *0x6c09(%rip) # 408314 <__imp___iob_func> 40170b: 48 8d 48 60 lea 0x60(%rax),%rcx 40170f: 49 89 d8 mov %rbx,%r8 401712: 48 8d 15 62 29 00 00 lea 0x2962(%rip),%rdx # 40407b <.rdata+0x4b> 401719: e8 52 16 00 00 callq 402d70 40171e: b9 01 00 00 00 mov $0x1,%ecx 401723: e8 50 16 00 00 callq 402d78 401728: 48 83 c3 08 add $0x8,%rbx 40172c: 4c 39 fb cmp %r15,%rbx 40172f: 0f 85 0d ff ff ff jne 401642 401735: b8 00 00 00 00 mov $0x0,%eax 40173a: 48 83 c4 68 add $0x68,%rsp 40173e: 5b pop %rbx 40173f: 5e pop %rsi 401740: 5f pop %rdi 401741: 5d pop %rbp 401742: 41 5c pop %r12 401744: 41 5d pop %r13 401746: 41 5e pop %r14 401748: 41 5f pop %r15 40174a: c3 retq 40174b: 90 nop 40174c: 90 nop 40174d: 90 nop 40174e: 90 nop 40174f: 90 nop From: Brandon Allbery Sent: Thursday, December 28, 2017 21:29 To: Matthew Lamari Cc: lonetiger at gmail.com; ghc-devs at haskell.org Subject: Re: Haskell Platform 8.2.2 - virus? This wouldn't be the first time some program that uses heuristic execution patterns to detect malware decided it didn't like the STG. On Thu, Dec 28, 2017 at 4:15 PM, Matthew Lamari wrote: The site gave me the 5ffdaa sha256 you have below for touchy.exe. That said, I still have the 2 builds yield different results from Hitman Pro on the clean boxes. And Bitdefender, on my machine, (albeit being obtuse) chucks a fit over it. It doesn't detect the EXE files; but detects secondary consequences of them running. I really think something is afoot here. On 12/28/2017 3:00 PM, lonetiger at gmail.com wrote: Upload one of the binaries it flagged to https://www.virustotal.com/en/ and send the link.   As far as I can tell, they’re all clean   https://www.virustotal.com/en/file/9cc2a6032dde8d8ab572f9491041242ab4c76d2b7d36eea5283c82cf9bf9fd69/analysis/ https://www.virustotal.com/en/file/5ffdaa7da4381637ab2a0ec327118cd933398a477430e2f5d94e9d53c53f2782/analysis/   From: Matthew Lamari Sent: Thursday, December 28, 2017 20:29 To: ghc-devs at haskell.org Subject: Haskell Platform 8.2.2 - virus?     New Haskell install was tripping my Bitdefender like crazy and in weird ways - not new as that's how bitdefender rolls. However, I retested in a clean test, with (free) Hitman Pro   I started from a base case with 2 clean windows 8 VMs.   New 8.2.2 install - has virus Old 8.0.2 Jan 2017 - no virus     According to Hitman Pro, touchy.exe, haddock-8.2.2, ghc-8.2.2.exe, and unlit.exe have some problem post-install. I went no further on the VMs.   "Detection Names Kaspersky           Trojan-Downloader.Win32.Paph.fsv "   Bitdefender didn't get it on install but would lock the whole thing down on the first run of "Cabal".   _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs   _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -- brandon s allbery kf8nh                               sine nomine associates allbery.b at gmail.com                                  ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From gershomb at gmail.com Thu Dec 28 22:23:41 2017 From: gershomb at gmail.com (Gershom B) Date: Thu, 28 Dec 2017 17:23:41 -0500 Subject: Haskell Platform 8.2.2 - virus? Message-ID: Note that HitmanPro has caused plenty of problems with GHC in the past, and should be avoided by Haskell devs: https://www.reddit.com/r/haskell/comments/77from/gettting_segmentation_fault_on_stackcabal_any/ https://github.com/commercialhaskell/intero/issues/436 From lonetiger at gmail.com Thu Dec 28 23:09:55 2017 From: lonetiger at gmail.com (lonetiger at gmail.com) Date: Thu, 28 Dec 2017 23:09:55 +0000 Subject: Haskell Platform 8.2.2 - virus? In-Reply-To: References: Message-ID: <5a4579c3.b7a0df0a.1d24f.c59b@mx.google.com> We have fixed this though, GHC 8.4 shouldn’t have this problem specifically. The issue is that hitman pro is injecting itself into every process by throwing a signal, Prior to 8.4 we were pretty aggressive in how we treated first chance exceptions. We’ve now relaxed this. That said I find the behavior of HitmanPro to be quite intrusive and I wouldn’t trust anything injecting code Into my address space. Fyi, this is what it caused: ExceptionAddress: 00007ffcc2b368ce (ntdll!RtlVirtualUnwind+0x000000000000001e) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 0000000000000000 Parameter[1]: 00000000046710f6 Attempt to read from address 00000000046710f6 0:000> lmvm hmpalert Browse full module list start end module name 00007ffc`ba4b0000 00007ffc`ba595000 hmpalert (export symbols) hmpalert.dll Loaded symbol image file: hmpalert.dll Image path: C:\Windows\System32\hmpalert.dll Image name: hmpalert.dll Browse all global symbols functions data Timestamp: Mon Jul 17 15:53:17 2017 (596CCF5D) CheckSum: 000F490C ImageSize: 000E5000 File version: 3.6.8.604 Product version: 3.6.8.604 File flags: 0 (Mask 3F) File OS: 40004 NT Win32 File type: 2.0 Dll File date: 00000000.00000000 Translations: 0400.04b0 CompanyName: SurfRight B.V. ProductName: HitmanPro.Alert InternalName: hmpalert.dll OriginalFilename: hmpalert_x64.dll ProductVersion: 3.6.8.604 FileVersion: 3.6.8.604 FileDescription: HitmanPro.Alert 64-bit Support Library LegalCopyright: © 2013-2017 SurfRight, a Sophos company Comments: Incorporates Threatstar Exploit Mitigation Platform (EMP) From: Gershom B Sent: Thursday, December 28, 2017 22:24 To: ghc-devs at haskell.org Devs Subject: RE: Haskell Platform 8.2.2 - virus? Note that HitmanPro has caused plenty of problems with GHC in the past, and should be avoided by Haskell devs: https://www.reddit.com/r/haskell/comments/77from/gettting_segmentation_fault_on_stackcabal_any/ https://github.com/commercialhaskell/intero/issues/436 _______________________________________________ ghc-devs mailing list ghc-devs at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Thu Dec 28 23:40:26 2017 From: allbery.b at gmail.com (Brandon Allbery) Date: Thu, 28 Dec 2017 18:40:26 -0500 Subject: Haskell Platform 8.2.2 - virus? In-Reply-To: <5a4579c3.b7a0df0a.1d24f.c59b@mx.google.com> References: <5a4579c3.b7a0df0a.1d24f.c59b@mx.google.com> Message-ID: "Hitman" sounds rather self-descriptive. Not sure I'd allow such a thing onto any system under my control; it sounds pretty much like malware in its own right. On Thu, Dec 28, 2017 at 6:09 PM, wrote: > > > We have fixed this though, GHC 8.4 shouldn’t have this problem > specifically. > > > > The issue is that hitman pro is injecting itself into every process by > throwing a signal, > > Prior to 8.4 we were pretty aggressive in how we treated first chance > exceptions. We’ve now relaxed this. > > > > That said I find the behavior of HitmanPro to be quite intrusive and I > wouldn’t trust anything injecting code > > Into my address space. > > > > Fyi, this is what it caused: > > > > ExceptionAddress: 00007ffcc2b368ce (ntdll!RtlVirtualUnwind+ > 0x000000000000001e) > ExceptionCode: c0000005 (Access violation) > ExceptionFlags: 00000000 > NumberParameters: 2 > Parameter[0]: 0000000000000000 > Parameter[1]: 00000000046710f6 > Attempt to read from address 00000000046710f6 > 0:000> lmvm hmpalert > Browse full module list > start end module name > 00007ffc`ba4b0000 00007ffc`ba595000 hmpalert (export symbols) hmpalert.dll > Loaded symbol image file: hmpalert.dll > Image path: C:\Windows\System32\hmpalert.dll > Image name: hmpalert.dll > Browse all global symbols functions data > Timestamp: Mon Jul 17 15:53:17 2017 (596CCF5D) > CheckSum: 000F490C > ImageSize: 000E5000 > File version: 3.6.8.604 > Product version: 3.6.8.604 > File flags: 0 (Mask 3F) > File OS: 40004 NT Win32 > File type: 2.0 Dll > File date: 00000000.00000000 > Translations: 0400.04b0 > CompanyName: SurfRight B.V. > ProductName: HitmanPro.Alert > InternalName: hmpalert.dll > OriginalFilename: hmpalert_x64.dll > ProductVersion: 3.6.8.604 > FileVersion: 3.6.8.604 > FileDescription: HitmanPro.Alert 64-bit Support Library > LegalCopyright: © 2013-2017 SurfRight, a Sophos company > Comments: Incorporates Threatstar Exploit Mitigation Platform (EMP) > > > > *From: *Gershom B > *Sent: *Thursday, December 28, 2017 22:24 > *To: *ghc-devs at haskell.org Devs > *Subject: *RE: Haskell Platform 8.2.2 - virus? > > > > Note that HitmanPro has caused plenty of problems with GHC in the > > past, and should be avoided by Haskell devs: > > > > https://www.reddit.com/r/haskell/comments/77from/ > gettting_segmentation_fault_on_stackcabal_any/ > > > > https://github.com/commercialhaskell/intero/issues/436 > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewtpickering at gmail.com Fri Dec 29 19:31:19 2017 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Fri, 29 Dec 2017 19:31:19 +0000 Subject: Naming of HEq_sc Message-ID: Hi all, Does anyone know why the *record selector* `HEq_sc` started with a capital letter? Would it be sensible to rename it to start with a lower case letter and perhaps mention that it is a selector in the name? git grep "HEq_sc" doesn't yield any explanation, I could only work this out from reading the source doe. I propose "heq_sel" could be more self-explanatory. Cheers, Matt From carter.schonwald at gmail.com Fri Dec 29 20:17:10 2017 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Fri, 29 Dec 2017 20:17:10 +0000 Subject: validate failure on Mac OSX for ghc head (validate fails with clang) In-Reply-To: <87mv22btfd.fsf@ben-laptop.smart-cactus.org> References: <87mv22btfd.fsf@ben-laptop.smart-cactus.org> Message-ID: I put some notes on trac. I’ll see about updating build notes later. I did find some stuff in the Mach linker that needs to be handled differently on gcc vs clang on Mac. And likely needs a patch so it also builds clean with gcc On Thu, Dec 28, 2017 at 10:26 AM Ben Gamari wrote: > Carter Schonwald writes: > > > digging around in configure.ac it looks like i need to set CC_STAGE0 env > > variable to my desired CC :) > > > > hope this helps other folks... but it definiely seems like the current > > logic for CC_STAGE0 is more brittle than for CC > > > Indeed, I've realized over the last few weeks in attempts to > cross-compile GHC that our configure script is a bit... let's say > peculiar in several respects. > > Do record your findings on the Wiki. They will be much easier to find > there than buried on ghc-devs. > > Cheers, > > - Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rae at cs.brynmawr.edu Fri Dec 29 21:16:13 2017 From: rae at cs.brynmawr.edu (Richard Eisenberg) Date: Fri, 29 Dec 2017 16:16:13 -0500 Subject: Naming of HEq_sc In-Reply-To: References: Message-ID: This smells like my doing. My best guess is that I copied from Coercible_sc, just a bit further down in TysWiredIn. I don't think there's more rhyme or reason to the choice. Richard > On Dec 29, 2017, at 2:31 PM, Matthew Pickering wrote: > > Hi all, > > Does anyone know why the *record selector* `HEq_sc` started with a > capital letter? > > Would it be sensible to rename it to start with a lower case letter > and perhaps mention that it is a selector in the name? > > git grep "HEq_sc" doesn't yield any explanation, I could only work > this out from reading the source doe. > > I propose "heq_sel" could be more self-explanatory. > > Cheers, > > Matt > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From matthewtpickering at gmail.com Fri Dec 29 22:25:44 2017 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Fri, 29 Dec 2017 22:25:44 +0000 Subject: Naming of HEq_sc In-Reply-To: References: Message-ID: Thanks Richard. I created D4280 if anyone else wants to weigh in. Matt On Fri, Dec 29, 2017 at 9:16 PM, Richard Eisenberg wrote: > This smells like my doing. My best guess is that I copied from Coercible_sc, just a bit further down in TysWiredIn. I don't think there's more rhyme or reason to the choice. > > Richard > >> On Dec 29, 2017, at 2:31 PM, Matthew Pickering wrote: >> >> Hi all, >> >> Does anyone know why the *record selector* `HEq_sc` started with a >> capital letter? >> >> Would it be sensible to rename it to start with a lower case letter >> and perhaps mention that it is a selector in the name? >> >> git grep "HEq_sc" doesn't yield any explanation, I could only work >> this out from reading the source doe. >> >> I propose "heq_sel" could be more self-explanatory. >> >> Cheers, >> >> Matt >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > From ben at well-typed.com Sun Dec 31 05:19:26 2017 From: ben at well-typed.com (Ben Gamari) Date: Sun, 31 Dec 2017 00:19:26 -0500 Subject: [ANNOUNCE] GHC 8.4.1-alpha1 available In-Reply-To: <063D5643-88A7-4776-8C58-8662B420588A@fpcomplete.com> References: <87bmitcejz.fsf@ben-laptop.smart-cactus.org> <063D5643-88A7-4776-8C58-8662B420588A@fpcomplete.com> Message-ID: <87d12vbhk3.fsf@ben-laptop.smart-cactus.org> Emanuel Borsboom writes: > Hi Ben, > > Are there any plans to start releasing Linux bindists linked with > libncurses.so.6? A number of Linux distributions have upgraded from 5, > including Fedora, Arch and Gentoo, and the currently available > official bindists don't work out of the box on those anymore. > Indeed I can add an ncurses.so.6 platform to the build matrix. I'll start with the next alpha. Thanks for mentioning this! Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From steven at steshaw.org Sun Dec 10 06:47:37 2017 From: steven at steshaw.org (Steven Shaw) Date: Sun, 10 Dec 2017 06:47:37 -0000 Subject: cvs-ghc mailing list dead? Message-ID: This email list appears to be dead but I figured it might forward to ghc-devs . Just checking... -------------- next part -------------- An HTML attachment was scrubbed... URL: From m at tweag.io Wed Dec 13 21:32:47 2017 From: m at tweag.io (Boespflug, Mathieu) Date: Wed, 13 Dec 2017 21:32:47 -0000 Subject: Release policies In-Reply-To: References: Message-ID: [replying to ghc-devops-group@, which I assume based on your email's content is the mailing list you intended.] Hi Simon, feedback from downstream consumers of Cabal metadata (e.g. build tool authors) will be particularly useful for the discussion here. Here are my thoughts as a bystander. It's worth trying to identify what problems came up during the integer-gmp incident in Trac #14558: * GHC 8.2.1 shipped with integer-gmp-1.0.1.0 but the release notes said otherwise. * GHC 8.2.1 shipped with Cabal-2.0.0.2, but specifically claimed in the release notes that cabal-install-1.24 (and by implication any other build tool based on Cabal-the-library version 1.24) was supported: "GHC 8.2 only works with cabal-install version 1.24 or later. Please upgrade if you have an older version of cabal-install." * GHC 8.2.2 also claimed Cabal-1.24 support. * GHC 8.2.1 was released in July 2017 with Cabal-2.0.0.2, a brand new major release with breaking changes to the metadata format, without much lead time for downstream tooling authors (like Stack) to adapt. * But actually if we look at their respective release notes, GHC 8.2.1 was relased in July 2017, even though the Cabal website claims that Cabal-2.0.0.2 was released in August 2017 (see https://www.haskell.org/cabal/download.html). So it looks like GHC didn't just not give enough lead time about an upstream dependency it shipped with, it shipped with an unreleased version of Cabal! * Libraries that ship with GHC are usually also uploaded to Hackage, to make the documentation easily accessible, but integer-gmp-1.0.1.0 was not uploaded to Hackage until 4 months after the release. * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage differed from the metadata that was actually in the source tarball of GHC-8.2.1 and GHC-8.2.2. * The metadata for integer-gmp-1.0.1.0 as uploaded to Hackage included Cabal-2.0 specific syntactic sugar, making the metadata unreadable using any tooling that did not link against the Cabal-2.0.0.2 library (or any later version). * It so happened that one particular version of one particular downstream build tool, Stack, had a bug, compounding the bad effects of the previous point. But a new release has now been made, and in any case that's not a problem for GHC to solve. So let's keep that out of the discussion here. So I suggest we discuss ways to eliminate or reduce the likelihood of any of the above problems from occurring again. Here are some ideas: * GHC should never under any circumstance ship with an unreleased version of any independently maintained dependency. Cabal is one such dependency. This should hold true for anything else. We could just add that policy to the Release Policy. * Stronger still, GHC should not switch to a new major release of a dependency at any time during feature freeze ahead of a release. E.g. if Cabal-3.0.0 ships before feature freeze for GHC-9.6, then maybe it's fair game to include in GHC. But not if Cabal-3.0.0 hasn't shipped yet. * The 3-release backwards compat rule should apply in all circumstances. That means major version bumps of any library GHC ships with, including base, should not imply any breaking change in the API's of any such library. * GHC does have control over reinstallable packages (like text and bytestring): GHC need not ship with the latest versions of these, if indeed they introduce breaking changes that would contravene the 3-release policy. * Note: today, users are effectively tied to whatever version of the packages ships with GHC (i.e. the "reinstallable" bit is problematic today for various technical reasons). That's why a breaking change in bytestring is technically a breaking change in GHC. * The current release policy covers API stability, but what about metadata? In the extreme, we could say a 3-release policy applies to metadata too. Meaning, all metadata shipping with GHC now and in the next 2 releases should be parseable by today's version of Cabal and downstream tooling. Is such a long lead time necessary? That's for build tool authors to say, and a point to negotiate with GHC devs. * Because there are far fewer consumers of metadata than consumers of say base, I think shorter lead time is reasonable. At the other extreme, it could even be just the few months during feature freeze. * The release notes bugs mentioned above and the lack of consistent upload to Hackage are a symptom of lack of release automation, I suspect. That's how to fix it, but we could also spell out in the Release Policy that GHC libraries should all be on Hackage from the day of release. Finally, a question for discussion: * Hackage allows revising the metadata of an uploaded package even without changing the version number. This happens routinely on Hackage today by the Hackage trustees. Should this be permitted for packages whose release is completely tied to that of GHC itself (like integer-gmp)? Best, Mathieu On 13 December 2017 at 17:43, Simon Peyton Jones via ghc-devs < ghc-devs at haskell.org> wrote: > Dear GHC devops group > > The conversation on Trac #14558 > suggests that we might > want to consider reviewing GHC’s release policies > . > This email is to invite your input. > > The broad questions is this. We want GHC to serve the needs of all its > users, including downstream tooling that uses GHC. What release policies > will best support that goal? For example, we already ensure that GHC 8.4 > can be compiled with 8.2 and 8.0. This imposes a slight tax on GHC > development, but it means that users don't need to upgrade quite as often. > (If the tempo of releases increases, we might want to increase the window.) > > Trac #14558 suggests that we might want to ensure the metadata on GHC’s > built-in libraries is parsable with older Cabals. One possibility would be > this: > > - Ensure that the Cabal metadata of non-reinstallable packages (e.g. > integer-gmp) shipped with GHC be parsable by the Cabal versions shipped > with the last two major GHC releases [i.e. have a sufficiently old > cabal-version field]. That is, in general a new Cabal specification will > need to be shipped with two GHC releases before GHC will use start using > its features in non-reinstallable packages. > - Upholding this policy won't always be possible. There may be cases > (as is the case Hadrian for GHC 8.4) where the benefit of quickly > introducing incompatible syntax outweighs the need for compatibility. In > this (hopefully rare) case we would explicitly advertise the > incompatibility in the release documentation, and give as much notice as > possible to users to allow downstream tools to adapt. > - For reinstallable packages, of which GHC is simply a client (like > text or bytestring), we can’t reasonably enforce such a policy, because GHC > devs have no control over what the maintainers of external core libraries > put in their Cabal files. > > This is just a proposal. The narrow questions are these: > > - Would this be sufficient to deal with the concerns raised in #14558? > - Is it necessary, ow would anything simpler be sufficient? > - What costs would the policy impose on GHC development? > - There may be matters of detail: e.g. is two releases the right grace > period. Would one do? > > Both the broad question and the narrow ones are appropriate for the Devops > group. > > Thanks! > > Simon > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: