Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Kurt Wall updated an issue Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Kurt Wall QA Status: Reviewed Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg commented on an issue Re: Move iterative functions to 4x function API The reason 0.7.0 causes problem was due to a bug in the logic that defines an optional or required lambda for a functions in the Functions API. It reused the same all callables object for all dispatchers. This is a no-no since that object ends up being contained in another type. A modeled object (types are all modeled) can only be contained by one container at a time, and an assignment to another container MOVES the object. The result was that the signature for Hash ended up getting its callable block moved from its signature type to however needed an all callables next. This did not happen when using RGen prior to 0.7.0 because of a bug in RGen that did not always move object that were moved between containers. Now, with the fixed bug, we were bitten by a bug in Puppet. So... good to catch this! (Fix coming). Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Charlie Sharpsteen commented on an issue Re: Move iterative functions to 4x function API Validated that all functions fail appropriately under current parser when called as standard functions: # for func in 'each' 'map' 'reduce' 'slice' 'with';do puppet apply -e \$x = $func('foo', 'bar');done Error: each() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: each() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: map() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: map() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: reduce() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: reduce() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: slice() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: slice() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: with() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: with() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan # for func in 'filter' 'match';do puppet apply -e $func('foo', 'bar');done Error: filter() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: filter() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: match() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Error: match() is only available when parser/evaluator future is in effect at line 1 on node wordpress-demo.puppetdebug.vlan Add Comment
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Charlie Sharpsteen commented on an issue Re: Move iterative functions to 4x function API I tested the new function implementations against the examples in their docstrings. The implementations of map, slice and with appear to be working as documented. each, filter, map and reduce are showing some differences in behavior. Comparisons were made between commit 0fa8d9e, which represents the code before PR-2765 was merged and commit 8d56057 which represents the code after PR-2765 was merged. All behaviors noticed at commit 8d56057 have been re-produced using the current HEAD as of this writing: bf5ad07. I think the issues I've noticed can be summarized as: Iteration blocks for Hashes now yield |numeric index, tuple| instead of |key, value|. The memo argument to reduce is no longer optional. The parser has processing a Hash iteration that follows an Array iteration. Gory details follow. Each Tested the following examples: [1,2,3].each |$val| { notice $val } [5,6,7].each |$index, $val| { notice ($index,$val) } {a=1, b=2, c=3}.each |$val| { notice $val } {a=1, b=2, c=3}.each |$key, $val| { notice ($key,$val) } Integer[ 10, 20 ].each |$index, $value| { notice ($index,$value) } hello.each |$char| { notice $char } 3.each |$number| { notice $number } Everything checked out, except the examples that operate on hashes. For the |$key, $val| case: # each-hash-key-val.pp {a=1, b=2, c=3}.each |$key, $val| { notice ($key,$val) } The results are: # Before PR-2765 puppet apply --parser=future each-hash-key-val.pp Notice: (a,1) Notice: (b,2) Notice: (c,3) # After PR-2765, numeric indicies are used and value is an array. puppet apply --parser=future each-hash-key-val.pp Notice: (0,[a, 1]) Notice: (1,[b, 2]) Notice: (2,[c, 3]) Also, when iterating over hashes, there appears to be a parser error. For example iterating over two successive arrays works: [1,2,3].each |$item| { notice $item } hello.each |$item| {
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Charlie Sharpsteen updated an issue Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Charlie Sharpsteen Assignee: CharlieSharpsteen HenrikLindberg Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg commented on an issue Re: Move iterative functions to 4x function API I cannot reproduce the problems except the one that the parser interprets as a resource _expression_: [1,2,3].each |$item| { notice $item } {a=1, b=2, c=3}.each |$item| { notice $item } where {{[1,2,3].each |$item| { notice $item }}} plays the same role as if file had been used, and the parser is right, the _expression_ is not valid as a reference to a resource, and the resource body does not have a title. This is one of the rare cases where a ';' has to be used to separate the expressions. i.e. you have to use this: [1,2,3].each |$item| { notice $item } ; {a=1, b=2, c=3} .each |$item| { notice $item } Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API).
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Charlie Sharpsteen assigned an issue to Charlie Sharpsteen Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Charlie Sharpsteen Assignee: CharlieSharpsteen Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Kylo Ginsberg updated an issue Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Kylo Ginsberg Sprint: Week2014-6-11to2014-6-18 ,Week2014-6-18to2014-6-25 Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg commented on an issue Re: Move iterative functions to 4x function API For functional review: Calling iterative functions (each, filter, reduce, slice, map) using --parser current should now result in function not found (it used to complain about not being given a block). When using --parser future it should continue to work as before A simple smoke test: [1,2,3].each |$x| { notice $x } Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg commented on an issue Re: Move iterative functions to 4x function API Doc-stubs added (for all 4x functions). Comments from merge review fixed. Also removed special handling of the iterative functions since the new API does not transform arguments (the 3x_runtime had special check for the iterative functions - that is now removed). Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Andy Parker assigned an issue to Andy Parker Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Andy Parker Assignee: AndyParker Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Andy Parker commented on an issue Re: Move iterative functions to 4x function API Merged into master in cc13e1. Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Andy Parker assigned an issue to Andy Parker Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Andy Parker Assignee: AndyParker Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Andy Parker updated an issue Puppet / PUP-2755 Move iterative functions to 4x function API Justin Holguin, I think this change has a pretty significant documentation implication. The new function API doesn't tie into the existing puppet doc functionality and so the iterative functions will disappear from the reference docs. That isn't a desirable outcome and so I think we should come up with something to handle this. Change By: Andy Parker Component/s: DOCS Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg commented on an issue Re: Move iterative functions to 4x function API Ironically, we wanted to keep them out of the reference documentation for 3x (since they are experimental), but never got around to doing so... For 4x they should naturally be included. Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Andy Parker commented on an issue Re: Move iterative functions to 4x function API As an interim solution we'll just put some stub functions in place under the old API so that we still get the documentation. The new functions will take precedence and so shouldn't affect the running of manifests, but will allow the functions to show up in documentation. Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Andy Parker assigned an issue to Henrik Lindberg Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Andy Parker Assignee: AndyParker HenrikLindberg Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg commented on an issue Re: Move iterative functions to 4x function API We decided to make an interims solution where the 4x functions gets a corresponding function stub as a 3x function that contains only documentation and that raises an error if called (they are not reachable when --parser future --evaluator future) is in effect. Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg commented on an issue Re: Move iterative functions to 4x function API Another thing that this move changes is that it is no longer possible to use the --evaluator current and call these functions as the new functions are then not available. If we want that to continue working and still move these functions we have more work to do - alternatively remove the ability to use the --evaluator current option (as I doubt some of the other work on lambdas will work with typed parameters, etc.) Add Comment Puppet / PUP-2755 Move iterative functions to 4x function API The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg assigned an issue to Henrik Lindberg Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Henrik Lindberg Assignee: AndyParker HenrikLindberg Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-2755 Move iterative functions to 4x function API Change By: Henrik Lindberg Sprint: Week2014-6-11to2014-6-18 Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-2755) Move iterative functions to 4x function API
Title: Message Title Henrik Lindberg created an issue Puppet / PUP-2755 Move iterative functions to 4x function API Issue Type: Improvement Assignee: Andy Parker Components: DSL Created: 11/Jun/14 9:21 AM Fix Versions: 3.7.0 Priority: Normal Reporter: Henrik Lindberg The iterative functions (each, map, filter, reduce, slice) should be moved to the 4x function API. (Currently there is a cheat implemented in the evaluator when these are called to avoid having the arguments transformed to the 3x function API). Add Comment