Thank you for your time to analyze my patches
I'm starting to develop in Haskell and those patches are just tries to
dive into a real application
The problem of issue 1721 is :
Several users have asked me "why did it stop at two out of three? Did
something go wrong?" This is a source of worry and confusion for new
users. Either Darcs should ensure the last message (100% done) is
printed, or it should clear progress output when the operation is
finished.
My aim was to verify what could be wrong in the progress report.
_src/Darcs/Patch/Progress.hs_
To be consistent with other part of the code I have add {-# NOINLINE ...
#-} for all functions with unsafePerformIO
_src/Darcs/UI/Commands.hs_
cosmetic: display message after the action is done (not before).
modifications for toobig must be removed. The original code take into
account a lazy evaluation, mine is eagger.
_src/Darcs/Util/Progress.hs_
The main part is to use modifyIORef' (with quote) => strict version of
modifyIORef
Cosmetic: instead of a periodic display of progress, my aim was to
display progress after each action.
Cosmetic: I modify printProgress to display a different message for each
case.
To be consistent with other part of the code I have add {-# NOINLINE ...
#-} for all functions with unsafePerformIO
Add handleProgressNew after each action is done (suppression of periodic
testing).
As this was my first try to develop in Haskell, there could be mistakes.
best regards.
Alain91
Le 11/06/2015 18:58, Ben Franksen a écrit :
> Ben Franksen <benjamin.franksen@helmholtz-berlin.de> added the comment:
>
> I have been playing with this patch. The only difference I noted is that
> progress reporting when I do e.g. darcs get http:/darcs.net is more
> frequent than before.
>
> Unfortunately, for reasons mysterious to me, it breaks the zsh
> completion, even though the output of darcs --commands is the same when
> i pipe it into a file. Hmm.
>
> I'd also like to ask the author to explain what the patch does and in
> which way it improves upon the existing progress handling.
>
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/patch1335>
> __________________________________
Attachments
|