[Vm-dev] search order for plugins
John M McIntosh
johnmci at smalltalkconsulting.com
Mon Apr 30 16:47:35 UTC 2007
Ok, as mentioned I had in the macintosh carbon vm a setting where we
don't search everywhere for a plugin, only say the SQUEAK_PLUGIN_PATH .
Then for example if we look for the built-in LargeIntegers plugin we
only look in SQUEAK_PLUGIN_PATH (one lookup) before using the
internal version.
That avoids hunting in 80 *+/-* other places
On Apr 30, 2007, at 9:17 AM, Ian Piumarta wrote:
> On Apr 30, 2007, at 3:08 AM, subbukk wrote:
>
>> For scripts, it does pathname expansion, opens the file to detect
>> shebang
>> interpreter and then passes the fullpath as $0 to the interp.
>> Therefore, $0
>> in a shell script will contain the full pathname.
>
> I've tried this on many different shells and it appears to be
> reliable only if there are no dirnames in the command. Typing a
> relative path to the script breaks it. However, it's nothing that
> a call to realpath() can't cure so here's what I propose to do,
> unless someone else can think of a reason not to:
>
> 1. Remove ./ from the list of places searched.
> 2. Merge SQUEAK_PLUGINS and SQUEAK_PLUGIN_PATH into one.
> 3. Fix any relative paths in SQUEAK_PLUGIN_PATH via realpath().
> 4. Make SQUEAK_PLUGIN_PATH be the first place searched.
>
> This would give you what you're asking for (use the -plugins
> option) with the smallest change to the behaviour of the binary.
>
> Cheers,
> Ian
>
>
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|