-
Notifications
You must be signed in to change notification settings - Fork 356
Description
Describe the bug
I recently downloaded a project from git to start hacking away at it again and after some basic version upgrading, finding out what versions play well with each other, etc, this issue kept popping up.
FRB will build all the generated files without error, but when I attempt to run my code (via flutter run -d linux
) it gives me the following error:
flutter run -d linux
Launching lib/main.dart on Linux in debug mode...
error[E0635]: unknown feature `proc_macro_span_shrink`
--> /home/gutenfries/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.52/src/lib.rs:92:30
|
92 | feature(proc_macro_span, proc_macro_span_shrink)
| ^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error
error: failed to compile `corrosion-generator v0.1.0 (/home/gutenfries/Desktop/playback/client/build/linux/x64/debug/_deps/corrosion-src/generator)`, intermediate artifacts can be found at `/home/gutenfries/Desktop/playback/client/build/linux/x64/debug/_deps/corrosion-src/generator/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
CMake Error at /home/gutenfries/Desktop/playback/client/build/linux/x64/debug/_deps/corrosion-src/cmake/Corrosion.cmake:594 (message):
Building CMake Generator for Corrosion - failed
Call Stack (most recent call first):
/home/gutenfries/Desktop/playback/client/build/linux/x64/debug/_deps/corrosion-src/CMakeLists.txt:73 (include)
Building Linux application...
Exception: Unable to generate build files
upon doing some more research (using google lol), I've found that this is an issue with proc-macro
Basically, the Rust team pushed some changes to prod, and the proc-macro2 folks haven't been able to make the necessary changes to their codebase at the time of the release.
(see rust-lang/rust#113152 for more details)
This presents a breaking bug for FRB, as anyone with >= nightly-2023-06-28
installed will run into the same (breaking) issue.
Proposed fix(es):
the issue has recently (quite literally since I started typing this up lol) been resolved within proc-macro2
, and versions >=1.0.60
appropriately address this.
(see dtolnay/proc-macro2#391 for additional context.)
simply bumping this ASAP should be adequate to address this.
Codegen logs with RUST_LOG=debug
environment variable
N/A
To Reproduce
run flutter run
in a FRB project with rust version nightly-2023-06-28
or newer
Expected behavior
No response
Generated binding code
No response
OS
Zorin OS (highly modified XFCE Ubuntu LTS)
Version of flutter_rust_bridge_codegen
flutter_rust_bridge_codegen 1.79.0
Flutter info
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.6, on Zorin OS 16.3 5.15.0-78-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.80.2)
[✓] Connected device (2 available)
[✓] Network resources
• No issues found!
Version of clang++
clang version 10.0.0-4ubuntu1
Version of ffigen
8.0.2
Additional context
No response