darcs

Patch 1927 RepoPatchV3: import everything explicitly

Title RepoPatchV3: import everything explicitly
Superseder Nosy List bf
Related Issues
Status accepted Assigned To
Milestone

Created on 2019-09-20.14:52:23 by bf, last changed 2019-09-25.21:05:13 by ganesh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bf, 2019-09-20.14:52:23 text/x-darcs-patch
repopatchv3_-import-everything-explicitly.dpatch bf, 2019-09-20.14:52:23 application/x-darcs-patch
unnamed bf, 2019-09-20.14:52:23 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg21488 (view) Author: bf Date: 2019-09-20.14:52:23
This has been overdue for some time!

1 patch for repository http://darcs.net/screened:

patch 47a699cc3a9e1268b319c325697f1299498b1faf
Author: Ben Franksen <ben.franksen@online.de>
Date:   Fri Sep 20 00:01:53 CEST 2019
  * RepoPatchV3: import everything explicitly
Attachments
msg21532 (view) Author: ganesh Date: 2019-09-22.12:10:47
This breaks the build with GHC 8.2, in which <> wasn't exported from 
Prelude.
(I'm not quite sure where it was coming from before, must have been
re-exported from something.)

GHC 8.4 should be ok. Shall we just up our minimum supported GHC instead of
trying to fix 8.2?
msg21543 (view) Author: bf Date: 2019-09-23.11:54:43
> This breaks the build with GHC 8.2, in which <> wasn't exported from 
> Prelude.
> (I'm not quite sure where it was coming from before, must have been
> re-exported from something.)
> 
> GHC 8.4 should be ok. Shall we just up our minimum supported GHC instead of
> trying to fix 8.2?

No, I will send a fix. I will also revert my installed version of ghc
back to ghc-8.2.2 to avoid this happening in the future. (My only reason
to upgrade ghc was to get a usable cabal new-haddock.)
msg21549 (view) Author: ganesh Date: 2019-09-23.13:05:00
> No, I will send a fix. I will also revert my installed version of ghc
> back to ghc-8.2.2 to avoid this happening in the future. (My only reason
> to upgrade ghc was to get a usable cabal new-haddock.)

Why do we care about supporting 8.2? (8.4 is because of Debian)
msg21552 (view) Author: bf Date: 2019-09-23.16:33:02
>> No, I will send a fix. I will also revert my installed version of ghc
>> back to ghc-8.2.2 to avoid this happening in the future. (My only reason
>> to upgrade ghc was to get a usable cabal new-haddock.)
> 
> Why do we care about supporting 8.2? (8.4 is because of Debian)

My opinion is that requiring a newer version of ghc or any other
dependency needs a justification. There are 100s of linux distros out
there besides Debian and also a lot of non-Linux OSes. Every time we
require a newer version of a dependency we cause trouble for anyone
trying to build darcs on an older system. I want to avoid giving people
trouble with building darcs, if possible. IMO the issue with <> is too
trivial to justify that here.

If you think otherwise, I won't argue further. Because this has already
been discussed to death in the past. I do reserve the right to register
my disaffection, though.
msg21555 (view) Author: bf Date: 2019-09-23.17:52:49
Back to the issue in question, I think I ran into this because I failed to

import Prelude ()
import Darcs.Prelude

as we do elsewhere. I failed to do this for almost any module I added.

Thinking about this a bit more, I think the first line should rather be
replaced with a global NoImplicitPrelude extension. I will play with
that idea and send a patch.
msg21557 (view) Author: ganesh Date: 2019-09-23.18:12:50
> Back to the issue in question, I think I ran into this because I failed to
> 
> import Prelude ()
> import Darcs.Prelude
> 
> as we do elsewhere. I failed to do this for almost any module I added.

I think I've been forgetting about it as well even though I introduced
it. But it is exactly designed to smooth out GHC/base version
incompatibilities so it sounds like the right solution.

> Thinking about this a bit more, I think the first line should rather be
> replaced with a global NoImplicitPrelude extension. I will play with
> that idea and send a patch.

I think I've played with it before and didn't like the effects, but I
can't remember the details so we might as well try it again.
https://wiki.haskell.org/No_import_of_Prelude suggests it'd be ok given
that we re-export the whole Prelude minus a few bits anyway.

The other downside is it becomes a bit harder to read a single source
file and understand what's happening.
msg21559 (view) Author: bf Date: 2019-09-23.21:11:46
>> Back to the issue in question, I think I ran into this because I failed to
>>
>> import Prelude ()
>> import Darcs.Prelude
>>
>> as we do elsewhere. I failed to do this for almost any module I added.
> 
> I think I've been forgetting about it as well even though I introduced
> it. But it is exactly designed to smooth out GHC/base version
> incompatibilities so it sounds like the right solution.

Indeed, with patch1935 I can build with ghc-8.2.2 just fine.

(One advantage of NoImplicitPrelude it that we can't forget to import
Darcs.Prelude, since almost nothing will compile without it.)
msg21596 (view) Author: ganesh Date: 2019-09-25.19:07:03
Looks fine.

Re GHC versions - apologies for going over old ground, I've 
forgotten whatever discussion we previously had about GHC versions 
apart from the one about supporting 8.4 for Debian. I'm fine with
supporting 8.2 as long as it remains easy.
History
Date User Action Args
2019-09-20 14:52:23bfcreate
2019-09-20 14:52:56bfsetstatus: needs-screening -> needs-review
2019-09-22 12:10:47ganeshsetmessages: + msg21532
2019-09-23 11:54:43bfsetmessages: + msg21543
2019-09-23 13:05:00ganeshsetmessages: + msg21549
2019-09-23 16:33:02bfsetmessages: + msg21552
2019-09-23 17:52:49bfsetmessages: + msg21555
2019-09-23 18:12:51ganeshsetmessages: + msg21557
2019-09-23 21:11:46bfsetmessages: + msg21559
2019-09-25 19:07:03ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg21596
2019-09-25 21:05:13ganeshsetstatus: accepted-pending-tests -> accepted