stepfunc / dnp3

Rust implementation of DNP3 (IEEE 1815) with idiomatic bindings for C, .NET, C++, and Java
https://stepfunc.io/products/libraries/dnp3/
Other
117 stars 24 forks source link

Cargo build error #346

Closed Ojvar closed 7 months ago

Ojvar commented 7 months ago

Hello After a fresh clone

git clone git@github.com:stepfunc/dnp3.git

I just run "cargo build" command, and this is the result

os: linux manjaro (x64)

   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.147
   Compiling once_cell v1.18.0
   Compiling memchr v2.6.3
   Compiling pin-project-lite v0.2.13
   Compiling quote v1.0.33
   Compiling syn v2.0.32
   Compiling cc v1.0.83
   Compiling version_check v0.9.4
   Compiling typenum v1.16.0
   Compiling generic-array v0.14.7
   Compiling autocfg v1.1.0
   Compiling serde v1.0.188
   Compiling lazy_static v1.4.0
   Compiling utf8parse v0.2.1
   Compiling anstyle-parse v0.2.1
   Compiling backtrace v0.3.69
   Compiling aho-corasick v1.0.5
   Compiling anstyle-query v1.0.0
   Compiling serde_json v1.0.106
   Compiling colorchoice v1.0.0
   Compiling regex-syntax v0.7.5
   Compiling anstyle v1.0.3
   Compiling thiserror v1.0.48
   Compiling adler v1.0.2
   Compiling gimli v0.28.0
   Compiling addr2line v0.21.0
   Compiling regex-automata v0.3.8
   Compiling miniz_oxide v0.7.1
   Compiling anstream v0.5.0
   Compiling object v0.32.1
   Compiling serde_derive v1.0.188
   Compiling tracing-attributes v0.1.26
   Compiling thiserror-impl v1.0.48
   Compiling strsim v0.10.0
   Compiling ryu v1.0.15
   Compiling semver v1.0.18
   Compiling itoa v1.0.9
   Compiling heck v0.4.1
   Compiling rustc-demangle v0.1.23
   Compiling platforms v2.0.0
   Compiling clap_lex v0.5.1
   Compiling clap_builder v4.4.2
   Compiling clap_derive v4.4.2
   Compiling regex v1.9.5
   Compiling crypto-common v0.1.6
   Compiling dunce v1.0.4
   Compiling log v0.4.20
   Compiling tracing-core v0.1.31
   Compiling clap v4.4.3
   Compiling block-padding v0.3.3
   Compiling inout v0.1.3
   Compiling block-buffer v0.10.4
   Compiling ring v0.16.20
   Compiling subtle v2.5.0
   Compiling digest v0.10.7
   Compiling tracing v0.1.37
   Compiling cipher v0.4.4
   Compiling futures-core v0.3.28
   Compiling pin-utils v0.1.0
   Compiling oo-bindgen v0.8.6
   Compiling slab v0.4.9
   Compiling memoffset v0.7.1
   Compiling base64ct v1.6.0
   Compiling spin v0.5.2
   Compiling cpufeatures v0.2.9
   Compiling futures-task v0.3.28
   Compiling futures-channel v0.3.28
   Compiling untrusted v0.7.1
   Compiling pem-rfc7468 v0.7.0
   Compiling hmac v0.12.1
   Compiling const-oid v0.9.5
   Compiling futures-util v0.3.28
   Compiling futures-sink v0.3.28
   Compiling bytes v1.5.0
   Compiling zeroize v1.6.0
   Compiling der v0.7.8
   Compiling pbkdf2 v0.12.2
   Compiling sha2 v0.10.7
   Compiling sfio-tokio-ffi v0.8.0
   Compiling sfio-tracing-ffi v0.8.0
   Compiling salsa20 v0.10.2
   Compiling mio v0.8.8
   Compiling futures-macro v0.3.28
   Compiling num-traits v0.2.16
   Compiling bitflags v1.3.2
   Compiling futures-io v0.3.28
   Compiling rustls v0.21.7
   Compiling nix v0.26.4
   Compiling scrypt v0.11.0
   Compiling dnp3-schema v1.5.2 (/tmp/dnp3/ffi/dnp3-schema)
   Compiling spki v0.7.2
   Compiling rustls-webpki v0.101.5
   Compiling sct v0.7.0
   Compiling aes v0.8.3
   Compiling cbc v0.1.2
   Compiling tokio-macros v2.1.0
   Compiling num_cpus v1.16.0
   Compiling socket2 v0.5.4
   Compiling scopeguard v1.2.0
   Compiling bitflags v2.0.2
   Compiling serialport v4.2.2
   Compiling tokio v1.32.0
   Compiling pkcs5 v0.7.1
   Compiling futures-executor v0.3.28
   Compiling tracing-log v0.1.3
   Compiling sharded-slab v0.1.4
   Compiling thread_local v1.1.7
   Compiling regex-syntax v0.6.29
   Compiling base64 v0.21.4
   Compiling smallvec v1.11.0
   Compiling iana-time-zone v0.1.57
   Compiling same-file v1.0.6
   Compiling rand_core v0.6.4
   Compiling pkcs8 v0.10.2
   Compiling walkdir v2.4.0
   Compiling chrono v0.4.30
   Compiling pem v3.0.2
   Compiling regex-automata v0.1.10
   Compiling futures v0.3.28
   Compiling mio-serial v5.0.5
   Compiling rx509 v0.2.1
   Compiling sfio-rustls-config v0.1.2
   Compiling matchers v0.0.1
   Compiling tokio-serial v5.4.3
   Compiling jni v0.19.0
   Compiling tokio-rustls v0.24.1
   Compiling dnp3-ffi v1.5.2 (/tmp/dnp3/ffi/dnp3-ffi)
   Compiling tracing-serde v0.1.3
   Compiling xxhash-rust v0.8.7
   Compiling overload v0.1.1
   Compiling ansi_term v0.12.1
   Compiling scursor v0.1.0
   Compiling dnp3 v1.5.2 (/tmp/dnp3/dnp3)
   Compiling tracing-subscriber v0.2.25
   Compiling nu-ansi-term v0.46.0
   Compiling dnp3-ffi-java v1.5.2 (/tmp/dnp3/ffi/dnp3-ffi-java)
   Compiling combine v4.6.6
   Compiling jni-sys v0.3.0
   Compiling cesu8 v1.1.0
   Compiling sfio-promise v0.2.0
