-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not use this repo with dub without it installing vibe.d #44
Comments
|
I'm not sure there's a good solution to this until dub gains support for optional dependencies. There's already a syntax for them in the dub.json format, but last I checked it was still unfinished or unimplemented. |
|
In the meantime, I would just manually delete the vibe.d dependency in the dub.json of your local dub-managed checkout of mysql-native. |
|
Oh dear. Also surely this dependency is the wrong way around? Instead of a database library with a Asynchronous I/O framework as a dependency surely it should be a Asynchronous I/O framework with a mysql database library as a dependency? |
|
mysql-native optionally supports vibe.d's sockets as an alternative to phobos's sockets (for the sake of vibe.d-based programs that want to use mysql-native). In order to use vibe.d's sockets, mysql-native must import vibe.d. Thus the dependency. It should be an optional dependency, though (and it is optional if you're not using dub). |
|
Also, sockets are more low-level than a DB client, so it makes sense for the DB client to depend on whatever provides the sockets. Vibe.d does makes this a little confusing though since it also provides functionality that's arguably higher-level than a DB client. But mysql-native doesn't use, or even import, any of the higher-level stuff in vibe.d, just the sockets. |
|
Pardon the constant noise, but an extra related thought: mysql-native's dependency on vibe.d probably could be eliminated outright (well, except for the integration tests) if vibe.d provided an API for its sockets that was structurally compatible with Phobos's sockets. Then, mysql-native could just leave the choice of sockets up to the user as a template parameter. I wasn't able to do that when I added the vibe.d support because vibe.d's sockets use ("used"?) a different API. So I needed to directly wrap vibe.d's sockets within mysql-native. But again, dub really does need optional dependencies anyway, so that's really the better solution. |
Ah right. I've used mysql-native before in a few projects (buildint manually) but wanted to use dub this time. Looks like i'll continue building manually until these issues are sorted. |
|
@nomad-software: I've fixed the optional dependency issue now on DUB master (dlang/dub#359). To fix the initial issue, it would alternatively be possible to add
Not at all. Ideally, vibe.d should be a low level foundation and the DB drivers would be separate, higher level packages. I'll start to split it up into sub packages first, but that's the long term plan. |
|
I've updated to the latest version of dub and it works great, thanks. Also i didn't need to add the |
This is my current package.json:
When i build with the
dubcommand i get this:How can i completely disable vibe.d from being installed and/or being used with this library?
The text was updated successfully, but these errors were encountered: