Skip to content

Commit

Permalink
rust/shed/hostname: rename hostname dependency to unbreak doctests
Browse files Browse the repository at this point in the history
Summary:
With the update from rustc 1.44 to 1.47 the doctests started to break when building a crate that depends on a different crate of the same name, see this: rust-lang/cargo#6819

This diff also removes the TravisCI build as it was broken and unused for some time.

Differential Revision: D24390815

fbshipit-source-id: 8e2047715a83b50c3de4f8c74f0565799185f2ea
  • Loading branch information
lukaspiatkowski authored and facebook-github-bot committed Oct 19, 2020
1 parent ce1a25b commit 7a36595
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 65 deletions.
24 changes: 0 additions & 24 deletions build/fbcode_builder/specs/rust_shed.py

This file was deleted.

38 changes: 0 additions & 38 deletions build/fbcode_builder_config.py

This file was deleted.

2 changes: 1 addition & 1 deletion shed/hostname/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ include = ["src/**/*.rs"]

[dependencies]
anyhow = "1.0"
hostname = "0.3"
hostname_orig = { package = "hostname", version = "0.3" }
4 changes: 2 additions & 2 deletions shed/hostname/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ use anyhow::Result;
pub fn get_hostname() -> Result<String> {
#[cfg(not(fbcode_build))]
{
Ok(::hostname::get()?.to_string_lossy().into_owned())
Ok(::hostname_orig::get()?.to_string_lossy().into_owned())
}

#[cfg(fbcode_build)]
{
use hostname as _; // used in oss
use hostname_orig as _; // used in oss

fbwhoami::FbWhoAmI::get()?
.name
Expand Down

0 comments on commit 7a36595

Please sign in to comment.