cloudsmith/geppetto — Issue #216: Interpolated variables with hyphen '-' different in 2.7
Author: hlindberg
Created: 2011-10-24 08:21:34+00:00
State: open
Labels: enhancement

In 2.7 (2.7.5?) the interpolation logic has been rewritten, and the new logic correctly recognizes all valid variable name characters. This has a surprising effect when migrating logic from 2.6 where interpolation stopped parsing at a hyphen.

Thus, in 2.6, an expression like

"This is $var-x86."

is evaluated as:

"This is ${var}-x86."

and in 2.7 as:

"This is ${var-x86}."

Geppetto should be able to help with the transition.

Uncertain about how this is best done. Those targeting 2.7 may want to benefit from hyphens being included and not appreciate being warned. If warning instead are shown when targeting 2.6 (i.e. "-x86 not interpolated" warning), those that transition logic to 2.7 will only see this in 2.6 mode!

Seems best to offer this as a user controllable preference, and where the default for 2.6 is warning for part after "-" and for 2.7 and later the default is ignore.