[augeas-devel] [Augeas] #118: lens deletes comments

Augeas trac at fedorahosted.org
Tue Apr 20 23:28:10 UTC 2010


#118: lens deletes comments
----------------------+-----------------------------------------------------
  Reporter:  fdrabek  |       Owner:  lutter
      Type:  defect   |      Status:  closed
  Priority:  major    |   Milestone:  next  
 Component:  Augeas   |     Version:  0.7.0 
Resolution:  invalid  |    Keywords:        
----------------------+-----------------------------------------------------
Changes (by lutter):

  * status:  assigned => closed
  * resolution:  => invalid

Comment:

 This is caused by how you defined the lens 'lns'. You have on line 54

 {{{
   let rec lns = ((directive | comment)* | (sections lns))*
 }}}

 If you change that to

 {{{
   let rec lns = (directive | comment | sections lns)*
 }}}

 everything works as expected.

 The original version of the lens does not pass the typechecker, which is
 one of the reasons why you see the strange behavior.

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/118#comment:3>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list