error: field `0` is never read
    --> dnp3/src/app/attr.rs:1045:12
     |
1045 |     Cursor(WriteError),
     |     ------ ^^^^^^^^^^
     |     |
     |     field in this variant
     |
note: the lint level is defined here
    --> dnp3/src/lib.rs:3:1
     |
3    | dead_code,
     | ^^^^^^^^^
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
     |
1045 |     Cursor(()),
     |            ~~

error: fields `0` and `1` are never read
  --> dnp3/src/outstation/database/read.rs:23:18
   |
23 |     FrozenAnalog(Option<StaticFrozenAnalogInputVariation>, Option<IndexRange>),
   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^
   |     |
   |     fields in this variant
   |
help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
   |
23 |     FrozenAnalog((), ()),
   |                  ~~  ~~

error: fields `0` and `1` are never read
  --> dnp3/src/outstation/database/read.rs:45:18
   |
45 |     FrozenAnalog(Option<EventFrozenAnalogInputVariation>, Option<usize>),
   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^
   |     |
   |     fields in this variant
   |
help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
   |
45 |     FrozenAnalog((), ()),
   |                  ~~  ~~

error: field `0` is never read
  --> dnp3/src/transport/types.rs:54:11
   |
54 |     Error(EndpointAddress, TransportResponseError),
   |     ----- ^^^^^^^^^^^^^^^
   |     |
   |     field in this variant
   |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
54 |     Error((), TransportResponseError),
   |           ~~

error: field `0` is never read
  --> dnp3/src/transport/types.rs:77:22
   |
77 |     LinkLayerMessage(LinkLayerMessage),
   |     ---------------- ^^^^^^^^^^^^^^^^
   |     |
   |     field in this variant
   |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
77 |     LinkLayerMessage(()),
   |                      ~~

error: could not compile `dnp3` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
jadamcrain commented 7 months ago

The lints in the newest Rust 1.77 have probably become more aggressive. They won't affect you if you're using the library as a dependency as opposed to build it directly.

I'll check it out later today.

jadamcrain commented 7 months ago

These lints are now fixed on the main branch.