On May 12, 2010, at 4:47 PM, Markus Roberts wrote:


Are we missing :OUT_EDGE_SUB intentionally (in which case you should change your example) or by oversight?
Those two points are related - I just reused the edge type.

So you declare an OUT_EDGE_SUB token but then use LESSEQUAL? So why didn't you do the same with FARROW? And how does that work? Or am I just being dense here?

No, I think you caught an actual bug.

I had already switched to '~' for my last patch, and actually added tests for each of the lexer tokens.

+1 in general though.
Heh, I've got another version in the works (prototyped but not fleshed out).

I did a 10 second investigation at some point and concluded that adding collections to this would be too complicated, but I just did an 11 second investigation (yep, really putting the effort out) and found it was nearly trivial: Plain code is going to see about 10 new lines.

I'll be pushing that once I've actually written in out, but the following creates a bunch of edges, like you'd want:

class foo {
    notify { b: loglevel => warning }
    notify { a: loglevel => warning }
    notify { c: loglevel => warning }
    notify { d: loglevel => warning }
}

class bar {
    notify { 1: loglevel => notice }
    notify { 2: loglevel => notice }
    notify { 3: loglevel => notice }
    notify { 4: loglevel => notice }
}

include foo, bar

Notify <| loglevel == notice |> ~> Notify <| loglevel == warning |>

Of course, this example isn't useful in real life, but if you replace the 'loglevel warning' things with packages, and the 'loglevel notice' things with yumrepo instances:

Yumrepo <| |> -> Package <| provider => yum |>

Then it starts to get a bit more useful. :)

So how far are we from this being a direct competitor with run stages?

Not very.

This works fantastically for cases where you know the things that should go first, but it works like crap when you want things like "this should come before everything else, really", such as dns resolution setup.

That is, if you have real boot and teardown phase, then this still won't work for you.

I think they'll end up being compatible in a few ways, and overlapping in others, but they're independent and reasonable enough ideas that I'm comfortable having both at the same time.

--
A nation is a society united by delusions about its ancestry and by
common hatred of its neighbors. -- William Ralph Inge
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" 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-dev?hl=en.

Reply via email to