You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2023/09/14 06:08:00 UTC

[jira] [Resolved] (AVRO-3855) [rust] lint/clippy fails in ubertool

     [ https://issues.apache.org/jira/browse/AVRO-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Tzvetanov Grigorov resolved AVRO-3855.
---------------------------------------------
    Fix Version/s: 1.12.0
         Assignee: Kousuke Saruta
       Resolution: Fixed

> [rust] lint/clippy fails in ubertool
> ------------------------------------
>
>                 Key: AVRO-3855
>                 URL: https://issues.apache.org/jira/browse/AVRO-3855
>             Project: Apache Avro
>          Issue Type: Bug
>            Reporter: Ryan Skraba
>            Assignee: Kousuke Saruta
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0, 1.11.3
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The rust SDK is currently failing when running in the ubertool:
> {code}
> ryan.skraba@0c537f861c03:~/avro/lang/rust$ ./build.sh lint
> warning: /home/ryan.skraba/avro/lang/rust/avro/Cargo.toml: version requirement `0.12.4+zstd.1.5.2` for dependency `zstd` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion
>     Checking apache-avro v0.16.0 (/home/ryan.skraba/avro/lang/rust/avro)
>     Building [=====================>   ] 236/259: apache-avro, apache-avro,...
> error: redundant clone
>    --> avro/src/schema.rs:726:25
>     |
> 726 |                         .to_owned()
>     |                         ^^^^^^^^^^^ help: remove this
>     |
>     = note: `-D clippy::redundant-clone` implied by `-D clippy::all`
> note: this value is dropped without further use
>    --> avro/src/schema.rs:725:36
>     |
> 725 |                       let resolved = avro_value
>     |  ____________________________________^
> 726 | |                         .to_owned()
>     | |________________________^
>     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
> error: redundant clone
>     --> avro/src/schema.rs:1638:17
>      |
> 1638 |                 .to_owned()
>      |                 ^^^^^^^^^^^ help: remove this
>      |
> note: this value is dropped without further use
>     --> avro/src/schema.rs:1637:28
>      |
> 1637 |               let resolved = types::Value::from(value.clone())
>      |  ____________________________^
> 1638 | |                 .to_owned()
>      | |________________^
>      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
> error: could not compile `apache-avro` due to 2 previous errors
> warning: build failed, waiting for other jobs to finish...
> error: could not compile `apache-avro` due to 2 previous errors
> error: could not compile `apache-avro` due to 2 previous errors
> {code}
> Taking a very naive look, like there's a couple of things that might be different from the working GitHub action:
> * The clippy command line includes {{-Dunused_imports}} in the GitHub action, and
> * *It appears that 1.72.0 is being used for the lint, regardless of the GitHub actions strategy matrix.* (versus 1.65.0 in the build.sh)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)