Skip to content

Commit

Permalink
feat: Backport debug_client opt
Browse files Browse the repository at this point in the history
* Need to update sentry and googleapis in order to compile.

Closes #779
  • Loading branch information
jrconlin committed Aug 12, 2020
1 parent ea403d4 commit bda5a73
Show file tree
Hide file tree
Showing 21 changed files with 2,823 additions and 3,197 deletions.
558 changes: 332 additions & 226 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ num_cpus = "1"
protobuf = "2.15"
rand = "0.7"
regex = "1.3"
sentry = { version = "0.18", features = ["with_curl_transport"] }
sentry = { version = "0.19", features = ["with_curl_transport"] }
serde = "1.0"
serde_derive = "1.0"
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
Expand Down
12 changes: 5 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
extern crate slog_scope;

use std::error::Error;
use std::sync::Arc;

use docopt::Docopt;
use serde_derive::Deserialize;
Expand Down Expand Up @@ -36,17 +37,14 @@ async fn main() -> Result<(), Box<dyn Error>> {
// likely grpcio's boringssl
let curl_transport_factory = |options: &sentry::ClientOptions| {
// Note: set options.debug = true when diagnosing sentry issues.
Box::new(sentry::transports::CurlHttpTransport::new(&options))
as Box<dyn sentry::internals::Transport>
Arc::new(sentry::transports::CurlHttpTransport::new(&options))
as Arc<dyn sentry::internals::Transport>
};
let sentry = sentry::init(sentry::ClientOptions {
transport: Box::new(curl_transport_factory),
let _sentry = sentry::init(sentry::ClientOptions {
transport: Some(Arc::new(curl_transport_factory)),
release: sentry::release_name!(),
..sentry::ClientOptions::default()
});
if sentry.is_enabled() {
sentry::integrations::panic::register_panic_handler();
}

// Setup and run the server
let banner = settings.banner();
Expand Down
2 changes: 1 addition & 1 deletion vendor/mozilla-rust-sdk/googleapis-raw/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
futures = "0.3.5"
grpcio = "0.6.0"
protobuf = "2.15.0"
protobuf = "2.17.0"

[dev-dependencies]
slog = "2.5"
Expand Down
46 changes: 18 additions & 28 deletions vendor/mozilla-rust-sdk/googleapis-raw/src/empty.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 2.15.0. Do not edit
// This file is generated by rust-protobuf 2.17.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
Expand All @@ -15,17 +15,13 @@
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `empty.proto`
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;

/// Generated files are compatible only with the same version
/// of protobuf runtime.
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_15_0;
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_17_0;

#[derive(PartialEq,Clone,Default)]
pub struct Empty {
Expand Down Expand Up @@ -95,7 +91,7 @@ impl ::protobuf::Message for Empty {
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}

Expand All @@ -108,24 +104,20 @@ impl ::protobuf::Message for Empty {
}

fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new_pb_name::<Empty>(
"Empty",
fields,
file_descriptor_proto()
)
})
}
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new_pb_name::<Empty>(
"Empty",
fields,
file_descriptor_proto()
)
})
}

fn default_instance() -> &'static Empty {
static mut instance: ::protobuf::lazy::Lazy<Empty> = ::protobuf::lazy::Lazy::INIT;
unsafe {
instance.get(Empty::new)
}
static instance: ::protobuf::rt::LazyV2<Empty> = ::protobuf::rt::LazyV2::INIT;
instance.get(Empty::new)
}
}

Expand Down Expand Up @@ -173,16 +165,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\
oto3\
";

static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT;
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
Loading

0 comments on commit bda5a73

Please sign in to comment.