Skip to content

Package in local-packages not picked up after moving package into new directory structure #2691

@jaapgeurts

Description

@jaapgeurts

System information

  • dub version: dub 1.33.0
  • OS Platform and distribution: (Linux opensuse tumbleweed (up to date))
  • compiler version LDC - the LLVM D compiler (1.32.0), based on DMD v2.102.2 and LLVM 15.0.7, built with LDC - the LLVM D compiler (1.32.0), Default target: x86_64-suse-linux

Bug Description

Dub issues a warning that the current package is at the wrong path. After moving the package to the suggested directory, dub doesn't see the package anymore.
Example: Warning Package at path '/home/alice/src/dlang-packages/ddbus/' should be under '/home/alice/src/dlang-packages/foo/$VERSION/foo'

After move the package into the suggested directory, dub doesn't see the package anymore.

How to reproduce?

  1. Add a local package directory dub add-path <path>
  2. Check the $HOME/.dub/packages/local-packages.json and make sure the path is listed.
  3. Add a package into the directory. (using the old structure without the version numbers)
  4. Issue dub list
  5. Notice that the package is listed and that dub issues a warning: Package at path <path>/foo should be under <path>/$VERSION/foo
  6. Move the package to the suggested directory(under a version number),
  7. Issue dub list
  8. Notice that the warning is gone but the package is not listed.

When trying to build a project it will not pick up the dependency.

Expected Behavior

Dub does see the package after moving it into the suggested directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions