yew-macro: remove transitive dependency on syn 1 by Alextopher · Pull Request #3752 · yewstack/yew

Description

I've been enjoying yew and wanted to find a place I could make small contributions. I'm happy to put in some effort to remove duplicate dependencies.

There's a rustsec release out on proc-macro-error, the issue being the crate is unmaintained. Potential replacements include proc-macro-error2 which seems to be API compatible. proc-macro-error2 also removes some needless build scripts improving compilation times.

Overall, replacing proc-macro-error with proc-macro-error2 leads to an 8% reduction in (single threaded) compilation of yew.

cargo build --release --timings -j1 results below.

Before
image

After
image

Checklist

The existing test suite passes, I don't believe there is a test I could write for this PR.

Before

$ cargo tree -d | grep syn
syn v1.0.109
syn v2.0.79

After

$ cargo tree -d | grep syn