You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by sadikovi <gi...@git.apache.org> on 2017/09/15 05:16:38 UTC
[GitHub] thrift pull request #1360: THRIFT-4330: Allow unused extern crates
GitHub user sadikovi opened a pull request:
https://github.com/apache/thrift/pull/1360
THRIFT-4330: Allow unused extern crates
This PR adds attribute to the Rust generated code to allow unused crates, since some libraries may not use imports and generate warnings.
```
#![allow(unused_extern_crates)]
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sadikovi/thrift THRIFT-4330
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1360.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1360
----
commit 54b12d274616f819a90e16d188f1431260e0ed50
Author: Ivan Sadikov <iv...@team.telstra.com>
Date: 2017-09-15T05:09:08Z
THRIFT-4330: allow unused extern crates
----
---
[GitHub] thrift pull request #1360: THRIFT-4330: Allow unused extern crates
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/thrift/pull/1360
---
[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates
Posted by allengeorge <gi...@git.apache.org>.
Github user allengeorge commented on the issue:
https://github.com/apache/thrift/pull/1360
@sadikovi Sorry for the delay - was away this weekend.
Ah, ok. That makes total sense. You probably don't have any floats in your IDL, or anything that would use the `TryFrom` conversion. LGTM.
@Jens-G LGTM; could you merge this please? TY!
---
[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates
Posted by sadikovi <gi...@git.apache.org>.
Github user sadikovi commented on the issue:
https://github.com/apache/thrift/pull/1360
CI failures do not seem to be related.
---
[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates
Posted by sadikovi <gi...@git.apache.org>.
Github user sadikovi commented on the issue:
https://github.com/apache/thrift/pull/1360
@allengeorge could you have a look at this change? Thanks!
---
[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates
Posted by allengeorge <gi...@git.apache.org>.
Github user allengeorge commented on the issue:
https://github.com/apache/thrift/pull/1360
@sadikovi The change seems fine, but I don't quite understand when this problem happens. Could you explain when it gets triggered? In what sort of code setup? Thanks!
---
[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates
Posted by mrwiggles <gi...@git.apache.org>.
Github user mrwiggles commented on the issue:
https://github.com/apache/thrift/pull/1360
@sadikovi The change seems fine, but I don't understand when this warning gets triggered. Could you explain a bit more what you mean? When does this happen, and why? Thanks!
---
[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates
Posted by sadikovi <gi...@git.apache.org>.
Github user sadikovi commented on the issue:
https://github.com/apache/thrift/pull/1360
@allengeorge When I compile parquet-rs library I get following warnings ([parquet.thrift](https://github.com/sadikovi/parquet-rs/blob/master/src/parquet_thrift/parquet.thrift))
```shell
warning: unused extern crate
--> src/parquet_thrift/parquet.rs:8:1
|
8 | extern crate ordered_float;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_extern_crates)] on by default
warning: unused extern crate
--> src/parquet_thrift/parquet.rs:10:1
|
10 | extern crate try_from;
| ^^^^^^^^^^^^^^^^^^^^^^
```
This happens when `extern crate ...` is already defined in [lib.rs](https://github.com/sadikovi/parquet-rs/blob/master/src/lib.rs) for the library.
---
[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates
Posted by sadikovi <gi...@git.apache.org>.
Github user sadikovi commented on the issue:
https://github.com/apache/thrift/pull/1360
@Jens-G could you review this PR, please? Thanks!
---