https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-father-404

01/11/2021, 11:54 PM
Nice! Only blocker was that Prost requires
protoc
being installed in the environment because there's no precompiled binary.
Copy code
failures:
    local_tests::garbage_collect_and_compact

test result: FAILED. 110 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out
w

witty-crayon-22786

01/12/2021, 12:30 AM
oh, yikes. TIL.
maybe there is a prost
feature
that we could enable there…? cc @fast-nail-55400
h

hundreds-father-404

01/12/2021, 12:36 AM
No it's purely because of macOS Silicon not having a prebuilt binary. I opened an issue with Prost to tweak their docs for instructions while we wait for protobuf to start releasing dedicated binaries
w

witty-crayon-22786

01/12/2021, 12:36 AM
ah, got it.
sorry
h

hundreds-father-404

01/12/2021, 12:37 AM
(To clarify, normally Prost uses it's vendored protoc)
f

fast-nail-55400

01/12/2021, 12:39 AM
good to know. It’d be concerning if I’ve just been lucky that Prost has been working all this time
w

witty-crayon-22786

01/12/2021, 12:40 AM
yea, sorry… i thought that that was what was up
f

fast-nail-55400

01/12/2021, 12:41 AM
according to the source, we can get PROTOC env var to point at the binary to use
which would provide a work-around in the meantime for ARM
i.e., build a Apple silicon protoc or use the Intel-compiled version
although we may need to upgrade Prost, they seem to already use the Rosetta version :
Copy code
/// Returns the path to the bundled `protoc`, if it is available for the host platform.
#[cfg(not(target_env = "musl"))]
fn bundled_protoc() -> Option<PathBuf> {
    let protoc_bin_name = match (env::consts::OS, env::consts::ARCH) {
        ("linux", "x86") => "protoc-linux-x86_32",
        ("linux", "x86_64") => "protoc-linux-x86_64",
        ("linux", "aarch64") => "protoc-linux-aarch_64",
        ("macos", "x86_64") => "protoc-osx-x86_64",
        ("macos", "aarch64") => "protoc-osx-x86_64", // will be translated to aarch64 by Rosetta
        ("windows", _) => "protoc-win32.exe",
        _ => return None,
    };

    Some(bundle_path().join(protoc_bin_name))
}
("macos", "aarch64") => "protoc-osx-x86_64", // will be translated to aarch64 by Rosetta
although upgrading Prost is complicated by the switch to Bytes 1.0 crate
I’d wait for the Tonic upgrade for Tokio 1.0
those upgrades will also use Bytes 1.0
h

hundreds-father-404

01/12/2021, 4:05 PM