dtolnay / rustversion

Conditional compilation according to rustc compiler version
Apache License 2.0
334 stars 15 forks source link

Unexpected output from `rustc --version`: "rustc 1.52.1-nightly (gentoo)\n" #28

Closed parazyd closed 3 years ago

parazyd commented 3 years ago

Hi, it seems vendors in version strings aren't supported? I'm getting an erroneous output:

error: failed to run custom build command for `rustversion v1.0.4`

Caused by:
  process didn't exit successfully: `/home/[redacted]/target/debug/build/rustversion-b03882390ede0451/build-script-build` (exit code: 1)
  --- stderr
  Error: unexpected output from `rustc --version`: "rustc 1.52.1-nightly (gentoo)\n"

  Please file an issue in https://github.com/dtolnay/rustversion

dtolnay commented 3 years ago

Thanks, fixed in 1.0.5.

gyakovlev commented 3 years ago

thanks, had to add this to gentoo's rust-1.53.0, as it uses 1.0.4 and bootstrap failed. we set

description = "gentoo"

and in some cases

channel = "nightly"

in config.toml

parazyd commented 3 years ago

Since the patch, it works fine for me.