Keyword "package" prevents from importing a package module "package.d"

BoQsc vaidas.boqsc at gmail.com
Thu Nov 2 12:52:35 UTC 2023


Well the whole thread is about importing `package.d` while being 
inside package to provide runnable working example which contains 
debug information of the package.

Sidenote:
This is essentially useful when distributing over many 
machines/platforms via `dub` package manager.

You would want to have a source file inside the project that 
imports package.d and is runnable with well tested example 
behaviour.

Therefore the need to import `package.d` is needed and I can't 
see a solution, which means
  that D Language might have to introduce a way to import 
`package.d` from inside the package, if there is a need to 
further improve experience of having a self-testing packages in 
both `dub` and `package modules`.


More information about the Digitalmars-d-learn mailing list