buggins / ddbc

DDBC is DB Connector for D language (similar to JDBC)
78 stars 45 forks source link

module connection is in file 'mysql/connection.d' which cannot be read #30

Closed SingingBush closed 8 years ago

SingingBush commented 8 years ago

ddbc 0.2.25 breaks my projects build:

ddbc 0.2.25: building configuration "full"...
../../../.dub/packages/ddbc-0.2.25/source/ddbc/drivers/mysqlddbc.d(40,8): Error: module connection is in file 'mysql/connection.d' which cannot be read
import path[0] = ../../../.dub/packages/ddbc-0.2.25/source/
import path[1] = /usr/include/dmd/phobos
import path[2] = /usr/include/dmd/druntime/import
dmd failed with exit code 1.

I have to set it back to version 0.2.24 in dub.selections.json

I use dmd version 2.071.0 with dub 0.9.24

donglei commented 8 years ago

the lastest release v0.2.25 not config mysql-native dependency in dub.json configuration named full.

SingingBush commented 8 years ago

Ah yes, I see it was fixed here https://github.com/buggins/ddbc/commit/31b5209db40560dcf3bc9a5048942bf6944ba19f just needs a new release. In the meantime I need to work out why my dub build is ignoring that I specified the MySQL configuration in my subConfigurations.

jamonahn commented 8 years ago

I've noticed that when things change in dub.json, and weird build errors ensue, the best thing is to delete dub.selections.json and try again. Hope it works for you.

SingingBush commented 8 years ago

That wasn't the issue here but dub.selections.json can sometimes be an issue, especially if you remove a dependency from dub.json and it stays in the selections file. I personally make sure to put dub.selections.json into my .gitignore file when doing a D project.

My project didn't specify a dependency on ddbc directly but did specify a dependency on hibernated. As the dub file in that project pulls in ddbc using >=0.2.24 (at least it did when I had the issue), it was pulling in 0.2.25 - which had a problem with the full build config. I worked around this by actually putting ddbc v0.2.24 as a dependency in my project.

This should now be irrelevant as it seems there is now a new release: v0.2.27

jamonahn commented 8 years ago

Glad you worked it out and documented another sticky dub issue. Seems I am forever waiting for that magic make tool that does what I meant instead of what I said.