HomePhorge

(#10146) `-` in variable names should be deprecated!
5ee25589224cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#10146) - in variable names should be deprecated!

In commit b26699a2 I fixed an accidentally introduced change to the lexer,
allowing - to be part of a variable name. That had lasted for a while and
was surprisingly popular. It was also hugely ambiguous around - as minus,
and led to all sorts of failures - unexpected interpolations to nothing -
because of that.

A much better strategy would have been to deprecate the feature, issue proper
warnings, and include an option to allow users to toggle the behaviour.

Initially defaulting that to "permit", and eventually toggling over to "deny",
would have made the whole experience much smoother - even if this was totally
documented as not working, and was a clear bug that it changed.

So, thanks to prompting from Benjamin Irizarry, we do just that: introduce the
configuration option, default it to "deny" to match current behaviour, but
allow users the choice to change this back.

Please be aware that allowing variables with - might break all sorts of
things around, for example, Forge modules though. Most people write code to
the documented standard, and their code might well totally fail to work with
this changed away from the default!

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
Andrew Parker <andy@puppetlabs.com>Committed on Oct 30 2012, 12:01 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUd019047c826d: Merge pull request #833 from domcleal/tickets/2.7.x/14822-feature-runtime
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU5ee25589224c: (#10146) `-` in variable names should be deprecated! (authored by Daniel Pittman <daniel@puppetlabs.com>).Oct 30 2012, 12:01 AM