Thread overview
kxml and dub package manager.
Oct 18, 2015
holo
Oct 19, 2015
drug
Oct 19, 2015
holo
Oct 19, 2015
holo
Oct 19, 2015
Mike Parker
Oct 19, 2015
holo
October 18, 2015
I want to add xml support to my application so i fetched kxml library with dub but it don't want to work for me. Steps and test code:

[holo@ultraxps kxml]$ cat dub.sdl
name "kxml"
description "A minimal D application."
copyright "Copyright © 2015, holo"
authors "holo"
dependencies "kxml" version="1.0.0"
[holo@ultraxps kxml]$ dub run
Performing "debug" build using dmd for x86_64.
kxml ~master: building configuration "application"...
source/app.d(1,8): Error: module kxml is in file 'kxml.d' which cannot be read
import path[0] = source/
import path[1] = /usr/include/dlang/dmd
dmd failed with exit code 1.
[holo@ultraxps kxml]$ cat source/app.d
import kxml;
import std.stdio;
import std.file;


struct instance
        {
           string id;
           string name;
           string type;
           string state;
        }


void main()
{

}

[holo@ultraxps kxml]$

How to make dub to work for me?
October 19, 2015
19.10.2015 02:57, holo пишет:
> How to make dub to work for me?
Try
```
import kxml.xml; // instead of import kxml;
```

October 19, 2015
On Monday, 19 October 2015 at 03:04:28 UTC, drug wrote:
> 19.10.2015 02:57, holo пишет:
>> How to make dub to work for me?
> Try
> ```
> import kxml.xml; // instead of import kxml;
> ```

Same:

[holo@ultraxps kxml]$ dub run
Performing "debug" build using dmd for x86_64.
kxml ~master: building configuration "application"...
source/app.d(1,8): Error: module xml is in file 'kxml/xml.d' which cannot be read
import path[0] = source/
import path[1] = /usr/include/dlang/dmd
dmd failed with exit code 1.
[holo@ultraxps kxml]$
October 19, 2015
ok i fugure out it. When i do initiation i need to add dependencies (thought it is enough to add them to sdl file). Proper initiation should look like that:

dub init projectname kxml
October 19, 2015
On Monday, 19 October 2015 at 03:33:18 UTC, holo wrote:
> ok i fugure out it. When i do initiation i need to add dependencies (thought it is enough to add them to sdl file). Proper initiation should look like that:
>
> dub init projectname kxml

No, you should never need to do that. I think your problem might be related to the fact that in your dub.sdl you named your project "kxml". You shouldn't name a project the same as one of your dependencies.
October 19, 2015
On Monday, 19 October 2015 at 06:20:19 UTC, Mike Parker wrote:
> On Monday, 19 October 2015 at 03:33:18 UTC, holo wrote:
>> ok i fugure out it. When i do initiation i need to add dependencies (thought it is enough to add them to sdl file). Proper initiation should look like that:
>>
>> dub init projectname kxml
>
> No, you should never need to do that. I think your problem might be related to the fact that in your dub.sdl you named your project "kxml". You shouldn't name a project the same as one of your dependencies.

Tried too with different name as i came to same idea and created new one with other name. It was behaving that same, so it is not cause of problem.