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

Compiling `diesel_codegen` with no features gives a less than useful error message #570

Closed
sgrif opened this Issue Jan 9, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@sgrif
Member

sgrif commented Jan 9, 2017

diesel = { version = "0.9.0", features = ["postgres"] }
diesel_codegen = "0.9.0"
#[macro_use] extern crate diesel;
#[macro_use] extern crate diesel_codegen;

infer_schema!("dotenv:DATABASE_URL");
error: `#[derive]` for custom traits is not stable enough for use. It is deprecated and will be removed in v1.15 (see issue #29644)
  --> src/main.rs:15:1
   |
15 | infer_schema!("dotenv:DATABASE_URL");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro outside of the current crate
@killercup

This comment has been minimized.

Member

killercup commented Jan 10, 2017

Is there a nice way to do this? All I can think of is something like

#[cfg(not(any(feature = "sqlite", feature = "postgres")))]
mod hello_you_need_enable_one_of_the_backend_adapters_as_cargo_feature_thank_you;
@sgrif

This comment has been minimized.

Member

sgrif commented Jan 10, 2017

@sgrif

This comment has been minimized.

Member

sgrif commented Dec 16, 2017

This was fixed a while back when compile_error! was stabilized.

@sgrif sgrif closed this Dec 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment