new DIP14: Package import path association

Jacob Carlborg doob at me.com
Wed Oct 19 04:28:31 PDT 2011


On 2011-10-19 11:42, Martin Nowak wrote:
> On Wed, 19 Oct 2011 09:57:06 +0200, Jacob Carlborg <doob at me.com> wrote:

>> But on the other hand, if this would be possible you would need to add
>> this to every source file that uses modules from those imports paths.
>> Or you would need a source file that basically just list new imports
>> paths which will be globally available.
> Which is what I finally did.
> https://github.com/dawgfoto/graphics/blob/master/src/graphics/_.d
>
> Where the importpath pragma is simply appending to the -I list, thus had
> global scope.
> The good thing about this is that it is decentral and recursive w.r.t.
> the imported sources.
>

Yeah, but as I said, in this case you can just as easily have a build 
tool handle this.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list