Fix build and update to syn v2
This PR fixes https://github.com/geiger-rs/cargo-geiger/issues/517 . Here's what it does
- Rolls back dependabot changes which broke the build
- Update
integration_tests__test9_package_with_git_deps.stdout.snapto match a package version in Cargo.lock - Migrate from
synv1 to v2 to support new C-style string literals. This fixes the panic:Unrecognized literal: c"". - Since Rust 1.77 changed the cargo metadata package-ID format (https://github.com/rust-lang/cargo/pull/12914), cargo-geiger built with a Rust 1.77 toolchain always fails with:
We work around this by specifying the Rust 1.76 toolchain. The proper fix requires upgrading thethread 'scan::scan_tests::list_files_used_but_not_scanned_test::case_1' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/krates-0.11.0/src/builder.rs:919:36: called `Option::unwrap()` on a `None` valuecargo_metadatacrate to v0.18. This will require major changes to cargo-geiger's code.
Problems in this PR:
- Some tests are failing.
This PR keeps growing and growing as I fix more tests. I would love to hear suggestions for splitting it up. It would also be great if there was a way to get syn v2 to parse the same way as v1 so expression counts would match.
We're re-writing much of the core incl. to break the cargo-reliance so messy PR is ok for now to fix the techdebt np.
Thanks so much for doing this :rocket:
I updated the PR so the tests pass under latest stable Rust 1.85.0. It's ready for review.
I used rustfmt to fix the formatting.
Any news when it can land?
Bump, +1, we really need c-literal support.
@pinkforest Would you be interested in reviewing this PR, or is there another person I can ask?
@pinkforest could you give any hints when new release will land with this fix?
0.12 is out 🎉 thanks everyone