Skip to content

Commit

Permalink
Update dependencies (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen authored Jan 27, 2025
1 parent af6a1bd commit 2745284
Show file tree
Hide file tree
Showing 64 changed files with 326 additions and 320 deletions.
325 changes: 165 additions & 160 deletions Cargo.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ heck = "0.5.0"

[dependencies]
edgeql-parser = {git = "https://github.com/edgedb/edgedb"}
edgedb-protocol = {git = "https://github.com/edgedb/edgedb-rust/", features=["all-types"]}
edgedb-derive = {git = "https://github.com/edgedb/edgedb-rust/"}
edgedb-errors = {git = "https://github.com/edgedb/edgedb-rust/"}
edgedb-tokio = {git = "https://github.com/edgedb/edgedb-rust/", features=["admin_socket", "unstable"]}
gel-protocol = {git = "https://github.com/edgedb/edgedb-rust/", features=["all-types"]}
gel-derive = {git = "https://github.com/edgedb/edgedb-rust/"}
gel-errors = {git = "https://github.com/edgedb/edgedb-rust/"}
gel-tokio = {git = "https://github.com/edgedb/edgedb-rust/", features=["admin_socket", "unstable"]}
snafu = "0.8.4"
ansi-escapes = "0.2"
anyhow = "1.0.23"
Expand Down Expand Up @@ -69,7 +69,7 @@ serde_json = {version="1.0", features=["preserve_order"]}
serde_path_to_error = "0.1.3"
serde_str = {git="https://github.com/tailhook/serde-str"}
serde_millis = "0.1.1"
dirs = "5.0"
dirs = "6.0"
uuid = {version="1.1.2", features=["serde", "v4", "fast-rng"]}
prettytable-rs = {version="0.10.0", default-features=false}
tempfile = "3.1.0"
Expand All @@ -86,7 +86,7 @@ reqwest = {version="0.12.8", default-features=false, features=["json", "rustls-t
reqwest-middleware = {version = "0.3.0", features=["json"]}
reqwest-retry = "0.6.0"
tracing = "0.1.26"
thiserror = "1.0.16"
thiserror = "2.0.11"
which = {version="6", default-features=false}
indexmap = {workspace=true}
term = "1.0"
Expand All @@ -97,7 +97,7 @@ combine = "4.2.1"
sha2 = "0.10.2"
base32 = "0.5.1"
rand = "0.8.2"
downcast-rs = "1.2.0"
downcast-rs = "2.0.0"
base64 = "0.22.1"
ring = {version="0.17.7", features=["std"]}
shell-escape = "0.1.5"
Expand All @@ -110,7 +110,7 @@ toml = "0.8.19"
termimad = {workspace=true}
minimad = "0.13.1"
edgedb-cli-derive = { path="edgedb-cli-derive" }
fs-err = "2.6.0"
fs-err = "3.1.0"
pem = "3.0.3"
rustls = { version = "0.23", features = ["ring"], default-features = false }
tokio-stream = "0.1.11"
Expand All @@ -131,7 +131,7 @@ tokio = {version="1.23.0",features=[
"macros", "rt", "rt-multi-thread", "fs", "process", "io-std", "net",
]}
dissimilar = "1.0.6"
notify = "6.1"
notify = "8.0"
gethostname = "0.5.0"
bitvec = "1.0.1"
nom = "7.1.3"
Expand Down
4 changes: 2 additions & 2 deletions src/analyze/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use anyhow::Context;
use tokio::fs;
use tokio::io::{self, AsyncWriteExt};

use edgedb_errors::ParameterTypeMismatchError;
use edgedb_tokio::raw::Description;
use gel_errors::ParameterTypeMismatchError;
use gel_tokio::raw::Description;

use crate::classify;
use crate::cli::env::Env;
Expand Down
2 changes: 1 addition & 1 deletion src/branch/connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::ops::Deref;
use crate::commands::Options;
use crate::connect::{Connection, ConnectionError, Connector};
use crate::print;
use edgedb_errors::UnknownDatabaseError;
use gel_errors::UnknownDatabaseError;
use uuid::Uuid;

pub struct BranchConnection<'a> {
Expand Down
2 changes: 1 addition & 1 deletion src/branch/context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use edgedb_tokio::{get_project_path, get_stash_path};
use gel_tokio::{get_project_path, get_stash_path};

use crate::branding::BRANDING_CLOUD;
use crate::commands::Options;
Expand Down
2 changes: 1 addition & 1 deletion src/cli/env.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use edgedb_tokio::define_env;
use gel_tokio::define_env;
use std::path::PathBuf;

define_env! {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use std::str::FromStr;
use anyhow::Context;
use clap_complete::{generate, shells};
use const_format::concatcp;
use edgedb_tokio::get_stash_path;
use fn_error_context::context;
use gel_tokio::get_stash_path;
use prettytable::{Cell, Row, Table};

use crate::branding::BRANDING_CLI_CMD_ALT_FILE;
Expand Down
6 changes: 3 additions & 3 deletions src/cloud/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ impl CloudClient {
let profile = if let Some(p) = options_profile.clone() {
Some(p)
} else {
edgedb_tokio::env::Env::cloud_profile()?
gel_tokio::env::Env::cloud_profile()?
};
let secret_key = if let Some(secret_key) = options_secret_key {
Some(secret_key.into())
} else if let Some(secret_key) = Env::cloud_secret_key()? {
Some(secret_key)
} else if let Some(secret_key) = edgedb_tokio::env::Env::secret_key()? {
} else if let Some(secret_key) = gel_tokio::env::Env::secret_key()? {
Some(secret_key)
} else {
match fs::read_to_string(cloud_config_file(&profile)?) {
Expand Down Expand Up @@ -164,7 +164,7 @@ impl CloudClient {
};

let api_endpoint = reqwest::Url::parse(&api_endpoint)?;
if let Some(cloud_certs) = edgedb_tokio::env::Env::_cloud_certs()? {
if let Some(cloud_certs) = gel_tokio::env::Env::_cloud_certs()? {
log::info!("Using cloud certs for {cloud_certs:?}");
let root = cloud_certs.root();
log::trace!("{root}");
Expand Down
4 changes: 2 additions & 2 deletions src/cloud/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::time::{Duration, Instant};

use anyhow::Context;
use const_format::concatcp;
use edgedb_tokio::credentials::Credentials;
use edgedb_tokio::Builder;
use gel_tokio::credentials::Credentials;
use gel_tokio::Builder;
use indicatif::ProgressBar;
use tokio::time::{sleep, timeout};

Expand Down
6 changes: 3 additions & 3 deletions src/commands/backslash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use once_cell::sync::Lazy;
use prettytable::{Cell, Row, Table};
use regex::Regex;

use edgedb_errors::display::display_error_verbose;
use edgedb_errors::Error;
use edgedb_protocol::model::Duration;
use gel_errors::display::display_error_verbose;
use gel_errors::Error;
use gel_protocol::model::Duration;

use crate::analyze;
use crate::branding::BRANDING;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use tokio::task;

use tokio_stream::StreamExt;

use edgedb_errors::UnknownDatabaseError;
use gel_errors::UnknownDatabaseError;

use crate::commands::list_databases::get_databases;
use crate::commands::parser::{Dump as DumpOptions, DumpFormat};
Expand Down Expand Up @@ -210,7 +210,7 @@ pub async fn dump_all(
dump_db(&mut db_conn, options, &filename, include_secrets, true).await?;
}
Err(err) => {
if let Some(e) = err.downcast_ref::<edgedb_errors::Error>() {
if let Some(e) = err.downcast_ref::<gel_errors::Error>() {
if e.is::<UnknownDatabaseError>() {
eprintln!("Database {database} no longer exists, skipping...");
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/execute.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::connect::Connection;
use edgedb_tokio::server_params::{PostgresAddress, PostgresDsn};
use gel_tokio::server_params::{PostgresAddress, PostgresDsn};

use crate::analyze;
use crate::branch;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filter.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::borrow::Cow;

use crate::connect::Connection;
use edgedb_errors::Error;
use edgedb_protocol::QueryResult;
use gel_errors::Error;
use gel_protocol::QueryResult;

pub async fn query<R>(
cli: &mut Connection,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/list_aliases.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use prettytable::{Cell, Row, Table};

use edgedb_derive::Queryable;
use gel_derive::Queryable;
use is_terminal::IsTerminal;

use crate::commands::filter;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/list_casts.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use prettytable::{Cell, Row, Table};

use edgedb_derive::Queryable;
use gel_derive::Queryable;
use is_terminal::IsTerminal;

use crate::commands::filter;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/list_indexes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use prettytable::{Cell, Row, Table};

use edgedb_derive::Queryable;
use gel_derive::Queryable;
use is_terminal::IsTerminal;

use crate::commands::filter;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/list_object_types.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use prettytable::{Cell, Row, Table};

use edgedb_derive::Queryable;
use gel_derive::Queryable;
use is_terminal::IsTerminal;
use terminal_size::{terminal_size, Width};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/list_scalar_types.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use prettytable::{Cell, Row, Table};

use edgedb_derive::Queryable;
use gel_derive::Queryable;
use is_terminal::IsTerminal;
use terminal_size::{terminal_size, Width};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/psql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::process::Command;
use crate::branding::BRANDING;
use crate::connect::Connection;
use anyhow::Context;
use edgedb_tokio::server_params::{PostgresAddress, PostgresDsn};
use gel_tokio::server_params::{PostgresAddress, PostgresDsn};

use crate::commands::Options;
use crate::interrupt;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use tokio::fs;
use tokio::io::{self, AsyncRead, AsyncReadExt};
use tokio_stream::Stream;

use edgedb_errors::{Error, ErrorKind, UserError};
use edgeql_parser::helpers::quote_name;
use edgeql_parser::preparser::is_empty;
use gel_errors::{Error, ErrorKind, UserError};

use crate::branding::BRANDING;
use crate::commands::list_databases;
Expand Down
10 changes: 5 additions & 5 deletions src/commands/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn show_ui(cmd: &UI, opts: &Options) -> anyhow::Result<()> {
let cfg = connector.get()?;

let url = match cfg.instance_name() {
Some(edgedb_tokio::InstanceName::Cloud {
Some(gel_tokio::InstanceName::Cloud {
org_slug: org,
name,
}) => get_cloud_ui_url(cmd, org, name, cfg, opts)?,
Expand All @@ -43,7 +43,7 @@ fn get_cloud_ui_url(
cmd: &UI,
org: &str,
name: &str,
cfg: &edgedb_tokio::Config,
cfg: &gel_tokio::Config,
opts: &Options,
) -> anyhow::Result<String> {
let client = cloud::client::CloudClient::new(&opts.cloud_options)?;
Expand All @@ -61,7 +61,7 @@ fn get_cloud_ui_url(
Ok(url)
}

fn get_local_ui_url(cmd: &UI, cfg: &edgedb_tokio::Config) -> anyhow::Result<String> {
fn get_local_ui_url(cmd: &UI, cfg: &gel_tokio::Config) -> anyhow::Result<String> {
let secret_key = _get_local_ui_secret_key(cfg)?;
let mut url = _get_local_ui_url(cmd, cfg)?;

Expand All @@ -72,7 +72,7 @@ fn get_local_ui_url(cmd: &UI, cfg: &edgedb_tokio::Config) -> anyhow::Result<Stri
Ok(url)
}

fn _get_local_ui_url(cmd: &UI, cfg: &edgedb_tokio::Config) -> anyhow::Result<String> {
fn _get_local_ui_url(cmd: &UI, cfg: &gel_tokio::Config) -> anyhow::Result<String> {
let mut url = cfg
.http_url(false)
.map(|s| s + "/ui")
Expand Down Expand Up @@ -130,7 +130,7 @@ fn _get_local_ui_url(cmd: &UI, cfg: &edgedb_tokio::Config) -> anyhow::Result<Str
Ok(url)
}

fn _get_local_ui_secret_key(cfg: &edgedb_tokio::Config) -> anyhow::Result<Option<String>> {
fn _get_local_ui_secret_key(cfg: &gel_tokio::Config) -> anyhow::Result<Option<String>> {
let local_inst = cfg.local_instance_name();
let local_info = local_inst
.map(local::InstanceInfo::try_read)
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::fs;
use std::path::{Path, PathBuf};
use std::str::FromStr;

use edgedb_protocol::model::Duration;
use fn_error_context::context;
use gel_protocol::model::Duration;

use crate::platform::config_dir;
use crate::repl;
Expand Down
43 changes: 22 additions & 21 deletions src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@ use std::task::{Context, Poll};
use std::time::Duration;

use bytes::Bytes;
use edgedb_protocol::annotations::Warning;

use tokio::time::sleep;
use tokio_stream::Stream;

use edgedb_errors::{ClientError, NoDataError, ProtocolEncodingError};
use edgedb_errors::{Error, ErrorKind, ResultExt};
use edgedb_protocol::client_message::{CompilationOptions, State};
use edgedb_protocol::common::{Capabilities, Cardinality, IoFormat};
use edgedb_protocol::descriptors::{RawTypedesc, Typedesc};
use edgedb_protocol::encoding::Annotations;
use edgedb_protocol::features::ProtocolVersion;
use edgedb_protocol::model::Uuid;
use edgedb_protocol::query_arg::QueryArgs;
use edgedb_protocol::server_message::CommandDataDescription1;
use edgedb_protocol::server_message::RawPacket;
use edgedb_protocol::server_message::TransactionState;
use edgedb_protocol::value::Value;
use edgedb_protocol::QueryResult;
use edgedb_tokio::raw::{self, PoolState, Response};
use edgedb_tokio::server_params::ServerParam;
use edgedb_tokio::Config;
use gel_errors::{ClientError, NoDataError, ProtocolEncodingError};
use gel_errors::{Error, ErrorKind, ResultExt};
use gel_protocol::annotations::Warning;
use gel_protocol::client_message::{CompilationOptions, State};
use gel_protocol::common::{Capabilities, Cardinality, IoFormat};
use gel_protocol::descriptors::{RawTypedesc, Typedesc};
use gel_protocol::encoding::Annotations;
use gel_protocol::features::ProtocolVersion;
use gel_protocol::model::Uuid;
use gel_protocol::query_arg::QueryArgs;
use gel_protocol::server_message::CommandDataDescription1;
use gel_protocol::server_message::RawPacket;
use gel_protocol::server_message::TransactionState;
use gel_protocol::value::Value;
use gel_protocol::QueryResult;
use gel_tokio::raw::{self, PoolState, Response};
use gel_tokio::server_params::ServerParam;
use gel_tokio::Config;

use crate::branding::{BRANDING, BRANDING_CLOUD, QUERY_TAG, REPL_QUERY_TAG};
use crate::hint::ArcError;
Expand Down Expand Up @@ -187,11 +188,11 @@ impl Connector {

fn warning_msg(&self, cfg: &Config) -> String {
let desc = match cfg.instance_name() {
Some(edgedb_tokio::InstanceName::Cloud {
Some(gel_tokio::InstanceName::Cloud {
org_slug: org,
name,
}) => format!("{BRANDING_CLOUD} instance '{org}/{name}'"),
Some(edgedb_tokio::InstanceName::Local(name)) => {
Some(gel_tokio::InstanceName::Local(name)) => {
format!("{BRANDING} instance '{}' at {}", name, cfg.display_addr())
}
_ => format!("{BRANDING} instance at {}", cfg.display_addr()),
Expand Down Expand Up @@ -533,7 +534,7 @@ fn make_ignore_error_state(desc: &RawTypedesc) -> State {
_make_ignore_error_state(desc).unwrap_or(State::empty())
}

#[derive(edgedb_derive::ConfigDelta)]
#[derive(gel_derive::ConfigDelta)]
struct ErrorState {
force_database_error: &'static str,
}
Expand Down
4 changes: 2 additions & 2 deletions src/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use anyhow::Context;
use fn_error_context::context;
use fs_err as fs;

use edgedb_tokio::credentials::Credentials;
use edgedb_tokio::Config;
use gel_tokio::credentials::Credentials;
use gel_tokio::Config;

use crate::platform::{config_dir, tmp_file_name};
use crate::portable::local::is_valid_local_instance_name;
Expand Down
4 changes: 2 additions & 2 deletions src/error_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use codespan_reporting::term::emit;
use colorful::core::color_string::CString;
use colorful::Colorful;
use const_format::concatcp;
use edgedb_protocol::annotations::Warning;
use gel_protocol::annotations::Warning;
use termcolor::{ColorChoice, StandardStream};

use edgedb_errors::{Error, InternalServerError};
use gel_errors::{Error, InternalServerError};

use crate::branding::BRANDING_CLI_CMD;
use crate::print::{self, msg};
Expand Down
Loading

0 comments on commit 2745284

Please sign in to comment.