Closed Bug 1701418 Opened 5 years ago Closed 5 years ago

Compilation error with rust 1.51.0: "panic message is not a string literal"

Categories

(Testing :: Mozbase Rust, task)

Default
task

Tracking

(firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(2 files)

STR: rustup update stable && mach build

Compilation fails with:

 0:58.45 error: panic message is not a string literal
 0:58.45    --> testing/mozbase/rust/mozprofile/src/prefreader.rs:258:33
 0:58.46     |
 0:58.46 258 |                     x => panic!(format!("Boolean wasn't 'true' or 'false' (was {})", x)),
 0:58.46     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 0:58.46     |
 0:58.46     = note: `-D non-fmt-panic` implied by `-D warnings`
 0:58.46     = note: this is no longer accepted in Rust 2021
 0:58.46     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
Assignee: nobody → kats

It looks like the relevant code is in the rust version of mozprofile, which AFAICT is only included by geckodriver and that in turn is only enabled under certain conditions which seem to exclude in automation?

I also added a couple of wrench jobs to your try push and they failed as I would expect (this is fixed by the second patch on this bug). wrench doesn't get compiled except when running specific jobs that use it.

(In reply to Kartikaya Gupta (email:kats@mozilla.staktrace.com) from comment #6)

It looks like the relevant code is in the rust version of mozprofile, which AFAICT is only included by geckodriver and that in turn is only enabled under certain conditions which seem to exclude in automation?

The geckodriver build jobs are toolchain jobs and run separate from the build ones. You can find them in Treeherder as gd. Note that I'm going to add a new geckodriver preset for try via bug 1700454 so that it makes it easier to include all relevant jobs.

I'm going to go ahead and trigger lando for part 1 here, to reduce potential for dupes cropping up while we're waiting for part 2.

(This morning I independently noticed & filed & posted a patch for the "part 1" warning, over in bug 1701700.)

Keywords: leave-open
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d88e4618dd97 Make panic call compatible with rustc 1.51.0. r=webdriver-reviewers,jgraham

Feel free to also r+/lando on part 2, it's pretty trivial

I tagged nical as an alternate reviewer on phabricator; hopefully he or kvark can r+ and trigger lando soonish.

Pushed by kgupta@mozilla.staktrace.com: https://hg.mozilla.org/integration/autoland/rev/3c06a6fd2c86 Make wrench assert calls compatible with rustc 1.51.0. r=kvark
Blocks: 1700562
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: