Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3855

[rust] lint/clippy fails in ubertool

    XMLWordPrintableJSON

Details

    Description

      The rust SDK is currently failing when running in the ubertool:

      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
      

      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)

      Attachments

        Issue Links

          Activity

            People

              sarutak Kousuke Saruta
              rskraba Ryan Skraba
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m