Jira (PUP-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-23 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Andy Parker




Flagged:

 Impediment












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-20 Thread Eric Thompson (JIRA)
Title: Message Title










 

 Eric Thompson assigned an issue to Eric Thompson


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Eric Thompson




Assignee:

 EricThompson












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-20 Thread Eric Thompson (JIRA)
Title: Message Title










 

 Eric Thompson updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Eric Thompson




QA Contact:

 KurtWall EricThompson




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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-17 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










merged to stable at d1a7fbe












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-16 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker assigned an issue to Andy Parker


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-16 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










Let's take another stab at this: PR 3210.
This one changes it so that :undef isn't used internally nearly as much anymore. Most of these places are only for the future parser, but a few affect the current system. In the cases that affect the current system, it is only removing some checking that is done to prevent bugs in the development process. However, those checks created a lot of difficulty in keeping nil and :undef straight. Removing those changes only broke a couple of very focused unit tests (that the validation was performed), and allowed using nil in a lot more places.
This fixes both the valuing being reported as Runtime[ruby, Symbol] and allows undef as a value for an Optional type.












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 

 

Jira (PUP-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-15 Thread Eric Thompson (JIRA)
Title: Message Title










 

 Eric Thompson commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










h. Andy Parker tested at stable SHA a806064 on fedora20:






[root@vd1g0n9m7rfyib2 ~]# cat test.pp




define hey(String $x) { notice $x }




hey{'heyer': x = undef }




[root@vd1g0n9m7rfyib2 ~]# puppet apply test.pp --parser future




Error: Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol] at /root/test.pp:2 on node vd1g0n9m7rfyib2.delivery.puppetlabs.net




Error: Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol] at /root/test.pp:2 on node vd1g0n9m7rfyib2.delivery.puppetlabs.net



















   

 Add Comment














 

Jira (PUP-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-15 Thread Steve Barlow (JIRA)
Title: Message Title










 

 Steve Barlow updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Steve Barlow




Sprint:

 Platform Server 2014-10- 15 29












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-15 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










Eric Thompson yes, that is the expected result, if you specify String then undef is not acceptable, you need to say Optional[String], Any, or some other type that accepts Undef.












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-15 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










Well, that result is only partially right. It works when marked Optional, but the undef type is being reported to the user as Runtime[ruby, Symbol], which isn't right.












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-14 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










I've filed PUP-3461 for the other validation problems that I found while working on this.












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-14 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










Merged into stable at 6cdd9f8












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Daniele Sluijters (JIRA)
Title: Message Title










 

 Daniele Sluijters commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










Looks like this is indeed the 'bug' I found in https://groups.google.com/forum/#!topic/puppet-dev/trHPTKXlFJ0












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Andy Parker




Sprint:

 Platform2014-10-15












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










This needs to be fixed up in 3.7.2 to make the future parser useful in a lot of cases.












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Andy Parker




Fix Version/s:

 PUP4.0.0




Fix Version/s:

 PUP3.7.2












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Andy Parker




Flagged:

 Impediment












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










It seems like this was broken during some cleanup for the work on 

PUP-2857
. It changed :undef from being treated as a PNilType to a PRuntimeType on the reasoning that :undef should no longer be used by the evaluator.
However, it appears that :undef is still used quite a lot. The Puppet::Parser::Resource code still depends on it. The undef _expression_ produces a AST literal with a value of :undef. There may be other places.
Oddly enough, there is a test that undef as the default value of an optional parameter in EPP, which was passing. I need to check if EPP (and therefore closures) are checking the types differently from resource parameters.












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)



   

Jira (PUP-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










On a quick check it appears that EPP and closures check the types by using infer_set on the given values and and then doing a callable? check. Internally callable? uses assignable? to check that the types are compatible. This is different from what a resource does. A resource checks that the value is an instance? of the declared type.
At one point I tried replacing the body of instance?(type, value) with assignable?(type, infer_set(value)) and discovered a number of test cases for instance? that failed. One case came down to assignable? not checking against Variants correctly. It did not consider assignable?(Integer, Variant[Integer[1, 1], Integer[2, 2]]).












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 



  

Jira (PUP-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










I've pushed up a branch with my changes so far. https://github.com/zaphod42/puppet/tree/issue/stable/pup-3201-undef-not-working












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-10-10 Thread Daniele Sluijters (JIRA)
Title: Message Title










 

 Daniele Sluijters commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










I applied https://github.com/zaphod42/puppet/commit/277f406293efa64ecb56196d7db127e830d55181 locally to my machine and now my validators pass:






class test (




  Struct[{policy  = Optional[Enum[changed, always, daily, weekly]],




timeout = Optional[Integer],




retries  = Optional[Integer],}] $update = {},




) { }









class { 'test':




  update = { 'policy' = 'changed', 'timeout' = undef },




}













  

Jira (PUP-3201) Validation thinks that an Undef instance is of type Runtime

2014-09-18 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Andy Parker




Story Points:

 2












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-09-12 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Andy Parker




Fix Version/s:

 4.0.0












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-09-12 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Andy Parker




Affects Version/s:

 future












   

 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-09-12 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: Validation thinks that an Undef instance is of type Runtime 










probably an :undef that shines through...












   

 Add Comment

























 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 







 Create a define like this:  {noformat}  define hey(String $x) { notice $x }  {noformat}  Call it like this:  {noformat}  hey{'heyer': x = undef }  {noformat}  Get the somewhat unexpected error:  {noformat}  Expected parameter 'x' of 'Hey[heyer]' to have type String, got Runtime[ruby, Symbol]  {noformat}  















 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-3201) Validation thinks that an Undef instance is of type Runtime

2014-09-09 Thread Thomas Hallgren (JIRA)
Title: Message Title










 

 Thomas Hallgren created an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Issue Type:

  Bug




Affects Versions:


 3.7.0, future




Assignee:

 Andy Parker




Components:


 DSL




Created:


 08/Sep/14 11:01 PM




Priority:

  Normal




Reporter:

 Thomas Hallgren










This is probably a minor but I'm reporting it anyway since it might be a symptom of a more serious problem.
I used the following _expression_ to test what happens when a parameter is declared as having type Undef:


define hey(Undef $x) { notice $x }



When called like this:


hey{'heyer': x = 'hello' }



it prints out the correct error message informing me that it expects 'x' to have type Undef. So far so good. But when I call it like this:



Jira (PUP-3201) Validation thinks that an Undef instance is of type Runtime

2014-09-09 Thread Thomas Hallgren (JIRA)
Title: Message Title










 

 Thomas Hallgren updated an issue


















 Puppet /  PUP-3201



  Validation thinks that an Undef instance is of type Runtime 










Change By:

 Thomas Hallgren









 Thisisprobably Create a minorbutI'mreportingitanywaysinceitmightbeasymptomofamoreseriousproblem.Iusedthefollowing_expression_totestwhathappenswhenaparameterisdeclaredashavingtypeUndef definelikethis :{noformat}definehey( Undef String $x){notice$x}{noformat} Whencalledlikethis:{noformat}hey{'heyer':x='hello'}{noformat} Call it printsoutthecorrecterrormessageinformingmethatitexpects'x'tohavetypeUndef.Sofarsogood.ButwhenIcallit likethis:{noformat}hey{'heyer':x=undef}{noformat} theninsteadofbeingsilent,Iget Get thesomewhatunexpectederror:{noformat}Expectedparameter'x'of'Hey[heyer]'tohavetype Undef String ,gotRuntime[ruby,Symbol]{noformat}












   

 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.