Issue #4638 has been updated by Jesse Wolfe. Status changed from Ready for Testing to Available In Testing Branch Assignee changed from Paul Berry to Jesse Wolfe Branch changed from http://github.com/stereotype441/puppet/tree/ticket/next/4638 to http://github.com/reductivelabs/puppet/tree/next
available in `next` as `6860594c4d95855d5106fbf664a473e1ac4d3935` ---------------------------------------- Bug #4638: Confusion between arrays and scalars in grammar http://projects.puppetlabs.com/issues/4638 Author: Paul Berry Status: Available In Testing Branch Priority: Normal Assignee: Jesse Wolfe Category: parser Target version: Statler Affected version: Keywords: Branch: http://github.com/reductivelabs/puppet/tree/next In the grammar, when a construct can contain a variable number of objects, we generally represent it as an ASTArray when it contains more than one object (or zero objects) and a scalar object when it contains exactly one object. This saves a trivial amount of memory at the expense of complicating the code, because it forces all uses of these plural constructs to check whether they are accessing an array or a scalar, and alter their behavior accordingly. In addition to complicating the code, it causes the parser to behave incorrectly in situations where an array contains other arrays, because while parsing an array the parser can't reliably distinguish between an array nested inside another array and an array that hasn't been completely parsed yet. As a result, [[[a, b], c], d] produces an identical parse result to [a, b, c, d]. Fortunately, this inconsistency has not been a problem so far because there aren't any providers for which nested arrays are a useful construct. But it would be nice to fix the parser before such a situation arises. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
