A.4 Load-Path Shadows

IDLWAVE can compile a list of routines which are (re-)defined in more than one file. Since one definition will hide (shadow) the others depending on which file is compiled first, such multiple definitions are called "load-path shadows". IDLWAVE has several routines to scan for load path shadows. The output is placed into the special buffer *Shadows*. The format of the output is identical to the source section of the routine info buffer (see Routine Info). The different definitions of a routine are ordered by likelihood of use. So the first entry will be most likely the one you’ll get if an unsuspecting command uses that routine. Before listing shadows, you should make sure that routine info is up-to-date by pressing C-c C-i. Here are the different routines (also available in the Menu ‘IDLWAVE->Routine Info’):

M-x idlwave-list-buffer-load-path-shadows

This command checks the names of all routines defined in the current buffer for shadowing conflicts with other routines accessible to IDLWAVE. The command also has a key binding: C-c C-b

M-x idlwave-list-shell-load-path-shadows.

Checks all routines compiled under the shell for shadowing. This is very useful when you have written a complete application. Just compile the application, use RESOLVE_ALL to compile any routines used by your code, update the routine info inside IDLWAVE with C-c C-i and then check for shadowing.

M-x idlwave-list-all-load-path-shadows

This command checks all routines accessible to IDLWAVE for conflicts.

For these commands to work fully you need to scan the entire load path in either a user or library catalog. Also, IDLWAVE should be able to distinguish between the system library files (normally installed in /usr/local/rsi/idl/lib) and any site specific or user specific files. Therefore, such local files should not be installed inside the lib directory of the IDL directory. This is also advisable for many other reasons.

Users of Windows also must set the variable idlwave-system-directory to the value of the !DIR system variable in IDL. IDLWAVE appends lib to the value of this variable and assumes that all files found on that path are system routines.

Another way to find out if a specific routine has multiple definitions on the load path is routine info display (see Routine Info).