www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - simple dub question - avoiding creating a vibed project

reply "Laeeth Isharc" <laeethnospam nospamlaeeth.com> writes:
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": ".",
}
Jan 05 2015
next sibling parent reply "Laeeth Isharc" <laeethnospam nospamlaeeth.com> writes:
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).
Jan 05 2015
parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
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
Jan 05 2015
parent reply "Laeeth Isharc" <laeethnospam nospamlaeeth.com> writes:
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 ?
Jan 05 2015
parent Rikki Cattermole <alphaglosined gmail.com> writes:
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
Jan 05 2015
prev sibling parent reply "Gary Willoughby" <dev nomad.so> writes:
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
Jan 05 2015
parent "Laeeth Isharc" <laeethnospam nospamlaeeth.com> writes:
 I opened an issue about this last year:

 https://github.com/mysql-d/mysql-native/issues/44
Thanks. Laeeth.
Jan 05 2015