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

Fix conditional compilation of diesel macros #156

Closed

Conversation

tomknig
Copy link
Contributor

@tomknig tomknig commented Sep 4, 2024

With 0.11.0-rc1, bcbb48d specifically, a bug was introduced, causing one diesel macro not being excluded from compilation even if the blocking feature is not enabled. The line added in the referenced commit is: https://github.com/ayrat555/fang/blame/2847db35a690f3c58d5e26bb48bf2c1418cf4849/fang/src/lib.rs#L152

The resulting error when trying to compile with

fang = { version = "0.11.0-rc1", features = ["asynk-postgres"], default-features = false }

is:

error: cannot find attribute `diesel` in this scope
   --> /Users/.../.cargo/registry/src/index.crates.io-6f17d22bba15001f/fang-0.11.0-rc1/src/lib.rs:152:3
    |
152 | #[diesel(table_name = fang_tasks)]
    |   ^^^^^^

error: could not compile `fang` (lib) due to 1 previous error
error: Recipe `build-...` failed on line 103 with exit code 101

The solution I suggest is to only include this instance of the diesel macro when the blocking feature is enabled.

@Dopplerian Dopplerian requested a review from pxp9 October 18, 2024 16:59
@pxp9
Copy link
Collaborator

pxp9 commented Oct 18, 2024

hey , this was fixed in this commit,

f7b5cac#diff-d6910112c105b30683c633451a1ada3fb1ea2671280e13834396a60d9fb70ffdR152

sorry for not review your PR.

@pxp9
Copy link
Collaborator

pxp9 commented Oct 18, 2024

i will close this PR in favor of #157

@pxp9 pxp9 closed this Oct 18, 2024
@tomknig
Copy link
Contributor Author

tomknig commented Oct 18, 2024

No worries; Good, that it has been fixed :)

@tomknig tomknig deleted the fix/diesel-macro-compilation branch October 18, 2024 19:06
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 this pull request may close these issues.

2 participants