On Apr 18, 2010, at 4:44 PM, Nigel Kersten wrote:

On Sun, Apr 18, 2010 at 11:40 AM, Luke Kanies <[email protected]> wrote:
Hi all,

So, I'm trying to fix the infamous "functions in environments" problem (#1175), and we've got all of the infrastructure in place to fix it except one piece: We currently have no way to associate a loaded file with a given
environment.

That is, if you say 'load("foo")', and a function is found, we need some way
to know which environment the function was found in.

In investigating this, I found that the current autoloading doesn't actually
support environments other than the default.  My first thought was to
support an 'environment' option to the main loading commands, but as I considered this I wondered whether it might make more sense to refactor
autoloading, given how much other rubyists seem to hate it.

I don't have a specific idea of how I'd refactor it, mostly because I don't really know the root of why rubyists hate it so much, other than that it's
different.

Which bit do they hate?

I think they hate that it exists and how it works. :/ Maybe Bruce or Rein could speak up for the "typical rubyist" bloc. :)

I take it you mean "the current autoloading (of functions and plugins)" ?

I more mean how it's implemented, and maybe to some extent just the fact that it exists.

I know Bruce and Rein keep pushing for statically loading everything, rather than loading by path or on demand, but that's not really realistic in our situation for a lot of things, because there's no static list.

Barring any comments, I'll just update the interface methods to support
specifying an environment.

Any comments from the opinionated?

This may not be related... but will this have any effect upon either:

* allowing clients to specify multiple environments
* being able to append to the existing modulepath via a function in a manifest.

(I have a whole bunch of things turning around inside my head around
this area at the moment I was hoping to get a post out about this
week)

Completely unrelated, sorry. :)

--
A computer lets you make more mistakes faster than any invention in
human history--with the possible exceptions of handguns and tequila.
    -- Mitch Ratcliffe
---------------------------------------------------------------------
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