Skip to content

Commit

Permalink
chore: rename glaredb -> cli crate (#2830)
Browse files Browse the repository at this point in the history
  • Loading branch information
tychoish authored Apr 4, 2024
1 parent 5b517d5 commit e8ff7a9
Show file tree
Hide file tree
Showing 33 changed files with 60 additions and 66 deletions.
94 changes: 46 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions bindings/nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ crate-type = ["cdylib"]
workspace = true

[dependencies]
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
ioutil = { path = "../../crates/ioutil" }
sqlexec = { path = "../../crates/sqlexec" }
metastore = { path = "../../crates/metastore" }
Expand All @@ -19,7 +18,6 @@ pgsrv = { path = "../../crates/pgsrv" }
pgrepr = { path = "../../crates/pgrepr" }
datafusion_ext = { path = "../../crates/datafusion_ext" }
arrow_util = { path = "../../crates/arrow_util" }
glaredb = { path = "../../crates/glaredb" }
terminal_util = { path = "../../crates/terminal_util" }
futures = { workspace = true }
datafusion = { workspace = true }
Expand All @@ -29,13 +27,11 @@ anyhow = { workspace = true }
async-trait = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
lzma-sys = { version = "*", features = ["static"] } # Prevent dynamic linking of lzma, which comes from datafusion
napi = { version = "2.16.1", default-features = false, features = ["full"] }
napi-derive = "2.16.1"
once_cell = "1.19.0"
bytes = "1.6.0"

# Prevent dynamic linking of lzma, which comes from datafusion
lzma-sys = { version = "*", features = ["static"] }

[build-dependencies]
napi-build = "2.1.2"
4 changes: 2 additions & 2 deletions bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ pgsrv = { path = "../../crates/pgsrv" }
pgrepr = { path = "../../crates/pgrepr" }
datafusion_ext = { path = "../../crates/datafusion_ext" }
arrow_util = { path = "../../crates/arrow_util" }
glaredb = { path = "../../crates/glaredb" }
# glaredb = { path = "../../crates/glaredb" }
terminal_util = { path = "../../crates/terminal_util" }
futures = { workspace = true }
uuid = "1.8.0"
async-trait = { workspace = true }
once_cell = "1.19.0"

# Prevent dynamic linking of lzma, which comes from datafusion
lzma-sys = { version = "*", features = ["static"] }
lzma-sys = { version = "*", features = ["static"] }
2 changes: 1 addition & 1 deletion crates/bench_runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ workspace = true

[dependencies]
logutil = {path = "../logutil"}
glaredb = {path = "../glaredb"}
cli = {path = "../cli"}
pgsrv = {path = "../pgsrv"}
anyhow = { workspace = true }
async-trait = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/bench_runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::{Duration, SystemTime};

use anyhow::Result;
use clap::Parser;
use glaredb::server::ComputeServer;
use cli::server::ComputeServer;
use glob::glob;
use pgsrv::auth::SingleUserAuthenticator;
use tokio::net::TcpListener;
Expand Down
2 changes: 1 addition & 1 deletion crates/glaredb/Cargo.toml → crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "glaredb"
name = "cli"
version = { workspace = true }
edition = { workspace = true }

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions crates/glaredb/src/bin/main.rs → crates/cli/src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use clap::{Parser, ValueEnum};
use glaredb::args::LocalArgs;
use glaredb::commands::Commands;
use cli::args::LocalArgs;
use cli::commands::Commands;

#[derive(Debug, Clone, Copy, ValueEnum, Default)]
enum LoggingMode {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use glaredb::args::{LocalClientOpts, StorageConfigArgs};
use glaredb::local::LocalSession;
use glaredb::server::ComputeServer;
use cli::args::{LocalClientOpts, StorageConfigArgs};
use cli::local::LocalSession;
use cli::server::ComputeServer;
use tokio::net::TcpListener;

#[tokio::test]
Expand Down Expand Up @@ -30,7 +30,7 @@ async fn test_drop_tables_removes_files() {
},
timing: false,
ignore_rpc_auth: true,
mode: glaredb::args::OutputMode::Table,
mode: cli::args::OutputMode::Table,
max_width: None,
max_rows: None,
disable_tls: true,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::Duration;
use assert_cmd::cmd::Command;

pub fn make_cli() -> Command {
Command::cargo_bin(env!("CARGO_PKG_NAME")).expect("Failed to find binary")
Command::cargo_bin("glaredb").expect("Failed to find binary")
}

#[allow(dead_code)] // Used in the tests. IDK why clippy is complaining about it.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
src = ./.;
doCheck = false;
nativeBuildInputs = with pkgs; [ protobuf ];
buildAndTestSubdir = "crates/glaredb";
buildAndTestSubdir = "crates/cli";
preBuild = ''
export PROTOC=${pkgs.protobuf}/bin/protoc
'';
Expand Down

0 comments on commit e8ff7a9

Please sign in to comment.