[augeas-devel] [Augeas] #130: Put rountrip error with recursive lens

Augeas trac at fedorahosted.org
Fri Jul 23 20:04:34 UTC 2010


#130: Put rountrip error with recursive lens
-------------------------+--------------------------------------------------
  Reporter:  fgiraldeau  |       Owner:  lutter
      Type:  defect      |      Status:  closed
  Priority:  critical    |   Milestone:  next  
 Component:  Augeas      |     Version:  devel 
Resolution:  invalid     |    Keywords:        
-------------------------+--------------------------------------------------
Changes (by fgiraldeau):

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

Comment:

 This is not a bug. Since content_reg and text are nullable, there is an
 ambiguity that is not reported, because this typechecking on recursive
 lens is not done.

 The error can be reported by unfolding the lenses.
 {{{
 let content_reg1 = element_regular text
 let rec content_reg2 = element_regular (content_reg1|text)
 }}}

 Then, the error pops out:
 {{{
 Syntax error in lens definition
 ../lenses/tests/test_xml_put.aug:11.0-.58:Failed to compile content_reg2
 ../lenses/tests/test_xml_put.aug:11.39-.57:exception: overlapping lenses
 in union.get
     Example matched by both: ''
     First lens: ../lenses/tests/test_xml_put.aug:8.8-.74:
     Second lens: ../lenses/tests/test_xml_put.aug:4.11-.32:
 }}}

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




More information about the augeas-devel mailing list