Issue #16213 has been updated by Daniel Pittman.

eric sorenson wrote:
> What I'd really like to do is make them work correctly. Seems trivial, turns 
> out to be somewhat tough, but we need to slice through the fog and fix it. 
> Tracking in #5268.

It makes the grammar hugely ambiguous, which is awful.  We shouldn't do that, 
especially because our documentation has said (forever) that they are not 
supported.
----------------------------------------
Bug #16213: Dashes in class names are illegal.  So the compiler should complain 
about them!
https://projects.puppetlabs.com/issues/16213#change-75197

Author: Dustin Mitchell
Status: Duplicate
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


    class abc-def($var) {
        notice("$abc-def::var")
    }

    class {
        abc-def: var => 'hi';
    }

does what a naive user might expect up through 2.7.14 (Scope(Class[Abc-def]): 
hi).  After that, it does what a more experienced user might expect 
(Scope(Class[Abc-def]): -def::var).  Adding braces:

    class abc-def($var) {
        notice("$abc-def::var")
    }

    class {
        abc-def: var => 'hi';
    }

still does what a naive user expects on 2.7.14, but gives an error on 2.7.16 
and higher.

However, in all of those versions, that class name itself is illegal - 
http://docs.puppetlabs.com/learning/modules1.html#an-aside-names-namespaces-and-scope

Classes with dashes in them should be disallowed by the parser.  At least in 
3.0.x.  And they should trigger a warning in 2.7.x since (a) they don't really 
work and (b) they'll be disallowed in 3.0.x.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to