Jira (PUP-2017) TupleType applies size constraint to last element only

2014-03-24 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: TupleType applies size constraint to last element only 










For functional review, just run the examples above with a notice to see that they print true. Prior to this fix, only the first example would print true.












   

 Add Comment

























 Puppet /  PUP-2017



  TupleType applies size constraint to last element only 







 The TupleType allows a size constraint to be made. This was implemented as constraining the last type in the tuple (with the idea that this would be the most common use-case). In practice however, it is far more valuable to let the size constraint apply to the given types as this gives the opportunity to make types in the tuple optional (i.e. not present ...















 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 

Jira (PUP-2017) TupleType applies size constraint to last element only

2014-03-24 Thread Kylo Ginsberg (JIRA)
Title: Message Title










 

 Kylo Ginsberg assigned an issue to Kylo Ginsberg


















 Puppet /  PUP-2017



  TupleType applies size constraint to last element only 










Change By:

 Kylo Ginsberg




Assignee:

 KyloGinsberg












   

 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-2017) TupleType applies size constraint to last element only

2014-03-21 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg created an issue


















 Puppet /  PUP-2017



  TupleType applies size constraint to last element only 










Issue Type:

  Bug




Assignee:

 Andy Parker




Components:


 DSL




Created:


 21/Mar/14 7:37 AM




Fix Versions:


 3.5.0




Priority:

  Normal




Reporter:

 Henrik Lindberg










The TupleType allows a size constraint to be made. This was implemented as constraining the last type in the tuple (with the idea that this would be the most common use-case). In practice however, it is far more valuable to let the size constraint apply to the given types as this gives the opportunity to make types in the tuple optional (i.e. not present as opposed to being undef).
Proposed change will make these three matches true:



$t = Tuple[Integer, Integer, String, 1,3]
[1, 2, hello]  =~ $t
[1, 2]   =~ $t
[1]   =~ $t



This is currently not possible to express since the size only applies to the last entry (the String in the example above).
This is important to get into 3.5.0 since it changes the semantics of the Tuple type.


 

Jira (PUP-2017) TupleType applies size constraint to last element only

2014-03-21 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg assigned an issue to Henrik Lindberg


















 Puppet /  PUP-2017



  TupleType applies size constraint to last element only 










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-2017) TupleType applies size constraint to last element only

2014-03-21 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg updated an issue


















 Puppet /  PUP-2017



  TupleType applies size constraint to last element only 










Change By:

 Henrik Lindberg









 TheTupleTypeallowsasizeconstrainttobemade.Thiswasimplementedasconstrainingthelasttypeinthetuple(withtheideathatthiswouldbethemostcommonuse-case).Inpracticehowever,itisfarmorevaluabletoletthesizeconstraintapplytothegiventypesasthisgivestheopportunitytomaketypesinthetupleoptional(i.e.notpresentasopposedtobeingundef).Proposedchangewillmakethesethreematchestrue:  {code}$t=Tuple[Integer,Integer,String,1,3][1,2,hello]=~$t[1,2]=~$t[1]=~$t{code}Thisiscurrentlynotpossibletoexpresssincethesizeonlyappliestothelastentry(theStringintheexampleabove).Thisisimportanttogetinto3.5.0sinceitchangesthesemanticsoftheTupletype.












   

 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-2017) TupleType applies size constraint to last element only

2014-03-21 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg updated an issue


















 Puppet /  PUP-2017



  TupleType applies size constraint to last element only 










Change By:

 Henrik Lindberg




Sprint:

 Week2014-3-19to2014-3-26












   

 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-2017) TupleType applies size constraint to last element only

2014-03-21 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-2017



  TupleType applies size constraint to last element only 










Change By:

 Andy Parker




Affects Version/s:

 3.5.0RC












   

 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.