Closed 0xpr03 closed 5 years ago
The version 0.1.0 builder method use the rtdlib builder method directly, But rtdlib depends on type-builder, and rust unable to use dependencies of third-party projects, so you need add typed-builder = "0.3.0"
to your project.
0.1.0 https://github.com/fewensa/telegram-client/blob/e5f7abf695/src/api/function_builder.rs#L46
Now, the master branch code no typed-builder
is used, so there is no need to add typed-builder
master https://github.com/fewensa/telegram-client/blob/master/src/api/function_builder.rs#L50
But this code not yet published to crates.io, so another way is to use git dependency in cargo.toml
Ah thanks, added typed-builder="0.3"
to my project and added export RUSTFLAGS="-C link-args=-Wl,-rpath,libtdjson.so"
still compiling, if anyone else has this problem.
Ah sadly no, those steps still produce the same error. I'll try using master.
Ah thanks, added
typed-builder="0.3"
to my project and addedexport RUSTFLAGS="-C link-args=-Wl,-rpath,libtdjson.so"
still compiling, if anyone else has this problem.
I create a test project, and add wrote telegram-client = "0.1"
in Cargo.toml, i also encountered this error.
I checked all the dependencies.
rtgtest v0.1.0 (/opt/data/dev/rust/rtgtest)
└── telegram-client v0.1.0
├── daemon v0.0.8
│ └── libc v0.2.62
├── error-chain-mini v0.2.0
├── error-chain-mini-derive v0.2.0
│ ├── quote v0.5.2
│ │ └── proc-macro2 v0.3.8
│ │ └── unicode-xid v0.1.0
│ ├── syn v0.13.11
│ │ ├── proc-macro2 v0.3.8 (*)
│ │ ├── quote v0.5.2 (*)
│ │ └── unicode-xid v0.1.0 (*)
│ └── synstructure v0.8.1
│ ├── proc-macro2 v0.3.8 (*)
│ ├── quote v0.5.2 (*)
│ ├── syn v0.13.11 (*)
│ └── unicode-xid v0.1.0 (*)
├── lazy_static v1.3.0
├── rstring-builder v0.1.4
├── rtdlib v0.2.1
│ ├── libc v0.2.62 (*)
│ ├── rstring-builder v0.1.4 (*)
│ ├── serde v1.0.98
│ │ └── serde_derive v1.0.98
│ │ ├── proc-macro2 v0.4.30
│ │ │ └── unicode-xid v0.1.0 (*)
│ │ ├── quote v0.6.13
│ │ │ └── proc-macro2 v0.4.30 (*)
│ │ └── syn v0.15.44
│ │ ├── proc-macro2 v0.4.30 (*)
│ │ ├── quote v0.6.13 (*)
│ │ └── unicode-xid v0.1.0 (*)
│ │ [dev-dependencies]
│ │ └── serde_derive v1.0.98 (*)
The rtdlib version is v0.2.1, in version 0.2.1 typed-builder has been removed, , typed-builder exists in 0.2.0.
And telegerm-client 0.1.0 use
[dependencies.rtdlib]
version = "0.2.0"
But download dependency is 0.2.1, so you added type-builder
and it still will go wrong.
And currently I don't know why the download is 0.2.1 instead of 0.2.0.
Maybe you can use master branch code now.
I know that,
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements
"0.2.0" -> "^0.2.0"
So i pushed rtdlib 0.2.1 , when download version is 0.2.1.
This error is caused by a problem with the release of the version number.
It works for me when I use git master.
Edit: with telegram-client = {git = "https://github.com/fewensa/telegram-client" }
Good job. Because this project is just beginning soon, may be have many errors. welcome submit issue.
I'm not sure if I'm doing something wrong but this is my output: https://paste.ee/p/S5Hr5 (beware long)
And I'm having a cargo.toml with only
telegram-client = "0.1"
as entry.