----- Original Message -----
> From: "jcbollinger" <john.bollin...@stjude.org>
> To: "puppet-users" <puppet-users@googlegroups.com>
> Sent: Tuesday, 20 September, 2016 15:37:21
> Subject: Re: [Puppet Users] Re: notify resource different between 3 and 4?

> On Monday, September 19, 2016 at 10:03:14 AM UTC-5, R.I. Pienaar wrote:
>>
>>
>>
>> On 19 Sep 2016, at 15:31, jcbollinger <john.bo...@stjude.org <javascript:>>
>> wrote:
>> I see a difference between 3.8 and 4.6 with respect to the result of
>> interpolating an array into a string.  In Puppet 3 (and earlier) you get a
>> concatenation of the stringifications of all the elements, whereas in
>> Puppet 4, you get a more formatted representation.  I would have expected
>> such a change to be applied during a major version update -- so between 3.x
>> and 4.0 -- but a quick browse of the release notes does not appear to
>> mention it.
>>
>> This is not a puppet behaviour change. Newer Ruby does nicer looking to_s
>> on arrays that's why
>>
>>
> 
> I'm prepared to believe that there's no Puppet code change, which would
> explain why it's not documented in any release notes, but there's certainly
> an observable behavior difference between the two example runs.  If that is
> not to be accounted a Puppet behavior change then I suppose it must also be
> observable with (only) Puppet 3.8 running on different Ruby versions.
> That's a nice gotcha if you happen to rely on interpolating arrays (not
> that I would recommend doing so in any case).

yeah, and so you would I think, certainly recall people on IRC running into 
that.

> 
> On the other hand, I observe that the current (4.6) Puppet docs document
> the array interpolation format
> <https://docs.puppet.com/puppet/4.6/reference/lang_data_string.html#conversion-of-interpolated-values>,
> independent of underlying Ruby.  That may now be a distinction without much
> practical difference, but it's the right thing to do: details of the
> infrastructure -- and especially changes to them -- ought not to leak out
> into Puppet's user-facing behavior.  This sort of thing will become more
> important as Puppet continues its movement away from Ruby as the main
> implementation language.

yup, this becomes a specified and supported way to do this and you can probably
expect these to be properly treated in future.

There is additionally massive amount of string formatting stuff now in the 
language
https://github.com/puppetlabs/puppet-specifications/blob/master/language/types_values_variables.md

Though their usability leaves a lot to be desired, I suppose they are meant to 
be
used as plumbing for higher order solutions like wrapper functions or something,
I can't imagine anyone using them as is.


> In any case, inasmuch as the OP was asking about behavioral differences, it
> is highly relevant that the one observable difference of any significance
> arises not because of a difference in the version of Puppet, but because of
> a difference in the version of the Ruby underneath.

Yeah, expect less of that as work moves toward C based compilers etc, this
will make pinning every thing down to specified behaviour, good times.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1120926933.445844.1474379654522.JavaMail.zimbra%40devco.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to