Namespace for a module defined by its import path

Jonathan Marler via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 25 12:54:42 PDT 2016


On Tuesday, 25 October 2016 at 06:47:14 UTC, Jeff Thompson wrote:
> On Tuesday, 25 October 2016 at 00:42:59 UTC, Adam D. Ruppe 
> wrote:
>> [...]
>
> A variant of this is where the version name is the Git commit 
> hash. Instead of "version1" and "version2" it is:
>
> /commit_b3bf5c7725c98ee3e49dfc4e47318162f138fe94/lib.d
> /commit_df0741a84c8a967ea08674090afdff4e9a58d23e/lib.d
>
> The file lib.d can't contain its own commit hash, so I can't 
> put it in the module declaration. And different parts of the 
> application rely on different versions so I need different 
> application files to be able to import one or the other without 
> conflict. I'm trying to escape the situation where a piece of 
> code needs to know the path which the operating system uses to 
> load it.

Sorry if I didn't understand something, couldn't you do this?

/commit_b3bf5c7725c98ee3e49dfc4e47318162f138fe94/version/lib.d
/commit_df0741a84c8a967ea08674090afdff4e9a58d23e/version/lib.d


More information about the Digitalmars-d mailing list