DIP11

Jacob Carlborg doob at me.com
Mon Aug 15 07:16:57 PDT 2011


On 2011-08-15 15:11, Steven Schveighoffer wrote:
> What could happen though, is this situation:
>
> a.d pragma's foo.bar as being http://somedreposiotry.com/foo/barv1.0
> b.d includes the repository path http://somedrepository.com, whose
> default foo.bar goes to foo/barv2.0, but b does not depend on foo.bar

That would be a problem.

> I don't think a.d's pragma should include b's pragma, or vice versa.
> Especially if it is some sort of weird import order precedent.
>
> It's just much simpler to say "b's pragma only affects b, and a's pragma
> only affects a." However, I think we need to add that any files imported
> via a pragma implicitly include that path. I should probably add that to
> the DIP.

I guess so.

> Obviously if a.d depends on foo.bar, and b.d depends on foo.bar, but the
> locations are different, it should be a compiler error.
>
> -Steve

Ok.

My original concern was to have to add pragmas to every D file. That is 
not a solution that will last long. But if you can add a compiler flag 
instead I guess that's ok.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list