[darcs-devel] [patch1179] Darcs.Repository.Flags: added Eq instanc... (and 4 more)

Ganesh Sittampalam bugs at darcs.net
Tue Nov 4 22:48:56 UTC 2014


Ganesh Sittampalam <ganesh at earth.li> added the comment:

I've rebased Ben's patches against HEAD. I merged into one to make
the rebasing easier and also because it seemed a bit more logical that
way, otherwise there's an intermediate state where both old and new
systems have to compile.

It's nice that everything about an option lives in one place now,
and how to add a new option is somewhat clearer. The naming conventions
are also less confusing.

The negatives are that it's a bit more complicated than the old system
and the type signatures for the sets of options in each command are
pretty verbose. We could just leave them out but I don't know how to
disable to compiler warning just for those functions.

The patch also breaks the 'convert.sh' test. I think it's because
~/.darcs/defaults is overriding command-line options now. Ben's
original patches also have that problem but it didn't show up at
the time because the convert.sh test wasn't running.

I'm going to push this to screened and reviewed now and will fix
the convert.sh test in the next few days.

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

Tue Nov  4 22:37:57 GMT 2014  Ben Franksen <benjamin.franksen at helmholtz-berlin.de>
  * integrate new options subsystem
  
  The conversion is complete in the sense that the old Darcs.UI.Arguments is
  now obsolete and can be removed. Command options are specified using the new
  "typed" DarcsOption type from Darcs.UI.Options. All available tests succeed.
  
  However, it is incomplete in the sense that there are still many places
  where the list of DarcsFlag is scanned or manipulated directly. Removing
  these direct accesses will be an on-going effort; when it is complete we can
  replace [DarcsFlag] with an abstract data type.
  
  This patch contains an almost complete re-implementation of
  Darcs.UI.ArgumentDefaults under the new name Darcs.UI.Defaults. This adds a
  new dependency on regex-applicative, see the comments in the code.
  
  I have also made the tentative change of using a command specific
  configuration record for two of the commands, namely "record" and "amend".
  It remains to be seen whether this is the right approach and the other
  commands should follow it.
  
  Rebased by Ganesh Sittampalam <ganesh at earth.li> to integrate with the latest
  darcs code. Originally in two patches that first introduced and then
  switched to the new code; I merged them into one to make the rebasing easier.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1179>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 573122 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20141104/10d831dd/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: integrate-new-options-subsystem.dpatch
Type: application/x-darcs-patch
Size: 605865 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20141104/10d831dd/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20141104/10d831dd/attachment-0001.obj>


More information about the darcs-devel mailing list