darcs

Patch 1804 make linear search report results like b... (and 1 more)

Title make linear search report results like b... (and 1 more)
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To
Milestone

Created on 2019-06-08.19:26:20 by ganesh, last changed 2019-07-11.08:17:07 by ganesh.

Files
File name Status Uploaded Type Edit Remove
make-linear-search-report-results-like-bisect.dpatch ganesh, 2019-06-08.19:26:20 application/x-darcs-patch
patch-preview.txt ganesh, 2019-06-08.19:26:20 text/x-darcs-patch
unnamed ganesh, 2019-06-08.19:26:20 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg20699 (view) Author: ganesh Date: 2019-06-08.19:26:20
a couple more minor refactorings of Darcs.UI.Commands.Test
2 patches for repository darcs-unstable@darcs.net:screened:

patch 850c80e9c61c93a2c54f454a676c6a570bd85d89
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Sat Jun  8 10:55:40 BST 2019
  * make linear search report results like bisect
  previously it would just print out "Success" and the most
  recently printed patch would be the one to blame

patch e77329d1a0643cc6324c8719da69f056120e9f9b
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Sat Jun  8 11:10:47 BST 2019
  * refactor trackLinear to break out the recursive case
Attachments
msg20727 (view) Author: bfrk Date: 2019-06-11.20:25:51
I like it. Could you be bothered, while you're at it, to add a few 
tests for 'darcs test' to tests/test.sh?
msg20728 (view) Author: bfrk Date: 2019-06-11.20:34:33
The reason I am asking is that I almost never use the test command 
because I find it difficult to set up the test script correctly. I 
like how you implemented the changes but am not sure how to test that 
it actually does what it says.
msg20779 (view) Author: ganesh Date: 2019-06-14.10:14:52
There are existing tests for the trackdown functionality
in trackdown-bisect.sh, issue538.sh. Are those helpful or
would you like something more?

Apart from the tests which tend to be a bit awkward because of the
need to be a standalone script, perhaps what we need are
better docs?
msg20787 (view) Author: bfrk Date: 2019-06-14.11:50:23
> There are existing tests for the trackdown functionality
> in trackdown-bisect.sh, issue538.sh. Are those helpful or
> would you like something more?

Thanks for the pointer, I was grepping for 'darcs test' and didn't find
anything... So this is covered, good.

> Apart from the tests which tend to be a bit awkward because of the
> need to be a standalone script, perhaps what we need are
> better docs?

Partly. I think perhaps the docs could be a bit more clear about the
mechanics of the test procedure: which directory are they run in, etc.

The need to provide a stand-alone script (and specify the full path)
tends to make the whole process more heavy-weight than necessary IMO. I
think it is quite often the case that we have a one line shell command
for testing and it would be nice if we could pass that directly to
'darcs test'.

As I said I have not used 'darcs test' very often, yet. I mostly tried
it a few times on Darcs itself and one thing that stands out here are
the very long initial compile times. If you have made a mistake in the
test script, it will become apparent only after the initial build and
then you have to do it all over again. I remember it took me a few
trials until the test script did what it was supposed to do and each
time I had to wait for a complete rebuild. That made me wish for an
option that allows me to start the trackdown process in a specific
directory with an already checked-out and pre-built repo/source tree.
msg20793 (view) Author: ganesh Date: 2019-06-14.12:22:49
I agree with the criticisms of setting up the test command. I
currently have this script which I obviously did not develop
in a single pass. (The exit 125 is useless unless you have my
'untestable' changes, but it doesn't hurt)

cabal new-build -j --enable-tests -f-optimize -f-curl -ftest || exit 125
dist-newstyle/build/x86_64-windows/ghc-`ghc --version | cut -f8 -d' '`/darcs-`grep "^version" darcs.cabal  | tr -
s ' ' | cut -d' ' -f 2`/build/darcs-test/darcs-test $*

Let me know if there's anything more you'd like as part of this
review.
msg20807 (view) Author: bfrk Date: 2019-06-14.18:27:23
> I agree with the criticisms of setting up the test command. I
> currently have this script which I obviously did not develop
> in a single pass. (The exit 125 is useless unless you have my
> 'untestable' changes, but it doesn't hurt)
> 
> cabal new-build -j --enable-tests -f-optimize -f-curl -ftest || exit 125
> dist-newstyle/build/x86_64-windows/ghc-`ghc --version | cut -f8 -d' '`/darcs-`grep "^version" darcs.cabal  | tr -
> s ' ' | cut -d' ' -f 2`/build/darcs-test/darcs-test $*

Hmm. Tricky indeed. Does it make sense to add that to the repo, perhaps
in the contrib folder? Maybe with a few comments and some of the values
factored into shell variables for easier adaption?

> Let me know if there's anything more you'd like as part of this
> review.

I am fine with what you gave me, thanks. Regard as accepted.
History
Date User Action Args
2019-06-08 19:26:20ganeshcreate
2019-06-08 19:34:50ganeshsetstatus: needs-screening -> needs-review
2019-06-11 20:25:51bfrksetstatus: needs-review -> review-in-progress
messages: + msg20727
2019-06-11 20:34:33bfrksetmessages: + msg20728
2019-06-14 10:14:53ganeshsetmessages: + msg20779
2019-06-14 11:50:23bfrksetmessages: + msg20787
2019-06-14 12:22:49ganeshsetmessages: + msg20793
2019-06-14 18:27:23bfrksetmessages: + msg20807
2019-06-14 22:51:09ganeshsetstatus: review-in-progress -> accepted-pending-tests
2019-07-11 08:17:07ganeshsetstatus: accepted-pending-tests -> accepted