resurrecting Bud and Rebuild
Walter Bright
newshound at digitalmars.com
Tue Feb 13 02:23:42 PST 2007
Max Samukha wrote:
> On Wed, 07 Feb 2007 13:40:16 -0800, Walter Bright
> <newshound at digitalmars.com> wrote:
>> Both can be resolved by only allowing textual import if a command
>> switch, say, -Jpath, is given. 'path' gives the location of where to
>> look for the file; and the file will be restricted to being under that
>> path. No -Jpath, and textual import won't be allowed.
>>
>> For Bud and Rebuild, if there's no -J, they know there are no textual
>> imports, so they work as before. With -J, they always recompile.
>
> Will relative paths to subdirectories of 'path' be allowed in the
> import expression (a behavior similar to ordinary imports)?
>
> import ("file") - 'path'/file
> import ("subdir/file") - 'path'/subdir/file
> import ("/etc/passwd") - error
> import ("../file") - error
No paths at all will be allowed in the import string. They'll have to be
supplied via the -Jpath command line switch. It's probably more
conservative than necessary, but:
1) introducing host system dependent path separators makes the source
code non-portable
2) it gives the 'buildmaster' an easy way to find out and control what
files are imported
3) I think it's best to err on the side of conservatism here
More information about the Digitalmars-d
mailing list