fernandobatels / rsfbclient

Rust Firebird Client
MIT License
76 stars 11 forks source link

Crate r2d2 build fixed #126

Closed fernandobatels closed 2 years ago

fernandobatels commented 2 years ago

Fixed the release build of r2d2_firebird crate. Now we have a phantom option on simple connection/transaction enum's.

Without this fix, we cannot build the r2d2 on release mode.

Issue #125

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2757615272

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/connection/simple.rs 5 6 83.33%
src/transaction/simple.rs 2 11 18.18%
<!-- Total: 7 17 41.18% -->
Totals Coverage Status
Change from base Build 2750544977: 82.4%
Covered Lines: 3127
Relevant Lines: 3795

💛 - Coveralls
jairinhohw commented 2 years ago

I don't understand the problem, the crate can be built as long as one of the 3 main rsfbclient features are enables (linking, dynamic_loading, or pure_rust). If we merge this, it will allways pull the pure_rust implementation, even if not necessary (using linking for example).

fernandobatels commented 2 years ago

I don't understand the problem, the crate can be built as long as one of the 3 main rsfbclient features are enables (linking, dynamic_loading, or pure_rust). If we merge this, it will allways pull the pure_rust implementation, even if not necessary (using linking for example).

On master branch, running cargo build --release inside rd2d_firebird:

error[E0392]: parameter `'c` is never used
  --> src/transaction/simple.rs:19:30
   |
19 | pub struct SimpleTransaction<'c> {
   |                              ^^ unused parameter

The cargo publish build the crate on release mode. Without my fix, I cannot launch new versions of rd2d.

I agree with your commentary about always pull the pure_rust. I will find an alternative.

jairinhohw commented 2 years ago

Does it work if you do cargo publish --features rsfbclient/pure_rust ?

fernandobatels commented 2 years ago

cargo publish --features rsfbclient/pure_rust

It worked. Thanks. This PR is no longer needed.