Skip to content

Commit

Permalink
rust/shed/hostname: rename hostname dependency to unbreak doctests (f…
Browse files Browse the repository at this point in the history
…acebookexperimental#15)

Summary:
Pull Request resolved: facebookexperimental#15

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.

Reviewed By: krallin

Differential Revision: D24390815

fbshipit-source-id: fa9c78ef394640afbf8c419f8276bbf339960406
  • Loading branch information
lukaspiatkowski committed Oct 21, 2020
1 parent 4a7ff73 commit 1190482
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 1190482

Please sign in to comment.