ktwrd / beans-rs

Open-Source Installer for Sourcemods
GNU General Public License v3.0
7 stars 1 forks source link

no method named `message` found for reference `&PanicHookInfo<'_>` in the current scope #13

Closed HurricanePootis closed 5 months ago

HurricanePootis commented 5 months ago

System

Arch Linux rustup nightly

Build environment

Using the AUR script, trying to update to 1.4.3 🐱

The error 😟

error[E0599]: no method named `message` found for reference `&PanicHookInfo<'_>` in the current scope
  --> src/main.rs:60:31
   |
60 |         if let Some(m) = info.message() {
   |                               ^^^^^^^ method not found in `&PanicHookInfo<'_>`

This happens on 1.4.1 through 1.4.3, so maybe perhaps rust nightly changed something.

ktwrd commented 5 months ago

Are you sure that rust nightly is being used? beans-rs was already using rust nightly with v1.3.0 and v1.3.1.

The .message() function is only available on rust nightly and this error will occur when you are not on nightly.

image

You can force rustup to use nightly with the following command (might be either one, I don't have rust on the computer I'm writing this comment from)

rustup override set nightly
# or
rustup default nightly
ktwrd commented 5 months ago

Actually nevermind, that's really weird. I made a fresh github codespace and installed rustup (and nightly) and the build didn't work at all? I've made a tiny change so the commit workflow runs and if that fails then I have no bloody idea why it's suddenly broken!

ktwrd commented 5 months ago

Alrighty, so PanicHookInfo::message() was removed, and is now only available via PanicInfo::message(). (caused by https://github.com/rust-lang/rust/pull/115974)

I'll be looking into a fix in a couple of hours, since I don't want to spend too much money on Github Codespaces.

ktwrd commented 5 months ago

Forced the version to be whatever is on my thinkpad 1.80.0-nightly 2024-05-24. https://github.com/ktwrd/beans-rs/commit/fd653569f147d2e7bef78ea1eabab072e7dbcc1f

ktwrd commented 5 months ago

Confirmed fixed in the latest action.

https://github.com/ktwrd/beans-rs/actions/runs/9514025257