Skip to content
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

Optional lazy loading of C dependencies #999

Open
sgrif opened this issue Jul 5, 2017 · 5 comments
Open

Optional lazy loading of C dependencies #999

sgrif opened this issue Jul 5, 2017 · 5 comments

Comments

@sgrif
Copy link
Member

sgrif commented Jul 5, 2017

A common source of questions in gitter and issues here are people who write cargo install diesel_cli and don't have all the backends installed. This was less of an issue when we only supported 2 backends. It's becoming a bit more of an issue with 3 (though I still think the situation is better than the alternative of having cargo install diesel_cli not work, and require backends to always be specified).

What I'd like to do is optionally allow our C dependencies to lazily load the dylibs, and not need to be present for linking. That means that you'd only see an error about mysql if you tried to run CLI with a MySQL URL (and we can probably provide a better error message than the linker is providing). I'd like to keep the footprint on this small, as I don't expect anybody to use this functionality besides Diesel CLI.

@sgrif sgrif changed the title Optional lazy linking of C dependencies Optional lazy loading of C dependencies Jul 5, 2017
@sgrif sgrif added this to the 1.0 milestone Jul 5, 2017
@sgrif
Copy link
Member Author

sgrif commented Jul 5, 2017

I think this is one of the bigger 1.0 blockers. I can figure this out if needed, but if there's someone with more experience in this space we would love a PR for this

@killercup
Copy link
Member

Just talked to @skade who's now searched for and found the cargo install diesel-cli --no-default-features --features "postgres" incantation three times. I was about to open an issue to add some info on diesel-cli's feature flags to its Readme file, but it turns out they are just to enable backends (or clippy) and this issue here will make these docs useless anyway.

@skade
Copy link

skade commented Jul 23, 2017

Would it also be possible to also ship diesel cli as a binary? For example, half of my hefty heroku build times are just building the CLI.

@sgrif
Copy link
Member Author

sgrif commented Jul 23, 2017

@skade Are you using https://github.com/sgrif/heroku-buildpack-diesel ? If so just add a .diesel-version file to the root of your repo and the CLI build will be cached.

@sgrif
Copy link
Member Author

sgrif commented Dec 2, 2017

This isn't happening for 1.0

@sgrif sgrif removed this from the 1.0 milestone Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants