code-d icon indicating copy to clipboard operation
code-d copied to clipboard

Wrong module names for subpackages

Open 0xEAB opened this issue 2 years ago • 3 comments

Imagine the following directory structure:

- project root
|
| - dub.json
| - common
  | - myproject
    | - common
      | - path.d

And such a DUB recipe:

{
    "subPackages": [
        {
            "name": "common",
            "description": "Common library",
            "importPaths": ["common"],
            "sourcePaths": ["common"]
        }
    ]
}

code-d will generate common.myproject.common.path (instead of myproject.common.path) as name of the module.

0xEAB avatar Jun 18 '23 18:06 0xEAB

does this happen after reloading? This should emit properly already, but I'm thinking it might occur when freshly creating subpackages, so that they aren't yet loaded as standalone projects.

WebFreak001 avatar Jun 18 '23 18:06 WebFreak001

Yes, it happens after reloading.

(Was thinking about mentioning this; as I’m aware that code-d doesn’t properly handle changes to the package recipe. Should have done so in the first place, sorry.)

0xEAB avatar Jun 18 '23 18:06 0xEAB

serve-d standalone v0.8.0-beta.14
Included features: "d", "workspaces"
Built: Mon Mar 27 04:57:01 2023
with compiler LDC v2.102 on linux x86_64

0xEAB avatar Jun 18 '23 18:06 0xEAB