Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/fbcode_builder/manifests/boost
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ job_weight_mib = 512
patchfile = boost_comparator_operator_fix.patch

[b2.args]
link=static,shared
--with-atomic
--with-chrono
--with-container
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/eden
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ fbcode/configerator/structs/scm/hg/public_autocargo = configerator/structs/scm/h
^.*/facebook/.*$
^.*/fb/.*$

[cmake.defines]
PYTHON_EXTENSIONS=ON

[cmake.defines.all(fb=on,os=windows)]
ENABLE_GIT=OFF
INSTALL_PYTHON_LIB=ON
Expand Down
4 changes: 4 additions & 0 deletions build/fbcode_builder/manifests/fbthrift
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ xplat/thrift = thrift
^xplat/thrift/perf/canary.py$
^xplat/thrift/perf/loadtest.py$
^xplat/thrift/.castle/.*

[cmake.defines]
thriftpy3=ON
BUILD_SHARED_LIBS=ON
1 change: 1 addition & 0 deletions build/fbcode_builder/manifests/fmt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ builder = cmake
subdir = fmt-11.0.2

[cmake.defines]
BUILD_SHARED_LIBS = ON
FMT_TEST = OFF
FMT_DOC = OFF

Expand Down
5 changes: 3 additions & 2 deletions build/fbcode_builder/manifests/folly
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ fbcode/folly = folly
^fbcode/folly/public_tld/build/facebook_.*

[cmake.defines]
BUILD_SHARED_LIBS=OFF
BOOST_LINK_STATIC=ON
PYTHON_EXTENSIONS=ON
BUILD_SHARED_LIBS=ON
BOOST_LINK_STATIC=OFF

[cmake.defines.os=freebsd]
LIBDWARF_FOUND=NO
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/mvfst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ repo_url = https://github.com/facebook/mvfst.git
builder = cmake
subdir = .

[cmake.defines]
BUILD_SHARED_LIBS = ON

[cmake.defines.test=on]
BUILD_TESTS = ON

