plato icon indicating copy to clipboard operation
plato copied to clipboard

Breaks with newer rust

Open palfrey opened this issue 7 months ago • 2 comments

As part of https://github.com/toltec-dev/toltec/pull/951, I tried upgrading this to use the rust:v3.1 build image and got the following

[   DEBUG] toltec.builder: build(): error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`
[   DEBUG] toltec.builder: build(): --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.51/src/wrapper.rs:475:33
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): 475 |                 let proc_macro::LineColumn { line, column } = s.start();
[   DEBUG] toltec.builder: build(): |                                 ^^^^^^^^^^ not found in `proc_macro`
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): help: consider importing this struct through its public re-export
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): 1   + use crate::LineColumn;
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): help: if you import `LineColumn`, refer to it directly
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): 475 -                 let proc_macro::LineColumn { line, column } = s.start();
[   DEBUG] toltec.builder: build(): 475 +                 let LineColumn { line, column } = s.start();
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build():
[   DEBUG] toltec.builder: build(): error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`
[   DEBUG] toltec.builder: build(): --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.51/src/wrapper.rs:489:33
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): 489 |                 let proc_macro::LineColumn { line, column } = s.end();
[   DEBUG] toltec.builder: build(): |                                 ^^^^^^^^^^ not found in `proc_macro`
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): help: consider importing this struct through its public re-export
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): 1   + use crate::LineColumn;
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): help: if you import `LineColumn`, refer to it directly
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): 489 -                 let proc_macro::LineColumn { line, column } = s.end();
[   DEBUG] toltec.builder: build(): 489 +                 let LineColumn { line, column } = s.end();
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build():
[   DEBUG] toltec.builder: build(): error[E0635]: unknown feature `proc_macro_span_shrink`
[   DEBUG] toltec.builder: build(): --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.51/src/lib.rs:92:30
[   DEBUG] toltec.builder: build(): |
[   DEBUG] toltec.builder: build(): 92 |     feature(proc_macro_span, proc_macro_span_shrink)
[   DEBUG] toltec.builder: build(): |                              ^^^^^^^^^^^^^^^^^^^^^^
[   DEBUG] toltec.builder: build():
[   DEBUG] toltec.builder: build(): Some errors have detailed explanations: E0422, E0635.
[   DEBUG] toltec.builder: build(): For more information about an error, try `rustc --explain E0422`.
[   DEBUG] toltec.builder: build(): error: could not compile `proc-macro2` (lib) due to 3 previous errors

palfrey avatar Sep 07 '25 09:09 palfrey

I'll look into it. Probably just updating plato in general would solve most issues and is way overdue.

No guarantees to when. Hopefully tomorrow or not much later. 🤞 Will be a good excuse to dust off my rMs again and migrate them to 3.X as well.

LinusCDE avatar Sep 08 '25 12:09 LinusCDE

Just released 0.9.44-rm-release-14. Did some basic testing on rM 1 and 2 and seems to run fine. Also removed HW-Rotate by default on the rM 1 (so it doesn't break launchers).

This release should fix this issue. My other applications also have been update to support newer rust and the newest libremarkable release. So make sure to update them as well (retris, chessmarkable, doomarkable). :D

As for the builtin rM2FB client, I recommend that LIBREMARKABLE_FB_DISFAVOR_INTERNAL_RM2FB=1 is set via their respective wrapper launcher scripts. Then all my apps shouldn't attempt to circumvent any shims (added a section on envs to all my apps, documenting all envs).

Lmk if there are issues.

LinusCDE avatar Sep 16 '25 16:09 LinusCDE