Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on macOS with rustc 1.25.0 #233

Closed
andreastt opened this issue Mar 13, 2018 · 4 comments
Closed

Build failure on macOS with rustc 1.25.0 #233

andreastt opened this issue Mar 13, 2018 · 4 comments

Comments

@andreastt
Copy link

sccache fails to build with rustc 1.25.0 or newer on macOS:

   Compiling app_dirs v1.1.1
error[E0282]: type annotations needed
  --> /Users/ato/.cargo/registry/src/github.com-1ecc6299db9ec823/app_dirs-1.1.1/src/imp/platform/macos.rs:10:40
   |
10 |         Ok(Component::RootDir.as_ref().into())
   |                                        ^^^^ cannot infer type for `T`

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0282"
error: Could not compile `app_dirs`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `sccache v0.2.6`, intermediate artifacts can be found at `/var/folders/3z/3yj7t8sx7_55xscc7v57h6p40000gn/T/cargo-install.WphO2iS8aUK8`

Caused by:
  build failed

This is reported to the app_dirs dependency in andybarron/app-dirs-rs#28 and was caused by rust-lang/rust#46985. According to the rustc issue rust-lang/rust#48716 this will not be reverted, and a patch to app_dirs is necessary. One exists, but appears to have stalled, in andybarron/app-dirs-rs#29.

@luser
Copy link
Contributor

luser commented Mar 13, 2018

Wouldn't you know, I disabled CI coverage of Mac with nightly Rust a while ago (because Travis Mac jobs take forever to run). I'm not sure I would have noticed this anyway given that I have nightly CI set to allow failures.

If the app_dirs fix lands and gets released I will absolutely merge a PR to update to the fixed version.

@luser luser closed this as completed in c13e04d Mar 21, 2018
@luser
Copy link
Contributor

luser commented Mar 21, 2018

I fixed this by removing app_dirs and switching to the directories crate.

@luser
Copy link
Contributor

luser commented Mar 23, 2018

This broke the mac Rust 1.21 build:
https://travis-ci.org/mozilla/sccache/jobs/356333681

Apparently directories is using the Try implementation on Option, which first appeared in 1.22.

@luser
Copy link
Contributor

luser commented Mar 23, 2018

I bumped the minimum supported Rust version to 1.22:
ae9517a

aidanhs pushed a commit to aidanhs/sccache that referenced this issue May 17, 2018
The `app_dirs` crate has become unmaintained and is broken on macOS with
Rust 1.25. The `directories` crate provides the same functionality and
is maintained, so switch to using that instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants