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

Cannot use binrw 0.12.0 #224

Closed
Talon1024 opened this issue Sep 23, 2023 · 3 comments
Closed

Cannot use binrw 0.12.0 #224

Talon1024 opened this issue Sep 23, 2023 · 3 comments

Comments

@Talon1024
Copy link

I can't use binrw 0.12.0. Apparently, there's a compile error with binrw_derive, the procedural macro crate for binrw:

Compiling binrw_derive v0.12.0
error[E0599]: no method named `source_text` found for struct `proc_macro2::Span` in the current scope
  --> /home/~~~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/binrw_derive-0.12.0/src/binrw/backtrace/mod.rs:32:39
   |
32 |         if let Some(text) = self.span.source_text() {
   |                                       ^^^^^^^^^^^ method not found in `Span`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `binrw_derive` (lib) due to previous error
@csnover
Copy link
Collaborator

csnover commented Sep 23, 2023

Could you please give the version of rustc you are using? Thanks!

@Talon1024
Copy link
Author

Rustc 1.72.1, stable toolchain

csnover added a commit to csnover/binrw that referenced this issue Sep 23, 2023
Everything in actions-rs seems to be abandoned so also switching
to the dtolnay/rust-toolchain action, but per
dtolnay/rust-toolchain#70 apparently it will not support getting
MSRV directly so currently that is duplicated in CI, which is not
ideal but whatever.

Refs jam1garner#224.
csnover added a commit to csnover/binrw that referenced this issue Sep 23, 2023
@csnover
Copy link
Collaborator

csnover commented Sep 23, 2023

OK. Please try running cargo update and try again. I guess that you have a very old proc-macro2 dependency and the dependency list was not updated with a correct minimum version for the API that binrw uses. Please let me know how it goes. I will be committing changes to specify new minimums for future binrw versions. Thanks!

csnover added a commit to csnover/binrw that referenced this issue Sep 23, 2023
Technically only proc-macro2 probably needs to be updated but
since no one is really testing with old versions it seems to make
sense to just update them to whatever is current now.

Fixes jam1garner#224.
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

2 participants