Skip to content
This repository has been archived by the owner on May 10, 2020. It is now read-only.

tiberius doesn't compile on rust nightly #14

Closed
philippkeller opened this issue May 4, 2017 · 8 comments
Closed

tiberius doesn't compile on rust nightly #14

philippkeller opened this issue May 4, 2017 · 8 comments

Comments

@philippkeller
Copy link

philippkeller commented May 4, 2017

I tried do start using tiberius for running simple mssql queries via rust, but I get compilation errors when compiling on rust nightly rustc 1.19.0-nightly (afa1240e5 2017-04-29):

   Compiling tiberius v0.1.0
error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:69:5
   |
69 | /     fn column_type(&self) -> &'static str {
70 | |         "nvarchar"
71 | |     }
   | |_____^ lifetimes do not match trait

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
52 |   column_sql!(i8, I8, "tinyint");
   |   ------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
53 |   column_sql!(i16, I16, "smallint");
   |   ---------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
54 |   column_sql!(i32, I32, "int");
   |   ----------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
55 |   column_sql!(i64, I64, "bigint");
   |   -------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
56 |   column_sql!(u8, I8, "tinyint", i8);
   |   ----------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
57 |   column_sql!(u16, I16, "smallint", i16);
   |   --------------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
58 |   column_sql!(u32, I32, "int", i32);
   |   ---------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
59 |   column_sql!(u64, I64, "bigint", i64);
   |   ------------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
61 |   column_sql!(f32, F32, "float(24)");
   |   ----------------------------------- in this macro invocation

error[E0195]: lifetime parameters or bounds on method `column_type` do not match the trait declaration
  --> /Users/philipp/.cargo/registry/src/github.com-1ecc6299db9ec823/tiberius-0.1.0/src/types/mod.rs:46:13
   |
46 | /             fn column_type(&self) -> &'static str {
47 | |                 $name
48 | |             }
   | |_____________^ lifetimes do not match trait
...
62 |   column_sql!(f64, F64, "float(53)");
   |   ----------------------------------- in this macro invocation

error: aborting due to 11 previous errors

error: Could not compile `tiberius`.

Are you still developing this?

@steffengy
Copy link
Owner

steffengy commented May 4, 2017

The (synchronous) 0.1 branch isn't supported anymore.

It's really suboptimal that the fundamentally different 0.2 version isn't published
at crates.io yet (for me personally it lacks to many features - but maybe that's better
than an ancient version)

@steffengy
Copy link
Owner

steffengy commented May 4, 2017

Coincident: Meanwhile 0.2 seems to result in an LLVM assertion on nightly

rust-lang/rust#41744

EDIT: fixed in recent nightlies

@philippkeller
Copy link
Author

so should I just clone your github repo and work from there? Is that what you mean with version 0.2?

@steffengy
Copy link
Owner

Just use

tiberius = { git = 'https://github.com/steffengy/tiberius' }

in your cargo.toml for now.
Make sure to not update your nightly until rust-lang/rust#41744 is fixed.

Let me know of any other roadblocks that cause issues for you.

@philippkeller
Copy link
Author

can you give a minimal example using tiberius? I couldn't find a howto. I'm curious if this is using the freeTDS config I already did on my Mac or if I need to set things up through SqlConnection::connect()

@steffengy
Copy link
Owner

https://github.com/steffengy/tiberius/blob/master/src/lib.rs#L1-L35

contains a very simple example (no hosted docs yet, you can use cargo doc though).
Some other examples can also be found in the tests in the same file.

Not sure about the freeTDS part, this generally isn't related to freeTDS in any kind,
except that they implement the same protocol.

@philippkeller
Copy link
Author

sorry, I'm stuck with something else right now, I'll come back to this, thanks for the minimal example!

@steffengy
Copy link
Owner

no worries, just closing this since the fix for the issue with the "new" branch landed in rust's master (and therefore will be in nightlies shortly)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants