Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in wirefilter-parser #79

Open
bluebear94 opened this issue Aug 11, 2022 · 4 comments
Open

Compilation error in wirefilter-parser #79

bluebear94 opened this issue Aug 11, 2022 · 4 comments

Comments

@bluebear94
Copy link

bluebear94 commented Aug 11, 2022

I’m trying to run the tests for this crate, but it doesn’t compile on a current Rust version.

$ cargo test --workspace
(other output...)
error: expected `;`
   --> wirefilter-parser/src/lib.rs:55:18
    |
55  |             $node.children();
    |                  ^
...
125 |         parse_range!(node, int_lit)
    |         --------------------------- in this macro invocation
    |
    = note: this error originates in the macro `proc_macro_call` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected `;`
   --> wirefilter-parser/src/lib.rs:55:18
    |
55  |             $node.children();
    |                  ^
...
150 |         parse_range!(node, ipv4_lit)
    |         ---------------------------- in this macro invocation
    |
    = note: this error originates in the macro `proc_macro_call` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected `;`
   --> wirefilter-parser/src/lib.rs:55:18
    |
55  |             $node.children();
    |                  ^
...
155 |         parse_range!(node, ipv6_lit)
    |         ---------------------------- in this macro invocation
    |
    = note: this error originates in the macro `proc_macro_call` (in Nightly builds, run with -Z macro-backtrace for more info)

rustc version: rustc 1.62.1 (e092d0b6b 2022-07-16)
wirefilter version: commit 1fea9c9

@cch0
Copy link

cch0 commented Jun 1, 2023

I know literally nothing about rust but am interested in this project. I also ran into the same errors. The errors went away after I did cargo update which updated dependency versions I think. After that, just saw test failures which are easy to fix.

rustup 1.26.0 (2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.70.0 (90c541806 2023-05-31)`

@veeshi
Copy link

veeshi commented Jun 8, 2023

The wirefilter library in the engine crate no longer uses the pest based parser in the wirefilter-parser crate, there is a handwritten parser in the wirefilter crate which is a lot better, more performant and with better errors for the wirefilter syntax.

@pr0x1ma-byte
Copy link

@cch0 what did you do to fix the tests?

@pr0x1ma-byte
Copy link

@cch0 I spoke too soon I understand now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants