elrnv / vtkio

Visualization ToolKit (VTK) file parser and writer
Apache License 2.0
57 stars 13 forks source link

Future compatibility for nom version 3 #26

Closed repositony closed 1 year ago

repositony commented 1 year ago

The nom dependency may need updating from version 3. The same was true of quick-xml but I see this has already switched to the latest git version in the release-0.7 branch.

Compiler warning:

warning: the following packages contain code that will be rejected by a future version of Rust: nom v3.2.1

For reference this is on rust version: stable-x86_64-unknown-linux-gnu unchanged - rustc 1.68.2

Below is an example of pretty much every warning for a --future-incompat-report:

The package `nom v3.2.1` currently triggers the following future incompatibility lints:
> warning: trailing semicolon in macro used in expression position
>    --> /home/tony/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-3.2.1/src/macros.rs:516:35
>     |
> 516 |     map!(__impl $i, call!($f), $g);
>     |                                   ^
>     |
>    ::: /home/tony/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-3.2.1/src/nom.rs:388:3
>     |
> 388 |   map!(i, be_u8, | x | { x as i8 })
>     |   --------------------------------- in this macro invocation
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
>     = note: macro invocations at the end of a block are treated as expressions
>     = note: to ignore the value produced by the macro, add a semicolon after the invocation of `map`
>     = note: `#[allow(semicolon_in_expressions_from_macros)]` on by default
>     = note: this warning originates in the macro `map` (in Nightly builds, run with -Z macro-backtrace for more info)
elrnv commented 1 year ago

Thank you for filing this issue! Upgrading nom is not a small undertaking (although with all our unit tests, should be relatively straightforward). Another option is to patch nom 3 and publish as a separate crate that resolves this very specific issue. PRs are welcome!

elrnv commented 1 year ago

Fixed by #30