As a bit of a followup to this discussion I've created this pull request: https://github.com/puppetlabs/facter/pull/777
When fixing support for structured facts I noticed that the current data type bugginess in facter makes it almost unusable with PuppetDB 2.2. As you can't use the < or > operators on strings anymore. IMO this is more of a bug fix even though it somewhat changes the API for Puppet manifests. On 30 August 2014 14:59, Daniele Sluijters <daniele.sluijt...@gmail.com> wrote: > Lets take is_virtual as an example. That fact, and all the boolean facts, > have been strings since the dawn of time. During the first days of creation > people wrote manifests that went if $is_virtual == 'false' {}. > > By now, most if not all, DSL consumers are aware of the 'correct' way to > do this, str2bool($::is_virtual). As long as str2bool() with a bool returns > that bool I see no issue with changing all the boolean facts to be actual > booleans, even in a .Z release. If you're still comparing it as a string, > too bad, we've had a better way for over 2 years now. > > What I mean is, I think there's a lot of facts we can type without > breaking anything. More and more manifests validate their input using the > validate_* and is_* functions in stdlib and leverage the set of > 'conversion' functions we have in stdlib to transform input to their actual > type. > > I also think a lot of active module writers are well aware of the changes > coming to Facter and Puppet and we shouldn't be too afraid to use that to > our advantage. As long as it's clearly announced, early so people can > roll a release with fixes in time for a Facter release, I doubt there's a > need for strict semver adherence. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/4cf8a0ff-5fed-4209-b843-e3c34c97d7a7%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-dev/4cf8a0ff-5fed-4209-b843-e3c34c97d7a7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Erik Dalén -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAAAzDLfPB8W9ZzPXher8OET1REw9RqtyXXhao4PWVwv1OmiGDA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.