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

Build error with tiberius without serde #331

Closed
krojew opened this issue May 7, 2024 · 2 comments · Fixed by #334
Closed

Build error with tiberius without serde #331

krojew opened this issue May 7, 2024 · 2 comments · Fixed by #334

Comments

@krojew
Copy link
Contributor

krojew commented May 7, 2024

When building refinery-core with tiberius feature but without serde, there a build error at config.rs:274:7:

#[derive(Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
struct Main {
    db_type: ConfigDbType,
    db_path: Option<PathBuf>,
    db_host: Option<String>,
    db_port: Option<String>,
    db_user: Option<String>,
    db_pass: Option<String>,
    db_name: Option<String>,
    #[cfg(feature = "tiberius-config")]
    #[serde(default)]
    trust_cert: bool,
}

#[serde(default)] is not guarded against not having serde feature, thus resulting in "cannot find attribute serde in this scope".

@jxs
Copy link
Member

jxs commented May 20, 2024

Hi, this is indeed a bug, but it shouldn't be reproducible as one shouldn't build refinery-core, specially with tiberius-config which is a feature only used by refinery-cli, may I ask why are you doing it?

@krojew
Copy link
Contributor Author

krojew commented May 20, 2024

If I recall correctly, there was a case for it in https://github.com/krojew/springtime/tree/master/springtime-migrate-refinery, but can't remember exactly what.

@jxs jxs closed this as completed in #334 May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants