Closed Bug 1467728 Opened 6 years ago Closed 6 years ago

[mozrunner] error[E0599]: no method named `to_path_buf` found for type `&str` in the current scope

Categories

(Testing :: Mozbase Rust, defect)

defect
Not set
normal

Tracking

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox60 unaffected, firefox61 unaffected, firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox60 --- unaffected
firefox61 --- unaffected
firefox62 --- fixed

People

(Reporter: whimboo, Assigned: ato)

References

Details

(Keywords: regression)

Attachments

(1 file)

Today I tried to compile geckodriver but it fails with an error in mozrunner. As it looks like the changes from bug 1464995 are conflicting. Not sure why this isn't visible in CI.

   Compiling mozrunner v0.6.1 (file:///Volumes/data/code/gecko/testing/mozbase/rust/mozrunner)
error[E0599]: no method named `to_path_buf` found for type `&str` in the current scope
   --> testing/mozbase/rust/mozrunner/src/runner.rs:382:42
    |
382 |                 (_, false) => trial_path.to_path_buf(),
    |                                          ^^^^^^^^^^^

error[E0308]: mismatched types
   --> testing/mozbase/rust/mozrunner/src/runner.rs:385:29
    |
385 |                 return Some(path);
    |                             ^^^^
    |                             |
    |                             expected struct `std::path::PathBuf`, found reference
    |                             help: try using a conversion method: `path.to_path_buf()`
    |
    = note: expected type `std::path::PathBuf`
               found type `&std::path::PathBuf`
Flags: needinfo?(ato)
It doesn’t show on try because we don’t compile geckodriver on
macOS, and this is in a #[cfg(target_os = "macos")] block.
Flags: needinfo?(ato)
So should we revert this particular change which even for styling only.
Reverting seems excessive.  It’s easy enough to fix.
Assignee: nobody → ato
Status: NEW → ASSIGNED
(In reply to Andreas Tolfsen 「:ato」 from comment #3)
> Reverting seems excessive.  It’s easy enough to fix.

Hm? The attached patch exactly reverts the changes to those lines. So maybe you missunderstood me. My intention was not to revert the whole patch...
Comment on attachment 8984418 [details]
Bug 1467728 - Fix mozrunner build on macOS.

https://reviewboard.mozilla.org/r/250254/#review256580
Attachment #8984418 - Flags: review?(hskupin) → review+
upin (:whimboo) from comment #5)

> (In reply to Andreas Tolfsen 「:ato」 from comment #3)  
> 
> > Reverting seems excessive.  It’s easy enough to fix.
> 
> Hm? The attached patch exactly reverts the changes to those
> lines. So maybe you missunderstood me. My intention was not to
> revert the whole patch...

Right, I thought you meant (1) back out original patches, (2)
re-apply patches without bug.

Thanks for the review.
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd482a0086c4
Fix mozrunner build on macOS. r=whimboo
https://hg.mozilla.org/mozilla-central/rev/dd482a0086c4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: