Skip to content

Commit b31d010

Browse files
markbtfacebook-github-bot
authored andcommitted
scsc: depend on srclient only on linux
Summary: Remove `srclient` as a depedency on windows and macos. It's not available there. This means we'll need to find another way to do D71031796 on these platforms, but first let's unbreak the build. Reviewed By: gustavoavena Differential Revision: D71893243 fbshipit-source-id: 59dd0cee453c107a95146d17b0b72c521b3a0ec7
1 parent 12ecfb2 commit b31d010

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

eden/mononoke/scs/client/BUCK

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ rust_binary(
1212
"linux",
1313
[
1414
"//common/rust/build_info:build_info",
15+
"//common/rust/thrift/srclient:srclient",
1516
],
1617
),
1718
(
@@ -52,7 +53,6 @@ rust_binary(
5253
"//common/rust/shed/fbinit:fbinit",
5354
"//common/rust/shed/fbinit:fbinit-tokio",
5455
"//common/rust/shed/hostcaps:hostcaps",
55-
"//common/rust/thrift/srclient:srclient",
5656
"//eden/mononoke/cmdlib/base_app:base_app",
5757
"//eden/mononoke/scs/if:source_control-rust",
5858
"//eden/mononoke/scs/if:source_control-rust-clients",

eden/mononoke/scs/client/src/errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ use source_control_clients::errors::RepoResolveCommitPrefixError;
4242
use source_control_clients::errors::RepoStackGitBundleStoreError;
4343
use source_control_clients::errors::RepoUpdateSubmoduleExpansionError;
4444
use source_control_clients::errors::TreeListError;
45-
use srclient::ErrorReason;
4645

4746
pub(crate) trait SelectionErrorExt {
4847
fn handle_selection_error(self, repo: &thrift::RepoSpecifier) -> Error;
@@ -53,9 +52,10 @@ macro_rules! impl_handle_selection_error {
5352
impl SelectionErrorExt for $type {
5453
fn handle_selection_error(self, repo: &thrift::RepoSpecifier) -> Error {
5554
if let $type::ThriftError(ref err) = self {
55+
#[cfg(not(any(target_os = "macos", target_os = "windows")))]
5656
if let Some(err) = err.downcast_ref::<srclient::TServiceRouterException>() {
5757
if err.is_selection_error()
58-
&& err.error_reason() == ErrorReason::SELECTION_NONEXISTENT_DOMAIN
58+
&& err.error_reason() == srclient::ErrorReason::SELECTION_NONEXISTENT_DOMAIN
5959
{
6060
if let Some(possible_repo_name) = repo.name.strip_suffix(".git") {
6161
return anyhow!("repo does not exist: {}. Try removing the .git suffix (i.e. -R {})", repo.name, possible_repo_name);

0 commit comments

Comments
 (0)