www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Am I right understand the dub.json system?

reply Suliman <evermind live.ru> writes:
For example I have got app that depended on DDBC. In 
configuration section DDBC related on:

"libs-posix": [
"sqlite3",
"pq"
]

Does it's mean that it will try to find this 2 libs in any case? 
Even I do not use them.

If I do not need them what I should to do? Fix 
~/.dub/packages/ddbc and remove this strings from it, or what?
Feb 29 2016
parent reply Edwin van Leeuwen <edder tkwsping.nl> writes:
On Monday, 29 February 2016 at 12:27:04 UTC, Suliman wrote:
 For example I have got app that depended on DDBC. In 
 configuration section DDBC related on:

 "libs-posix": [
 "sqlite3",
 "pq"
 ]

 Does it's mean that it will try to find this 2 libs in any 
 case? Even I do not use them.

 If I do not need them what I should to do? Fix 
 ~/.dub/packages/ddbc and remove this strings from it, or what?
Reading the dub.json from ddbc it seems you can specify which version you want. So if you only need mysql support you add "versions": ["USE_MYSQL"], in your own dub.json file.
Feb 29 2016
parent reply Suliman <evermind live.ru> writes:
On Monday, 29 February 2016 at 12:34:02 UTC, Edwin van Leeuwen 
wrote:
 On Monday, 29 February 2016 at 12:27:04 UTC, Suliman wrote:
 For example I have got app that depended on DDBC. In 
 configuration section DDBC related on:

 "libs-posix": [
 "sqlite3",
 "pq"
 ]

 Does it's mean that it will try to find this 2 libs in any 
 case? Even I do not use them.

 If I do not need them what I should to do? Fix 
 ~/.dub/packages/ddbc and remove this strings from it, or what?
Reading the dub.json from ddbc it seems you can specify which version you want. So if you only need mysql support you add "versions": ["USE_MYSQL"], in your own dub.json file.
Should it be like this? http://www.everfall.com/paste/id.php?80k9jsgdx6o3 "versions": ["VibeCustomMain"], "versions": ["USE_MYSQL"], And by log it's again try to build sqllite.
Feb 29 2016
parent reply Edwin van Leeuwen <edder tkwsping.nl> writes:
On Monday, 29 February 2016 at 12:45:36 UTC, Suliman wrote:
 On Monday, 29 February 2016 at 12:34:02 UTC, Edwin van Leeuwen 
 wrote:
 Should it be like this?
 http://www.everfall.com/paste/id.php?80k9jsgdx6o3

     "versions": ["VibeCustomMain"],
     "versions": ["USE_MYSQL"],
As far as I know all versions should be on one line: "versions": ["VibeCustomMain","USE_MYSQL"],
 And by log it's again try to build sqllite.
What does the log actually say? Is it trying to bind to sqlite? What happens if you also add "subConfigurations": { "ddbc":"MySQL" }
Feb 29 2016
parent Suliman <evermind live.ru> writes:
On Monday, 29 February 2016 at 13:10:36 UTC, Edwin van Leeuwen 
wrote:
 On Monday, 29 February 2016 at 12:45:36 UTC, Suliman wrote:
 On Monday, 29 February 2016 at 12:34:02 UTC, Edwin van Leeuwen 
 wrote:
 Should it be like this?
 http://www.everfall.com/paste/id.php?80k9jsgdx6o3

     "versions": ["VibeCustomMain"],
     "versions": ["USE_MYSQL"],
As far as I know all versions should be on one line: "versions": ["VibeCustomMain","USE_MYSQL"],
 And by log it's again try to build sqllite.
What does the log actually say? Is it trying to bind to sqlite? What happens if you also add "subConfigurations": { "ddbc":"MySQL" }
Thanks, I will check it's later. Now I just drop all other strings from ddbc, because now I need to get my app work.
Feb 29 2016