nested module problem
mingwu at gmail.com
Wed Oct 28 23:15:18 UTC 2020
On Wednesday, 28 October 2020 at 22:52:33 UTC, Adam D. Ruppe
> On Wednesday, 28 October 2020 at 22:43:12 UTC, mw wrote:
>> I wonder what's the best way to resolve this conflict, i.e my
>> local file name with 3rd party library dir name.
> Don't write any module with a single name unless you are
> guaranteed to never import it.
> pyd should have called it like `module pyd.util;`
> Then you call yours like `module mw.util;`
> This makes such conflicts a lot less likely.
Thanks for the tip, Adam.
And I fixed the imports in multiple files with:
$ sed -i 's/import util;/import mw.util;/g' *.d
Hope this will help if someone else also run into this issue.
More information about the Digitalmars-d-learn