Thread overview
simple dub question - avoiding creating a vibed project
Jan 05, 2015
Laeeth Isharc
Jan 05, 2015
Laeeth Isharc
Jan 05, 2015
Rikki Cattermole
Jan 05, 2015
Laeeth Isharc
Jan 05, 2015
Rikki Cattermole
Jan 05, 2015
Gary Willoughby
Jan 05, 2015
Laeeth Isharc
January 05, 2015
Hi.

I am building an example for hibernated (I put a main around the sample code extract from the website).

How do I stop dub trying to build a vibed project?

Here is my dub.json

{
    "name": "ddbc example",
    "description": "example for DB Connector for D language, similar to JDBC",
    "authors": ["Vadim Lopatin","Laeeth Isharc"],
    "homepage": "https://github.com/buggins/ddbc",
    "license": "Boost Software License (BSL 1.0)",
    "dependencies": {
        "mysql-native": ">=0.0.12",
	"ddbc": ">=0.2.16",
    },
    "targetType": "executable",
    "libs-posix": ["sqlite3", "pq"],
    "libs-windows": ["sqlite3", "libpq"],
    "copyFiles-windows-x86": [ "libs/win32/sqlite3.dll", "libs/win32/libpq.dll", "libs/win32/intl.dll" ],
    "sourceFiles-windows-x86" : [ "libs/win32/sqlite3.lib", "libs/win32/libpq.lib" ],
     "targetPath": ".",
}




January 05, 2015
Figured out a fix:
     "versions": ["VibeCustomMain"],

It is still mysterious as to why it is pulling in vibed though (I don't import it, and I didn't think ddbc did).
January 05, 2015
On 5/01/2015 11:42 p.m., Laeeth Isharc wrote:
> Figured out a fix:
>       "versions": ["VibeCustomMain"],
>
> It is still mysterious as to why it is pulling in vibed though (I don't
> import it, and I didn't think ddbc did).

https://github.com/mysql-d/mysql-native/blob/master/package.json
January 05, 2015
On Monday, 5 January 2015 at 10:46:17 UTC, Rikki Cattermole wrote:
> On 5/01/2015 11:42 p.m., Laeeth Isharc wrote:
>> Figured out a fix:
>>      "versions": ["VibeCustomMain"],
>>
>> It is still mysterious as to why it is pulling in vibed though (I don't
>> import it, and I didn't think ddbc did).
>
> https://github.com/mysql-d/mysql-native/blob/master/package.json

aha.

isn't this a poor default for dub though?

ie if your parent project itself does not depend on vibed, the default should be that you take care of main yourself, and it does not try and use vibed's, no ?
January 05, 2015
On 5/01/2015 11:55 p.m., Laeeth Isharc wrote:
> On Monday, 5 January 2015 at 10:46:17 UTC, Rikki Cattermole wrote:
>> On 5/01/2015 11:42 p.m., Laeeth Isharc wrote:
>>> Figured out a fix:
>>>      "versions": ["VibeCustomMain"],
>>>
>>> It is still mysterious as to why it is pulling in vibed though (I don't
>>> import it, and I didn't think ddbc did).
>>
>> https://github.com/mysql-d/mysql-native/blob/master/package.json
>
> aha.
>
> isn't this a poor default for dub though?
>
> ie if your parent project itself does not depend on vibed, the default
> should be that you take care of main yourself, and it does not try and
> use vibed's, no ?

https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/appmain.d#L28
January 05, 2015
On Monday, 5 January 2015 at 10:27:06 UTC, Laeeth Isharc wrote:
> Hi.
>
> I am building an example for hibernated (I put a main around the sample code extract from the website).
>
> How do I stop dub trying to build a vibed project?
>
> Here is my dub.json
>
> {
>     "name": "ddbc example",
>     "description": "example for DB Connector for D language, similar to JDBC",
>     "authors": ["Vadim Lopatin","Laeeth Isharc"],
>     "homepage": "https://github.com/buggins/ddbc",
>     "license": "Boost Software License (BSL 1.0)",
>     "dependencies": {
>         "mysql-native": ">=0.0.12",
> 	"ddbc": ">=0.2.16",
>     },
>     "targetType": "executable",
>     "libs-posix": ["sqlite3", "pq"],
>     "libs-windows": ["sqlite3", "libpq"],
>     "copyFiles-windows-x86": [ "libs/win32/sqlite3.dll", "libs/win32/libpq.dll", "libs/win32/intl.dll" ],
>     "sourceFiles-windows-x86" : [ "libs/win32/sqlite3.lib", "libs/win32/libpq.lib" ],
>      "targetPath": ".",
> }

I opened an issue about this last year:

https://github.com/mysql-d/mysql-native/issues/44
January 05, 2015
> I opened an issue about this last year:
>
> https://github.com/mysql-d/mysql-native/issues/44

Thanks.


Laeeth.