www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dub: Could not resolve configuration for package demo

reply mw <mingwu gmail.com> writes:
Very simple thing from https://dub.pm/getting-started/first-steps/

After I add dependencies, it cannot build:

```
$ cat dub.json
{
         "authors": [
                 "mw"
         ],
         "copyright": "Copyright © 2024, mw",
         "description": "msgpack-rpc-d demo.",
         "license": "MIT",
         "name": "demo",
         "dependencies": {
                 "msgpack-rpc": "~>0.1.3"
         },
         "subConfigurations": {
                 "msgpack-rpc": "default"
         }
}

$ dub build
Could not resolve configuration for package demo
```

So what I'm missing?

Thanks.
Mar 15
next sibling parent reply Inkrementator <anon example.org> writes:
On Friday, 15 March 2024 at 17:48:26 UTC, mw wrote:
 ```
 $ dub build
 Could not resolve configuration for package demo
 ```
Trying to build your dependency msgpack-rpc, it spits out ``` Warning The sub configuration directive "vibe-d" -> [libevent] references a configuration that does not exist. Error Could not resolve configuration for package msgpack-rpc ``` In version 0.7, vibe-d depended on libevent, this got removed in the meantime https://github.com/vibe-d/vibe.d/commit/196096407ec27b2c107f0038c6751ce07e7a9507 Just patching msgpack-rpc dub.json to use the exact vibe-d version, and not a minimum, like this ```json "dependencies": { "msgpack-d": ">=0.9.2", "vibe-d": "==0.7.25" }, ``` fails too, because this old vibe-d version doesn't compile anymore. You'll have to either fix the old vibe-d version, or fork msgpack-rpc to work with current vibe-d, whatever is more appropriate and easier.
Mar 15
next sibling parent mw <mingwu gmail.com> writes:
On Friday, 15 March 2024 at 18:04:25 UTC, Inkrementator wrote:
 On Friday, 15 March 2024 at 17:48:26 UTC, mw wrote:
 ```
 $ dub build
 Could not resolve configuration for package demo
 ```
Trying to build your dependency msgpack-rpc, it spits out ``` Warning The sub configuration directive "vibe-d" -> [libevent] references a configuration that does not exist. Error Could not resolve configuration for package msgpack-rpc ```
Thanks for the reply. But where you see this warning message? I didn't see it even with `$ dub build -v`.
Mar 15
prev sibling parent mw <mingwu gmail.com> writes:
On Friday, 15 March 2024 at 18:04:25 UTC, Inkrementator wrote:
 You'll have to either fix the old vibe-d version, or fork 
 msgpack-rpc to work with current vibe-d, whatever is more 
 appropriate and easier.
I'm trying to fix it with the latest vibe-d 0.10.0, now the new error: ``` ../../src/msgpackrpc/transport/tcp.d(13,8): Error: unable to read module `driver` ../../src/msgpackrpc/transport/tcp.d(13,8): Expected 'vibe/core/driver.d' or 'vibe/core/driver/package.d' in one of the following import paths: ``` that line is: ``` import vibe.core.driver; ``` Do you know where is `vibe.core.driver` in the new version?
Mar 15
prev sibling parent mw <mingwu gmail.com> writes:
OK, looks something wrong with dub / or vibe-d 0.10.0

https://github.com/msgpack-rpc/msgpack-rpc-d/blob/master/examples/with_http_server/dub.sdl#L5

with
```
dependency "vibe-d" version="~>0.7.25"
```

`dub build` can at least starts.

But

```
dependency "vibe-d" version="~>0.10.0"
```


```
$ dub build
Error Could not resolve configuration for package with_http_server

```
Mar 15