Expand Down
9 changes: 5 additions & 4 deletions eden/fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ members = [
"rust/edenfs-asserted-states",
"rust/edenfs-asserted-states-client",
"rust/redirect_ffi",
"service",
"service/clients",
"service/mocks",
"service/services",
"service/oss-thriftclients",
"service/thrift",
"service/thrift/clients",
"service/thrift/mocks",
"service/thrift/services",
"service/thrift_streaming",
"service/thrift_streaming/clients",
"service/thrift_streaming/mocks",
Expand Down
2 changes: 2 additions & 0 deletions eden/fs/cli_rs/edenfs-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ shlex = "1.3"
strum = { version = "0.27.1", features = ["derive"] }
subprocess = "0.2.9"
sysinfo = "0.35.1"
thrift_thriftclients = { version = "0.1.0", path = "../../service/oss-thriftclients" }
thrift_streaming_clients = { version = "0.1.0", path = "../../service/thrift_streaming/clients" }
thrift_streaming_thriftclients = { version = "0.1.0", path = "../../service/oss-streaming-thriftclients" }
tokio = { version = "1.47.1", features = ["full", "test-util", "tracing"] }
toml = { version = "0.9.2", features = ["preserve_order"] }
tracing = { version = "0.1.41", features = ["attributes", "valuable"] }
Expand Down
4 changes: 4 additions & 0 deletions eden/fs/cli_rs/edenfs-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ license = "GPLv2+"
[dependencies]
anyhow = "1.0.98"
sapling-thrift-types = { version = "0.1.0", path = "../../../scm/lib/thrift-types" }
thrift = { version = "0.1.0", path = "../../service/thrift" }
thiserror = "2.0.12"
thrift_clients = { version = "0.1.0", path = "../../service/thrift/clients" }
thrift_streaming__types = { package = "thrift_streaming", version = "0.1.0", path = "../../service/thrift_streaming" }
thrift_streaming_clients = { version = "0.1.0", path = "../../service/thrift_streaming/clients" }
thrift_thriftclients = { version = "0.1.0", path = "../../service/oss-thriftclients" }
tokio = { version = "1.47.1", features = ["full", "test-util", "tracing"] }
3 changes: 2 additions & 1 deletion eden/fs/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
add_fbthrift_library(
eden_config_thrift
eden_config.thrift
LANGUAGES cpp py
LANGUAGES cpp py py3
PY_NAMESPACE facebook.eden.eden_config
PY3_NAMESPACE eden.fs.config.eden_config
)

file(GLOB CONFIG_SRCS "*.cpp")
Expand Down
1 change: 1 addition & 0 deletions eden/fs/inodes/overlay/overlay.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace py3 facebook.eden
namespace cpp2 facebook.eden.overlay
namespace py facebook.eden.overlay
namespace py3 eden.fs.overlay

typedef binary Hash
typedef string PathComponent
Expand Down
2 changes: 1 addition & 1 deletion eden/fs/py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ add_fb_python_library(
${EDEN_PY_SRCS}
# Also include the generated eden/config.py file
"${CMAKE_CURRENT_BINARY_DIR}/eden/config.py=eden/config.py"
DEPENDS eden_service_thrift_py
DEPENDS eden_service_thrift_py3
)
3 changes: 2 additions & 1 deletion eden/fs/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
add_fbthrift_library(
eden_service_thrift
eden.thrift
LANGUAGES cpp py
LANGUAGES cpp py py3 rust
PY_NAMESPACE facebook.eden
PY3_NAMESPACE eden.fs.service.eden
SERVICES
EdenService
DEPENDS
Expand Down
21 changes: 21 additions & 0 deletions eden/fs/service/oss-streaming-thriftclients/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "thrift_streaming_thriftclients"
version = "0.1.0"
authors = ["Facebook Source Control Team <[email protected]>"]
edition = "2024"

[dependencies]
anyhow = "1.0.98"
edenfs-error = { version = "0.1.0", path = "../../cli_rs/edenfs-error" }
fbinit = { version = "0.2.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
fbthrift_socket = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
syn = { version = "1.0.109" }
thrift_streaming_clients = { version = "0.1.0", path = "../thrift_streaming/clients" }
tokio = { version = "1.45.0", features = ["full", "test-util", "tracing"] }

[lib]
path = "lib.rs"
test = false
doctest = false
doc = false
43 changes: 43 additions & 0 deletions eden/fs/service/oss-streaming-thriftclients/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/

extern crate fbinit;
extern crate fbthrift;
extern crate proc_macro;
extern crate syn;
extern crate thrift_streaming_clients;

use fbthrift::thrift_protocol::ProtocolID;
use std::net::SocketAddr;
use std::path::PathBuf;
use syn::{
parse::{Parse, ParseStream},
parse_macro_input,
};

pub use fbthrift_socket::SocketTransport;
pub use fbthrift::CompactProtocol;
use std::sync::Arc;
pub use thrift_streaming_clients::StreamingEdenServiceExt;
pub use thrift_streaming_clients::StreamingEdenServiceImpl;
pub use edenfs_error::ConnectError;

#[macro_export]
macro_rules! make_StreamingEdenServiceExt_thriftclient {

($fbinit:expr, $($key:ident = $value:expr),* $(,)?) => {
Result::<_, anyhow::Error>::Ok(
Arc::new(<$crate::StreamingEdenServiceImpl<$crate::CompactProtocol, $crate::SocketTransport<tokio::net::UnixStream>>>::new(
$crate::SocketTransport::new(
tokio::net::UnixStream::connect("foo")
.await
.map_err(|e| ConnectError::ConnectionError(e.to_string()))?
)
))
)
};
}
13 changes: 13 additions & 0 deletions eden/fs/service/oss-thriftclients/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "thrift_thriftclients" # this crate’s name
version = "0.1.0"

[dependencies]
# thrift_clients = { version = "0.1.0", path = "../clients" }
thrift__types = { package = "thrift_clients", version = "0.1.0", path = "../thrift/clients" }

[lib]
path = "lib.rs"
test = false
doctest = false
doc = false
13 changes: 13 additions & 0 deletions eden/fs/service/oss-thriftclients/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/

extern crate thrift__types;

pub mod thrift {
pub use ::thrift__types::errors;

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ doc = false
[dependencies]
anyhow = "1.0.98"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
config_thrift = { version = "0.1.0", path = "../config" }
config_thrift = { version = "0.1.0", path = "../../config" }
cpp = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
fb303_core = { version = "0.0.0", git = "https://github.com/facebook/fb303.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ doc = false
anyhow = "1.0.98"
async-trait = "0.1.86"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
config_thrift = { version = "0.1.0", path = "../../config" }
config_thrift_clients = { version = "0.1.0", path = "../../config/clients" }
config_thrift = { version = "0.1.0", path = "../../../config" }
config_thrift_clients = { version = "0.1.0", path = "../../../config/clients" }
cpp = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
cpp_clients = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
fb303_core = { version = "0.0.0", git = "https://github.com/facebook/fb303.git", branch = "main" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ fn main() {
fs::write(cratemap_path, CRATEMAP).expect("Failed to write cratemap");
Config::from_env(GenContext::Clients)
.expect("Failed to instantiate thrift_compiler::Config")
.base_path("../../../..")
.base_path("../../../../..")
.types_crate("thrift__types")
.clients_crate("thrift__clients")
.options("deprecated_default_enum_min_i32")
.run(["../eden.thrift"])
.run(["../../eden.thrift"])
.expect("Failed while running thrift compilation");
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ doc = false
anyhow = "1.0.98"
async-trait = "0.1.86"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
config_thrift = { version = "0.1.0", path = "../../config" }
config_thrift_clients = { version = "0.1.0", path = "../../config/clients" }
config_thrift_mocks = { version = "0.1.0", path = "../../config/mocks" }
config_thrift = { version = "0.1.0", path = "../../../config" }
config_thrift_clients = { version = "0.1.0", path = "../../../config/clients" }
config_thrift_mocks = { version = "0.1.0", path = "../../../config/mocks" }
cpp = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
cpp_clients = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
cpp_mocks = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ fn main() {
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env not provided");
let cratemap_path = Path::new(&out_dir).join("cratemap");
fs::write(cratemap_path, CRATEMAP).expect("Failed to write cratemap");
Config::from_env(GenContext::Types)
Config::from_env(GenContext::Mocks)
.expect("Failed to instantiate thrift_compiler::Config")
.base_path("../../..")
.base_path("../../../../..")
.types_crate("thrift__types")
.clients_crate("thrift__clients")
.options("deprecated_default_enum_min_i32")
.run(["eden.thrift"])
.run(["../../eden.thrift"])
.expect("Failed while running thrift compilation");
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ doc = false
anyhow = "1.0.98"
async-trait = "0.1.86"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
config_thrift = { version = "0.1.0", path = "../../config" }
config_thrift_services = { version = "0.1.0", path = "../../config/services" }
config_thrift = { version = "0.1.0", path = "../../../config" }
config_thrift_services = { version = "0.1.0", path = "../../../config/services" }
cpp = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
cpp_services = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
fb303_core = { version = "0.0.0", git = "https://github.com/facebook/fb303.git", branch = "main" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ fn main() {
fs::write(cratemap_path, CRATEMAP).expect("Failed to write cratemap");
Config::from_env(GenContext::Services)
.expect("Failed to instantiate thrift_compiler::Config")
.base_path("../../../..")
.base_path("../../../../..")
.types_crate("thrift__types")
.clients_crate("thrift__clients")
.options("deprecated_default_enum_min_i32")
.run(["../eden.thrift"])
.run(["../../eden.thrift"])
.expect("Failed while running thrift compilation");
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn main() {
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env not provided");
let cratemap_path = Path::new(&out_dir).join("cratemap");
fs::write(cratemap_path, CRATEMAP).expect("Failed to write cratemap");
Config::from_env(GenContext::Mocks)
Config::from_env(GenContext::Types)
.expect("Failed to instantiate thrift_compiler::Config")
.base_path("../../../..")
.types_crate("thrift__types")
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion eden/fs/service/thrift_streaming/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fbthrift = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbth
futures = { version = "0.3.31", features = ["async-await", "compat"] }
ref-cast = "1.0.18"
thiserror = "2.0.12"
thrift__0 = { package = "thrift", version = "0.1.0", path = ".." }
thrift__0 = { package = "thrift", version = "0.1.0", path = "../thrift" }
thrift__1 = { package = "thrift", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }

[build-dependencies]
Expand Down
5 changes: 2 additions & 3 deletions eden/fs/service/thrift_streaming/clients/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ async-trait = "0.1.86"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
futures = { version = "0.3.31", features = ["async-await", "compat"] }
thrift__0 = { package = "thrift", version = "0.1.0", path = "../.." }
thrift__0_clients = { package = "thrift_clients", version = "0.1.0", path = "../../clients" }
thrift__1 = { package = "thrift", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
thrift__0 = { package = "thrift", version = "0.1.0", path = "../../thrift" }
thrift__0_clients = { package = "thrift_clients", version = "0.1.0", path = "../../thrift/clients" }
thrift__1_clients = { package = "thrift_clients", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
thrift_streaming__types = { package = "thrift_streaming", version = "0.1.0", path = ".." }
tracing = { version = "0.1.41", features = ["attributes", "valuable"] }
Expand Down
6 changes: 3 additions & 3 deletions eden/fs/service/thrift_streaming/mocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ async-trait = "0.1.86"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
futures = { version = "0.3.31", features = ["async-await", "compat"] }
thrift__0 = { package = "thrift", version = "0.1.0", path = "../.." }
thrift__0_clients = { package = "thrift_clients", version = "0.1.0", path = "../../clients" }
thrift__0_mocks = { package = "thrift_mocks", version = "0.1.0", path = "../../mocks" }
thrift__0 = { package = "thrift", version = "0.1.0", path = "../../thrift" }
thrift__0_clients = { package = "thrift_clients", version = "0.1.0", path = "../../thrift/clients" }
thrift__0_mocks = { package = "thrift_mocks", version = "0.1.0", path = "../../thrift/mocks" }
thrift__1 = { package = "thrift", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
thrift__1_clients = { package = "thrift_clients", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
thrift__1_mocks = { package = "thrift_mocks", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
Expand Down
4 changes: 2 additions & 2 deletions eden/fs/service/thrift_streaming/services/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ async-trait = "0.1.86"
codegen_includer_proc_macro = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
futures = { version = "0.3.31", features = ["async-await", "compat"] }
thrift__0 = { package = "thrift", version = "0.1.0", path = "../.." }
thrift__0_services = { package = "thrift_services", version = "0.1.0", path = "../../services" }
thrift__0 = { package = "thrift", version = "0.1.0", path = "../../thrift" }
thrift__0_services = { package = "thrift_services", version = "0.1.0", path = "../../thrift/services" }
thrift__1 = { package = "thrift", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
thrift__1_services = { package = "thrift_services", version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
thrift_streaming__types = { package = "thrift_streaming", version = "0.1.0", path = ".." }
Expand Down
4 changes: 3 additions & 1 deletion eden/integration/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ add_fb_python_library(
SOURCES ${INTEGRATION_LIB_SRCS}
DEPENDS
edenfsctl.real.main_lib
eden_config_thrift_py3
eden_service_thrift_py3
eden_py
eden_service_thrift_py
eden_test_support
fb303::fb303_core_py3
${INTEGRATION_LIB_DEPENDENCIES}
)
4 changes: 2 additions & 2 deletions eden/scm/lib/thrift-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ name = "thrift_types"

[dependencies]
anyhow = "1.0.98"
edenfs = { package = "thrift", version = "0.1.0", path = "../../../fs/service" }
edenfs_clients = { package = "thrift_clients", version = "0.1.0", path = "../../../fs/service/clients" }
edenfs = { package = "thrift", version = "0.1.0", path = "../../../fs/service/thrift" }
edenfs_clients = { package = "thrift_clients", version = "0.1.0", path = "../../../fs/service/thrift/clients" }
edenfs_config = { package = "config_thrift", version = "0.1.0", path = "../../../fs/config" }
fb303_core = { version = "0.0.0", git = "https://github.com/facebook/fb303.git", branch = "main" }
fbthrift = { version = "0.0.1+unstable", git = "https://github.com/facebook/fbthrift.git", branch = "main" }
Expand Down