darcs

Patch 1961 remove darcs --exact-version

Title remove darcs --exact-version
Superseder Nosy List ganesh
Related Issues
Status in-discussion Assigned To
Milestone

Created on 2020-01-25.22:57:43 by ganesh, last changed 2020-01-27.06:57:26 by ganesh.

Files
File name Status Uploaded Type Edit Remove
pEpkey.asc bf, 2020-01-26.19:00:48 application/pgp-keys
pEpkey.asc bf, 2020-01-26.19:55:03 application/pgp-keys
pEpkey.asc bf, 2020-01-26.22:14:56 application/pgp-keys
patch-preview.txt ganesh, 2020-01-25.22:57:43 text/x-darcs-patch
patch-preview.txt bf, 2020-01-26.19:49:12 text/x-darcs-patch
patch-preview.txt bf, 2020-01-26.21:10:17 text/x-darcs-patch
remove-darcs-__exact_version.dpatch ganesh, 2020-01-25.22:57:43 application/x-darcs-patch
remove-sdist-and-postconf-hooks-from-setup_hs.dpatch bf, 2020-01-26.19:49:12 application/x-darcs-patch
remove-sdist-and-postconf-hooks-from-setup_hs.dpatch bf, 2020-01-26.21:10:17 application/x-darcs-patch
unnamed ganesh, 2020-01-25.22:57:43 text/plain
unnamed bf, 2020-01-26.19:49:12 text/plain
unnamed bf, 2020-01-26.21:10:17 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg21721 (view) Author: ganesh Date: 2020-01-25.22:57:43
As discussed in patch1908, this change gets rid of --exact-version.

I won't screen this straight away, but I'd like to soon.

I haven't investigated if there is any impact on our release process,
but I think it'd be easier to handle that when doing the next major
release.

1 patch for repository darcs-unstable@darcs.net:screened:

patch 94e88720a21b69267e8accda38b4f9aa03880b31
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Sat Jan 25 22:59:08 GMT 2020
  * remove darcs --exact-version
  
  The orchestration required to produce it adds a lot of painful
  complexity, especially on Windows where the generated files
  in release/ can cause locking problems. Also sdistHook is
  being removed from Cabal.
Attachments
msg21723 (view) Author: ganesh Date: 2020-01-26.07:58:54
BTW I believe this patch alone will solve the two worst problems we 
currently have with Setup.hs.

Those are:
 - being blocked on moving to Cabal 3.0
 - the random problems with release/distributed-{version,context}
   (particularly on Windows).

I'd still like to be totally rid of it, but this would be a major
step forward.
msg21732 (view) Author: bf Date: 2020-01-26.19:00:48
I agree that we should get rid of the sdist hooks to enable cabal-3.

I am not yet sure we need to sacrifice --exact-version completely. The
shenanigans with adding new files under release/ were, I think, only
necessary because we wanted to support the completely separate sdist
step. If we remove the sdist hook, then we should be able to directly
generate the exact version when we generate the Version.hs file.

Let me give it a try before you screen this one.
Attachments
msg21735 (view) Author: bf Date: 2020-01-26.19:49:12
Okay, here is my counter proposal that leaves --version and --exact-version
intact and only removes the sdist hook (and also the postConf hook).

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

patch 5fb99624a4acd9cfd8bc807cdb534f9232d706b9
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Jan 26 20:56:37 CET 2020
  * remove sdist and postConf hooks from Setup.hs
Attachments
msg21737 (view) Author: bf Date: 2020-01-26.19:55:03
> Okay, here is my counter proposal that leaves --version and --exact-version
> intact and only removes the sdist hook (and also the postConf hook).

It also no longer stores context and version in files under release/
since that was indeed only necessary to communicate this data to 'cabal
sdist'.
Attachments
msg21738 (view) Author: ganesh Date: 2020-01-26.20:04:00
I think you need to remove the files from darcs.cabal too.

I'm actually a bit confused about why I had frequent locking errors
if those files are only actually written in sDistHook. Perhaps 
that's called more often than just during "cabal sdist".

Your patch would indeed also achieve the two most important goals
of my patch. But I think I'd still rather be rid of Setup.hs 
completely than to keep --exact-version. Still, we could revisit
that if and when we are able to remove the manpage generation.
msg21739 (view) Author: bf Date: 2020-01-26.21:10:17
Amended version that also removes the release/ entries in the
extra-source-files section of darcs.cabal.

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

patch 7a3388829209725128d0f9152746da7ac3c8ea88
Author: Ben Franksen <ben.franksen@online.de>
Date:   Sun Jan 26 20:56:37 CET 2020
  * remove sdist and postConf hooks from Setup.hs
Attachments
msg21740 (view) Author: bf Date: 2020-01-26.22:14:56
> I think you need to remove the files from darcs.cabal too.

Right. Will amend.

> I'm actually a bit confused about why I had frequent locking errors
> if those files are only actually written in sDistHook.

Indeed, this is strange.

> Perhaps 
> that's called more often than just during "cabal sdist".

I skimmed through the sources of Cabal and cabal-install and couldn't
find any hint for that.

> Your patch would indeed also achieve the two most important goals
> of my patch. But I think I'd still rather be rid of Setup.hs 
> completely than to keep --exact-version. Still, we could revisit
> that if and when we are able to remove the manpage generation.

Note that with the removal of the sdist hooks and the endianness stuff,
our custom Setup has become a lot simpler.

BTW, I see now that cabal sdist is used when we make a release to create
the hackage upload. I think this is okay, as we don't want to upload
intermediate versions, only cleanly tagged released ones.
Attachments
msg21741 (view) Author: ganesh Date: 2020-01-27.06:57:25
On 26/01/2020 22:14, Ben Franksen wrote:

>> Your patch would indeed also achieve the two most important goals
>> of my patch. But I think I'd still rather be rid of Setup.hs 
>> completely than to keep --exact-version. Still, we could revisit
>> that if and when we are able to remove the manpage generation.
> 
> Note that with the removal of the sdist hooks and the endianness stuff,
> our custom Setup has become a lot simpler.

Any custom Setup.hs makes building a bit more complicated as
dependencies on Cabal-the-library have to be resolved, and I've
certainly had bad experiences with it.

> BTW, I see now that cabal sdist is used when we make a release to create
> the hackage upload. I think this is okay, as we don't want to upload
> intermediate versions, only cleanly tagged released ones.

Right, I think the primary use of --exact-version is for development
builds. Though it does also capture the exact versions of underlying
libraries. Personally I don't think I've ever actually made use of the
information.

Anyway, let's go with your patch and I can always re-advocate for
complete removal if and when there is a solution to the manpage problem.
History
Date User Action Args
2020-01-25 22:57:43ganeshcreate
2020-01-26 07:58:54ganeshsetstatus: needs-screening -> in-discussion
messages: + msg21723
2020-01-26 19:00:48bfsetfiles: + pEpkey.asc
messages: + msg21732
2020-01-26 19:49:12bfsetfiles: + patch-preview.txt, remove-sdist-and-postconf-hooks-from-setup_hs.dpatch, unnamed
messages: + msg21735
2020-01-26 19:55:03bfsetfiles: + pEpkey.asc
messages: + msg21737
2020-01-26 20:04:00ganeshsetmessages: + msg21738
2020-01-26 21:10:17bfsetfiles: + patch-preview.txt, remove-sdist-and-postconf-hooks-from-setup_hs.dpatch, unnamed
messages: + msg21739
2020-01-26 22:14:56bfsetfiles: + pEpkey.asc
messages: + msg21740
2020-01-27 06:57:26ganeshsetmessages: + msg21741