Skip to content

Dependency paths are not resolved py serve-d #407

Description

@nikolayKeniston

There is sample project:

dub.sdl:

name "sample"
targetType "library"
dependency "vibe-core" version="~>2.11"

src/test.d:

module test;
import vibe.core.net : TCPConnection;

Which is perfectly build-able with dub build:

Starting Performing "debug" build using /usr/bin/dmd for x86_64.
Building sample ~master: building configuration [library]

With properly resolved paths in dub describe --import-paths:

/home/user/proj/d/test/src/
/home/user/.dub/packages/vibe-core/2.13.0/vibe-core/source/
/home/user/.dub/packages/eventcore/0.9.37/eventcore/source/
/home/user/.dub/packages/during/0.3.0/during/source/
/home/user/.dub/packages/taggedalgebraic/1.0.1/taggedalgebraic/source/
/home/user/.dub/packages/vibe-container/1.7.0/vibe-container/source/
/home/user/.dub/packages/stdx-allocator/2.77.5/stdx-allocator/source/

However, even with a bare require'lspconfig'.serve_d.setup{} in nvim, in test.d the following error is reported for the import statement by serve-d:

1. unable to read module `net`
   test.d:1:7: Expected 'vibe/core/net.d' or 'vibe/core/net/package.d' in one of the following import paths:

The standard library and other features work fine, but not a single symbol from any dependency can be resolved. Judging by the error message, it seems that serve-d does not pick up any of the import paths from dub.
Basic health checks don't reveal any obvious issues, project root in :LspInfo points to right path, all D-related executables are in PATH, etc.

Env:
archlinux
serve-d v0.7.6 with workspace-d v3.7.0
NVIM v0.12.0-dev-934+ga9a4c271b1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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