mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-20 17:02:53 -04:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b29f96b90 | ||
|
|
fb7cddbac7 | ||
|
|
0192c8edc8 | ||
|
|
6444bb07b0 | ||
|
|
57850eeb41 | ||
|
|
ffc1aacff9 | ||
|
|
9c2e0f998d |
Generated
+1274
-1101
File diff suppressed because it is too large
Load Diff
@@ -27,9 +27,9 @@ my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
serde = "1.0.125"
|
||||
serde_derive = "1.0.125"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "sqlite", "runtime-tokio-native-tls", "chrono" ] }
|
||||
sqlx-core = { version = "0.7.2" }
|
||||
sqlx-mysql= { version = "0.7.2" }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "sqlite", "runtime-tokio-native-tls", "chrono" ] }
|
||||
sqlx-core = { version = "0.8.2" }
|
||||
sqlx-mysql= { version = "0.8.2" }
|
||||
|
||||
utoipa = { version = "4", features = ["chrono","actix_extras"] }
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
serde = "1.0.125"
|
||||
serde_derive = "1.0.125"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "sqlite", "runtime-tokio-native-tls", "chrono" ] }
|
||||
sqlx-core = { version = "0.7.2" }
|
||||
sqlx-mysql= { version = "0.7.2" }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "sqlite", "runtime-tokio-native-tls", "chrono" ] }
|
||||
sqlx-core = { version = "0.8.2" }
|
||||
sqlx-mysql= { version = "0.8.2" }
|
||||
|
||||
utoipa = { version = "4", features = ["chrono","actix_extras"] }
|
||||
|
||||
@@ -39,3 +39,7 @@ strum = { version = "0.26", features = ["derive"] }
|
||||
# Test serialization
|
||||
serde_json = "1.0.108"
|
||||
toml = "0.8.14"
|
||||
|
||||
# Temporary for a test
|
||||
errors = { path = "../../lib/errors" }
|
||||
chrono = { version = "0.4.22", features = ["serde"] }
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
// UPGRADE NOTES
|
||||
// sqlx 0.7.2 --> 0.8.2
|
||||
// - sqlx_mysql::MySqlTypeInfo --> sqlx::mysql::MySqlTypeInfo
|
||||
// - sqlx_mysql::MySqlValueRef<'r> --> sqlx::mysql::MySqlValueRef<'r>
|
||||
// - encode_by_ref(...) took &mut <sqlx::MySql as sqlx_core::database::HasArguments<'q>>::ArgumentBuffer
|
||||
// --> now takes &mut <sqlx::MySql as sqlx::database::Database>::ArgumentBuffer<'q>
|
||||
// - encode_by_ref(...) returned sqlx_core::encode::IsNull
|
||||
// --> now returns Result<sqlx_core::encode::IsNull, sqlx_core::error::BoxDynError>
|
||||
|
||||
/// This overt approach is being taken because of the following error:
|
||||
///
|
||||
/// `MySqlDatabaseError { code: Some("HY000"), number: 1210, message: "Incorrect arguments to mysqld_stmt_execute" }`
|
||||
@@ -13,7 +22,7 @@ macro_rules! impl_mysql_enum_coders {
|
||||
($t:ident) => {
|
||||
|
||||
impl sqlx::Type<sqlx::MySql> for $t {
|
||||
fn type_info() -> sqlx_mysql::MySqlTypeInfo {
|
||||
fn type_info() -> sqlx::mysql::MySqlTypeInfo {
|
||||
// // 0.4.x series:
|
||||
// String::type_info()
|
||||
|
||||
@@ -25,8 +34,8 @@ macro_rules! impl_mysql_enum_coders {
|
||||
impl<'q> sqlx::Encode<'q, sqlx::MySql> for $t {
|
||||
fn encode_by_ref(
|
||||
&self,
|
||||
buf: &mut <sqlx::MySql as sqlx_core::database::HasArguments<'q>>::ArgumentBuffer
|
||||
) -> sqlx_core::encode::IsNull {
|
||||
buf: &mut <sqlx::MySql as sqlx::database::Database>::ArgumentBuffer<'q>,
|
||||
) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
|
||||
// // 0.4.x series:
|
||||
// // NB: In the absence of `#[derive(sqlx::Type)]` and `#sqlx(rename_all="lowercase")]`,
|
||||
// // this controls the casing of the variants when sent to MySQL.
|
||||
@@ -41,7 +50,7 @@ macro_rules! impl_mysql_enum_coders {
|
||||
|
||||
impl<'r> sqlx::Decode<'r, sqlx::MySql> for $t {
|
||||
fn decode(
|
||||
value: sqlx_mysql::MySqlValueRef<'r>,
|
||||
value: sqlx::mysql::MySqlValueRef<'r>,
|
||||
) -> Result<Self, sqlx_core::error::BoxDynError> {
|
||||
// // 0.4.x series:
|
||||
// let string = String::decode(value)?;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// UPGRADE NOTES
|
||||
// sqlx 0.7.2 --> 0.8.2
|
||||
// - use sqlx::Error --> use sqlx_core::Error
|
||||
// - use sqlx::Row --> use sqlx_core::row::Row
|
||||
|
||||
/// Implement `MySqlFromRow` on a type.
|
||||
macro_rules! impl_mysql_from_row {
|
||||
@@ -5,8 +9,9 @@ macro_rules! impl_mysql_from_row {
|
||||
|
||||
// Try to convert a MySQL row and named field into the value type (for non-nullable fields).
|
||||
impl crate::traits::mysql_from_row::MySqlFromRow<$t> for $t {
|
||||
fn try_from_mysql_row(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<$t, sqlx::Error> {
|
||||
use sqlx::{Error, Row};
|
||||
fn try_from_mysql_row(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<$t, sqlx_core::Error> {
|
||||
use sqlx_core::Error;
|
||||
use sqlx_core::row::Row;
|
||||
|
||||
// NB(bt,2023-12-05): For now only string encodings are considered.
|
||||
// We may want to revisit in the future if we deal with binary data.
|
||||
@@ -24,8 +29,9 @@ macro_rules! impl_mysql_from_row {
|
||||
}
|
||||
|
||||
// Try to convert a MySQL row and named field into the value type (for nullable fields).
|
||||
fn try_from_mysql_row_nullable(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<Option<$t>, sqlx::Error> {
|
||||
use sqlx::{Error, Row};
|
||||
fn try_from_mysql_row_nullable(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<Option<$t>, sqlx_core::Error> {
|
||||
use sqlx_core::Error;
|
||||
use sqlx_core::row::Row;
|
||||
|
||||
// NB(bt,2023-12-05): For now only string encodings are considered.
|
||||
// We may want to revisit in the future if we deal with binary data.
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
use sqlx_mysql::MySqlRow;
|
||||
|
||||
// UPGRADE NOTES
|
||||
// sqlx 0.7.2 --> 0.8.2
|
||||
// - use sqlx::Error --> use sqlx_core::Error
|
||||
|
||||
/// This is a trait (in conjunction with the macro implementation) that makes up for sqlx's
|
||||
/// QueryBuilder not playing well with FromRow implementation or derivation of named types.
|
||||
pub trait MySqlFromRow<T> {
|
||||
|
||||
/// Attempt to parse a named column from a MySqlRow into the type.
|
||||
fn try_from_mysql_row(row: &MySqlRow, field_name: &str) -> Result<T, sqlx::Error>;
|
||||
fn try_from_mysql_row(row: &MySqlRow, field_name: &str) -> Result<T, sqlx_core::Error>;
|
||||
|
||||
fn try_from_mysql_row_nullable(row: &MySqlRow, field_name: &str) -> Result<Option<T>, sqlx::Error>;
|
||||
fn try_from_mysql_row_nullable(row: &MySqlRow, field_name: &str) -> Result<Option<T>, sqlx_core::Error>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
use chrono::Utc;
|
||||
use sqlx::MySqlPool;
|
||||
use sqlx_core::any::AnyConnectionBackend;
|
||||
use sqlx_core::connection::Connection;
|
||||
|
||||
use sqlx::{MySqlConnection, Executor};
|
||||
|
||||
use errors::AnyhowResult;
|
||||
|
||||
#[test]
|
||||
fn test_that_this_compiles() {
|
||||
// This test only exists as an integration test with the package.
|
||||
// When we do upgrades of SQLx, the binding between sqlx, our macros,
|
||||
// and our code can break down. Having this thin use case helps us
|
||||
// deal with migration difficulties.
|
||||
//
|
||||
// Unfortunately this code requires access to a database or cached queries to compile, so
|
||||
// we may want to rethink this strategy in the future.
|
||||
assert_eq!(1, 1);
|
||||
}
|
||||
|
||||
/// Query available (non-deleted) API tokens for a user.
|
||||
/// A user can only have five active tokens at a time, so we only return the five most recent.
|
||||
pub async fn list_available_api_tokens_for_user(
|
||||
user_token: &str,
|
||||
pool: &MySqlPool,
|
||||
) -> AnyhowResult<()> {
|
||||
|
||||
let _records : Vec<AvailableApiTokenInternal> = sqlx::query_as!(
|
||||
AvailableApiTokenInternal,
|
||||
r#"
|
||||
SELECT
|
||||
true as testing,
|
||||
internal_token
|
||||
-- api_token
|
||||
-- maybe_short_description
|
||||
-- created_at,
|
||||
-- updated_at
|
||||
FROM api_tokens
|
||||
WHERE
|
||||
user_token = ?
|
||||
AND deleted_at IS NULL
|
||||
ORDER BY created_at DESC
|
||||
LIMIT 5
|
||||
"#,
|
||||
user_token,
|
||||
)
|
||||
.fetch_all(pool)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct AvailableApiTokenInternal {
|
||||
pub testing: i64,
|
||||
pub internal_token: String,
|
||||
//pub api_token: String,
|
||||
//pub maybe_short_description: Option<String>,
|
||||
//pub created_at: chrono::DateTime<Utc>,
|
||||
//pub updated_at: chrono::DateTime<Utc>,
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
use sqlx::mysql::MySqlRow;
|
||||
use sqlx::{FromRow, MySql, MySqlPool, QueryBuilder, Row};
|
||||
|
||||
use enums::by_table::media_files::media_file_class::MediaFileClass;
|
||||
use enums::by_table::media_files::media_file_type::MediaFileType;
|
||||
use enums::common::visibility::Visibility;
|
||||
use enums::traits::mysql_from_row::MySqlFromRow;
|
||||
|
||||
#[test]
|
||||
fn test_that_this_compiles() {
|
||||
// This test only exists as an integration test with the package.
|
||||
// When we do upgrades of SQLx, the binding between sqlx, our macros,
|
||||
// and our code can break down. Having this thin use case helps us
|
||||
// deal with migration difficulties.
|
||||
//
|
||||
// Unfortunately this code requires access to a database or cached queries to compile, so
|
||||
// we may want to rethink this strategy in the future.
|
||||
assert_eq!(1, 1);
|
||||
}
|
||||
|
||||
pub async fn test_query(mysql_pool: &MySqlPool) {
|
||||
let mut query = query_builder();
|
||||
let query = query.build_query_as::<MediaFileListItemInternal>();
|
||||
let _results = query.fetch_all(mysql_pool).await;
|
||||
}
|
||||
|
||||
fn query_builder<'a>() -> QueryBuilder<'a, MySql> {
|
||||
// NB: Query cannot be statically checked by sqlx
|
||||
let mut query_builder: QueryBuilder<MySql> = QueryBuilder::new(
|
||||
r#"
|
||||
SELECT
|
||||
m.id,
|
||||
m.media_class,
|
||||
m.media_type,
|
||||
m.creator_set_visibility
|
||||
FROM media_files AS m
|
||||
LEFT OUTER JOIN users AS u
|
||||
ON m.maybe_creator_user_token = u.token
|
||||
LEFT OUTER JOIN model_weights as w
|
||||
ON m.maybe_origin_model_token = w.token
|
||||
LEFT OUTER JOIN media_files as media_file_cover_image
|
||||
ON media_file_cover_image.token = m.maybe_cover_image_media_file_token
|
||||
LEFT OUTER JOIN entity_stats
|
||||
ON entity_stats.entity_type = "media_file"
|
||||
AND entity_stats.entity_token = m.token
|
||||
LEFT OUTER JOIN prompts
|
||||
ON prompts.token = m.maybe_prompt_token
|
||||
"#
|
||||
);
|
||||
|
||||
query_builder
|
||||
}
|
||||
|
||||
struct MediaFileListItemInternal {
|
||||
id: i64,
|
||||
media_class: MediaFileClass,
|
||||
media_type: MediaFileType,
|
||||
creator_set_visibility: Visibility,
|
||||
}
|
||||
|
||||
// NB(bt,2023-12-05): There's an issue with type hinting in the `as` clauses with QueryBuilder (or
|
||||
// raw query strings) and sqlx::FromRow, regardless of whether it is derived of manually
|
||||
// implemented. Perhaps this will improve in the future, but for now manually constructed queries
|
||||
// cannot have type hints, eg. the following:
|
||||
//
|
||||
// m.token as `token: tokens::tokens::media_files::MediaFileToken`,
|
||||
// m.origin_category as `origin_category: enums::by_table::media_files::media_file_origin_category::MediaFileOriginCategory`,
|
||||
// m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,
|
||||
//
|
||||
// This results in the automatic mapping not being able to be found by name (for macro derive), and
|
||||
// in the manual case `row.try_get()` etc. won't have the correct column name (since the name is the
|
||||
// full "as" clause).
|
||||
impl FromRow<'_, MySqlRow> for MediaFileListItemInternal {
|
||||
fn from_row(row: &MySqlRow) -> Result<Self, sqlx::Error> {
|
||||
Ok(Self {
|
||||
id: row.try_get("id")?,
|
||||
media_class: MediaFileClass::try_from_mysql_row(row, "media_class")?,
|
||||
media_type: MediaFileType::try_from_mysql_row(row, "media_type")?,
|
||||
creator_set_visibility: Visibility::try_from_mysql_row(row, "creator_set_visibility")?,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ serde = "1.0.125"
|
||||
serde_derive = "1.0.125"
|
||||
|
||||
# MySql Database
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
[dev-dependencies]
|
||||
# Test serialization
|
||||
|
||||
@@ -32,9 +32,9 @@ rand = { version = "0.8.5", features = ["std_rng"] }
|
||||
|
||||
once_cell = { version = "1.18.0", features = [] }
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx-core = { version = "0.7.2" }
|
||||
sqlx-mysql= { version = "0.7.2" }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx-core = { version = "0.8.2" }
|
||||
sqlx-mysql= { version = "0.8.2" }
|
||||
|
||||
utoipa = { version = "4", features = ["chrono","actix_extras"] }
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
// Okay to toggle
|
||||
#![forbid(unreachable_patterns)]
|
||||
#![forbid(unused_imports)]
|
||||
//#![forbid(unused_imports)]
|
||||
#![forbid(unused_mut)]
|
||||
#![forbid(unused_variables)]
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// UPGRADE NOTES
|
||||
// sqlx 0.7.2 --> 0.8.2
|
||||
// - sqlx::Row --> sqlx_core::row::Row
|
||||
// - sqlx::Error --> sqlx_core::Error
|
||||
// - sqlx_mysql::MySqlRow --> sqlx::mysql::MySqlRow
|
||||
|
||||
/// Implement `MySqlTokenFromRow` on a type.
|
||||
macro_rules! impl_mysql_token_from_row {
|
||||
@@ -5,8 +10,10 @@ macro_rules! impl_mysql_token_from_row {
|
||||
|
||||
// Try to convert a MySQL row and named field into the value type (for non-nullable fields).
|
||||
impl crate::traits::mysql_token_from_row::MySqlTokenFromRow<$t> for $t {
|
||||
fn try_from_mysql_row(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<$t, sqlx::Error> {
|
||||
use sqlx::Row;
|
||||
fn try_from_mysql_row(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<$t, sqlx_core::Error> {
|
||||
#[allow(unused_imports)]
|
||||
use sqlx_core::row::Row;
|
||||
//use sqlx::Row as OtherRow;
|
||||
|
||||
// NB(bt,2023-12-05): For now only string encodings are considered.
|
||||
// We may want to revisit in the future if we deal with binary data.
|
||||
@@ -16,8 +23,10 @@ macro_rules! impl_mysql_token_from_row {
|
||||
}
|
||||
|
||||
// Try to convert a MySQL row and named field into the value type (for nullable fields).
|
||||
fn try_from_mysql_row_nullable(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<Option<$t>, sqlx::Error> {
|
||||
use sqlx::Row;
|
||||
fn try_from_mysql_row_nullable(row: &sqlx_mysql::MySqlRow, field_name: &str) -> Result<Option<$t>, sqlx_core::Error> {
|
||||
#[allow(unused_imports)]
|
||||
use sqlx_core::row::Row;
|
||||
//use sqlx::Row as OtherRow;
|
||||
|
||||
// NB(bt,2023-12-05): For now only string encodings are considered.
|
||||
// We may want to revisit in the future if we deal with binary data.
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
use sqlx_mysql::MySqlRow;
|
||||
//use sqlx::mysql::MySqlRow;
|
||||
|
||||
// UPGRADE NOTES
|
||||
// sqlx 0.7.2 --> 0.8.2
|
||||
// - sqlx::Error --> sqlx_core::Error
|
||||
|
||||
/// This is a trait (in conjunction with the macro implementation) that makes up for sqlx's
|
||||
/// QueryBuilder not playing well with FromRow implementation or derivation of named types.
|
||||
pub trait MySqlTokenFromRow<T> {
|
||||
|
||||
/// Attempt to parse a named column from a MySqlRow into the type.
|
||||
fn try_from_mysql_row(row: &MySqlRow, field_name: &str) -> Result<T, sqlx::Error>;
|
||||
fn try_from_mysql_row(row: &MySqlRow, field_name: &str) -> Result<T, sqlx_core::Error>;
|
||||
|
||||
fn try_from_mysql_row_nullable(row: &MySqlRow, field_name: &str) -> Result<Option<T>, sqlx::Error>;
|
||||
fn try_from_mysql_row_nullable(row: &MySqlRow, field_name: &str) -> Result<Option<T>, sqlx_core::Error>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
use sqlx::mysql::MySqlRow;
|
||||
use sqlx::{FromRow, MySql, MySqlPool, QueryBuilder, Row};
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
use tokens::traits::mysql_token_from_row::MySqlTokenFromRow;
|
||||
|
||||
#[test]
|
||||
fn test_that_this_compiles() {
|
||||
// This test only exists as an integration test with the package.
|
||||
// When we do upgrades of SQLx, the binding between sqlx, our macros,
|
||||
// and our code can break down. Having this thin use case helps us
|
||||
// deal with migration difficulties.
|
||||
//
|
||||
// Unfortunately this code requires access to a database or cached queries to compile, so
|
||||
// we may want to rethink this strategy in the future.
|
||||
assert_eq!(1, 1);
|
||||
}
|
||||
|
||||
pub async fn test_query(mysql_pool: &MySqlPool) {
|
||||
let mut query = query_builder();
|
||||
let query = query.build_query_as::<MediaFileListItemInternal>();
|
||||
let _results = query.fetch_all(mysql_pool).await;
|
||||
}
|
||||
|
||||
fn query_builder<'a>() -> QueryBuilder<'a, MySql> {
|
||||
// NB: Query cannot be statically checked by sqlx
|
||||
let mut query_builder: QueryBuilder<MySql> = QueryBuilder::new(
|
||||
r#"
|
||||
SELECT
|
||||
m.id,
|
||||
m.token
|
||||
FROM media_files AS m
|
||||
LEFT OUTER JOIN users AS u
|
||||
ON m.maybe_creator_user_token = u.token
|
||||
LEFT OUTER JOIN model_weights as w
|
||||
ON m.maybe_origin_model_token = w.token
|
||||
LEFT OUTER JOIN media_files as media_file_cover_image
|
||||
ON media_file_cover_image.token = m.maybe_cover_image_media_file_token
|
||||
LEFT OUTER JOIN entity_stats
|
||||
ON entity_stats.entity_type = "media_file"
|
||||
AND entity_stats.entity_token = m.token
|
||||
LEFT OUTER JOIN prompts
|
||||
ON prompts.token = m.maybe_prompt_token
|
||||
"#
|
||||
);
|
||||
|
||||
query_builder
|
||||
}
|
||||
|
||||
struct MediaFileListItemInternal {
|
||||
id: i64,
|
||||
token: MediaFileToken,
|
||||
}
|
||||
|
||||
// NB(bt,2023-12-05): There's an issue with type hinting in the `as` clauses with QueryBuilder (or
|
||||
// raw query strings) and sqlx::FromRow, regardless of whether it is derived of manually
|
||||
// implemented. Perhaps this will improve in the future, but for now manually constructed queries
|
||||
// cannot have type hints, eg. the following:
|
||||
//
|
||||
// m.token as `token: tokens::tokens::media_files::MediaFileToken`,
|
||||
// m.origin_category as `origin_category: enums::by_table::media_files::media_file_origin_category::MediaFileOriginCategory`,
|
||||
// m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,
|
||||
//
|
||||
// This results in the automatic mapping not being able to be found by name (for macro derive), and
|
||||
// in the manual case `row.try_get()` etc. won't have the correct column name (since the name is the
|
||||
// full "as" clause).
|
||||
impl FromRow<'_, MySqlRow> for MediaFileListItemInternal {
|
||||
fn from_row(row: &MySqlRow) -> Result<Self, sqlx::Error> {
|
||||
Ok(Self {
|
||||
id: row.try_get("id")?,
|
||||
token: MediaFileToken::try_from_mysql_row(row, "media_class")?,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ rand = "0.8.5"
|
||||
# NB: We switched to Tokio from `async-std` for broader ecosystem support.
|
||||
tokio = { version = "1.38.0", features = ["macros"] }
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
elasticsearch = "8.5.0-alpha.1"
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ log = "0.4.14"
|
||||
# NB: We switched to Tokio from `async-std` for broader ecosystem support.
|
||||
tokio = { version = "1.38.0", features = ["macros"] }
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
[dev-dependencies]
|
||||
# None yet
|
||||
|
||||
@@ -36,7 +36,7 @@ log = "0.4.14"
|
||||
|
||||
# Bigger pieces
|
||||
futures = { version = "0.3.17", features = ["thread-pool"] }
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
tokio = { version = "1.38.0", features = ["macros"] }
|
||||
|
||||
# Serialization
|
||||
|
||||
@@ -16,12 +16,15 @@ path = "src/main.rs"
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
# Internal
|
||||
easyenv = { path = "../../../lib/easyenv" }
|
||||
errors = { path = "../../../lib/errors" }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
tokio = { version = "1.38.0", features = ["macros"] }
|
||||
|
||||
# External
|
||||
anyhow = "1.0.86"
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
use log::info;
|
||||
|
||||
use easyenv::init_all_with_default_logging;
|
||||
use sqlx::{MySqlConnection, Executor, Connection};
|
||||
use errors::AnyhowResult;
|
||||
|
||||
fn main() -> AnyhowResult<()> {
|
||||
#[tokio::main]
|
||||
async fn main() -> AnyhowResult<()> {
|
||||
init_all_with_default_logging(None);
|
||||
|
||||
info!("TODO...");
|
||||
|
||||
let url = "mysql://storyteller:password@localhost/storyteller";
|
||||
let mut conn = MySqlConnection::connect(url).await.unwrap();
|
||||
|
||||
// This is the method the macros use. It's hidden in the docs because it's not considered part of the stable API.
|
||||
let describe = conn.describe("SELECT internal_token FROM api_tokens").await.unwrap();
|
||||
|
||||
println!("describe output: {:?}", describe);
|
||||
assert_eq!(1,2);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ log = "0.4.14"
|
||||
|
||||
# Bigger pieces
|
||||
tokio = { version = "1.38.0", features = ["macros"] }
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Serialization
|
||||
serde = "1.0.125"
|
||||
|
||||
@@ -38,7 +38,7 @@ strum = { version = "0.26", features = ["derive"] }
|
||||
|
||||
# Bigger pieces
|
||||
tokio = { version = "1.38.0", features = ["macros"] }
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
elasticsearch = "8.5.0-alpha.1"
|
||||
|
||||
# Serialization
|
||||
|
||||
@@ -40,7 +40,7 @@ tempdir = "0.3.7"
|
||||
|
||||
# Async + clients
|
||||
tokio = { version = "1.38.0", features = ["macros"] }
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Serialization
|
||||
serde = "1.0.125"
|
||||
|
||||
@@ -39,7 +39,7 @@ toml = "0.8.14"
|
||||
|
||||
# Runtime + Clients
|
||||
tokio = { version = "1.38.0", features = ["full"] }
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
@@ -52,6 +52,6 @@ num-traits = "0.2.19"
|
||||
|
||||
tokio = { version = "1.38.0", features = ["full"] }
|
||||
rand = "0.8"
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono", "bigdecimal" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono", "bigdecimal" ] }
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ log = "0.4.14"
|
||||
once_cell = "1.9.0"
|
||||
regex = "1.5.4"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "sqlite", "runtime-tokio-native-tls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "sqlite", "runtime-tokio-native-tls", "chrono" ] }
|
||||
|
||||
[dev-dependencies]
|
||||
# None yet
|
||||
|
||||
@@ -23,7 +23,7 @@ errors = { path = "../errors" }
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
[dev-dependencies]
|
||||
# None yet
|
||||
|
||||
@@ -17,24 +17,25 @@ publish = false
|
||||
actix-router = { version = "0.5.3" }
|
||||
actix-rt = { version = "2.10.0" }
|
||||
ahash = { version = "0.8.11" }
|
||||
anstream = { version = "0.6.14" }
|
||||
arrayvec = { version = "0.7.4", features = ["serde"] }
|
||||
base64 = { version = "0.21.7" }
|
||||
anstream = { version = "0.6.15" }
|
||||
base64-3c51e837cfc5589a = { package = "base64", version = "0.22.1" }
|
||||
base64-647d43efb71741da = { package = "base64", version = "0.21.7" }
|
||||
base64ct = { version = "1.6.0", default-features = false, features = ["alloc"] }
|
||||
bitflags = { version = "2.5.0", default-features = false, features = ["serde", "std"] }
|
||||
bitflags = { version = "2.6.0", default-features = false, features = ["serde", "std"] }
|
||||
block-buffer = { version = "0.9.0", default-features = false, features = ["block-padding"] }
|
||||
bytemuck = { version = "1.16.0", default-features = false, features = ["extern_crate_alloc"] }
|
||||
bytemuck = { version = "1.18.0", default-features = false, features = ["extern_crate_alloc"] }
|
||||
byteorder = { version = "1.5.0" }
|
||||
chrono = { version = "0.4.31", features = ["alloc", "serde"] }
|
||||
clap = { version = "4.4.8", features = ["derive"] }
|
||||
chrono = { version = "0.4.38", features = ["serde"] }
|
||||
clap = { version = "4.5.17", features = ["derive"] }
|
||||
concurrent-queue = { version = "2.5.0" }
|
||||
crossbeam-utils = { version = "0.8.20" }
|
||||
crypto-common = { version = "0.1.6", default-features = false, features = ["std"] }
|
||||
deranged = { version = "0.3.11", default-features = false, features = ["powerfmt", "serde", "std"] }
|
||||
digest = { version = "0.10.7", features = ["mac", "oid", "std"] }
|
||||
either = { version = "1.12.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.30" }
|
||||
either = { version = "1.13.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.33" }
|
||||
flume = { version = "0.11.0", default-features = false, features = ["async"] }
|
||||
futures = { version = "0.3.29", features = ["thread-pool"] }
|
||||
futures = { version = "0.3.30", features = ["thread-pool"] }
|
||||
futures-channel = { version = "0.3.30", features = ["sink"] }
|
||||
futures-core = { version = "0.3.30" }
|
||||
futures-executor = { version = "0.3.30", features = ["thread-pool"] }
|
||||
@@ -43,74 +44,74 @@ futures-sink = { version = "0.3.30" }
|
||||
futures-task = { version = "0.3.30", default-features = false, features = ["std"] }
|
||||
futures-util = { version = "0.3.30", features = ["channel", "io", "sink"] }
|
||||
generic-array = { version = "0.14.7", default-features = false, features = ["more_lengths"] }
|
||||
getrandom = { version = "0.2.14", default-features = false, features = ["std"] }
|
||||
getrandom = { version = "0.2.15", default-features = false, features = ["std"] }
|
||||
hashbrown = { version = "0.14.5", features = ["raw"] }
|
||||
hmac = { version = "0.12.1", default-features = false, features = ["reset"] }
|
||||
hyper-582f2526e08bb6a0 = { package = "hyper", version = "0.14.28", features = ["full"] }
|
||||
indexmap = { version = "2.2.6", features = ["serde"] }
|
||||
itertools = { version = "0.12.1" }
|
||||
lazy_static = { version = "1.4.0", default-features = false, features = ["spin_no_std"] }
|
||||
libc = { version = "0.2.155", features = ["extra_traits"] }
|
||||
log = { version = "0.4.21", default-features = false, features = ["std"] }
|
||||
hyper-582f2526e08bb6a0 = { package = "hyper", version = "0.14.30", features = ["full"] }
|
||||
indexmap = { version = "2.5.0", features = ["serde"] }
|
||||
lazy_static = { version = "1.5.0", default-features = false, features = ["spin_no_std"] }
|
||||
libc = { version = "0.2.158", features = ["extra_traits"] }
|
||||
log = { version = "0.4.22", default-features = false, features = ["std"] }
|
||||
md-5 = { version = "0.10.6" }
|
||||
memchr = { version = "2.7.4", features = ["use_std"] }
|
||||
miniz_oxide = { version = "0.7.2", features = ["simd"] }
|
||||
mio = { version = "0.8.11", features = ["net", "os-ext"] }
|
||||
native-tls = { version = "0.2.11", default-features = false, features = ["vendored"] }
|
||||
num-bigint = { version = "0.4.4" }
|
||||
num-integer = { version = "0.1.45", default-features = false, features = ["i128", "std"] }
|
||||
num-iter = { version = "0.1.43", default-features = false, features = ["i128", "std"] }
|
||||
num-rational = { version = "0.4.1", features = ["serde"] }
|
||||
mio = { version = "1.0.2", features = ["net", "os-ext"] }
|
||||
native-tls = { version = "0.2.12", default-features = false, features = ["vendored"] }
|
||||
num-bigint = { version = "0.4.6" }
|
||||
num-integer = { version = "0.1.46", default-features = false, features = ["i128", "std"] }
|
||||
num-iter = { version = "0.1.45", default-features = false, features = ["i128", "std"] }
|
||||
num-rational = { version = "0.4.2", features = ["num-bigint-std", "serde"] }
|
||||
num-traits = { version = "0.2.19", features = ["i128", "libm"] }
|
||||
proc-macro2 = { version = "1.0.85", features = ["span-locations"] }
|
||||
quick-xml = { version = "0.30.0", features = ["encoding", "serialize"] }
|
||||
quote = { version = "1.0.36" }
|
||||
proc-macro2 = { version = "1.0.86", features = ["span-locations"] }
|
||||
quote = { version = "1.0.37" }
|
||||
rand = { version = "0.8.5", features = ["small_rng"] }
|
||||
rand_chacha = { version = "0.3.1" }
|
||||
rand_core = { version = "0.6.4", default-features = false, features = ["std"] }
|
||||
regex = { version = "1.10.5" }
|
||||
regex = { version = "1.10.6" }
|
||||
regex-automata = { version = "0.4.7", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
||||
regex-syntax = { version = "0.8.4" }
|
||||
reqwest = { version = "0.12.4", features = ["blocking", "json", "rustls-tls"] }
|
||||
semver = { version = "1.0.23", features = ["serde"] }
|
||||
serde = { version = "1.0.203", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.117", features = ["preserve_order", "raw_value"] }
|
||||
reqwest = { version = "0.12.7", features = ["blocking", "json", "rustls-tls"] }
|
||||
serde = { version = "1.0.210", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.128", features = ["preserve_order", "raw_value"] }
|
||||
sha1 = { version = "0.10.6" }
|
||||
sha2 = { version = "0.10.8" }
|
||||
simd-adler32 = { version = "0.3.7" }
|
||||
smallvec = { version = "1.13.2", default-features = false, features = ["const_new"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
sqlx = { version = "0.7.3", features = ["chrono", "mysql", "runtime-tokio-native-tls", "sqlite", "tls-rustls"] }
|
||||
sqlx-core = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-mysql = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-sqlite = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.66", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
spin = { version = "0.9.8" }
|
||||
sqlx = { version = "0.8.2", features = ["bigdecimal", "chrono", "mysql", "runtime-tokio-native-tls", "sqlite", "tls-rustls"] }
|
||||
sqlx-core = { version = "0.8.2", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls-ring", "any", "bigdecimal", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-mysql = { version = "0.8.2", default-features = false, features = ["any", "bigdecimal", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-sqlite = { version = "0.8.2", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
stable_deref_trait = { version = "1.2.0" }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.77", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
time = { version = "0.3.36", features = ["macros", "serde-well-known"] }
|
||||
tokio = { version = "1.38.0", features = ["full"] }
|
||||
tokio-stream = { version = "0.1.15", features = ["fs"] }
|
||||
tokio = { version = "1.40.0", features = ["full"] }
|
||||
tokio-stream = { version = "0.1.16", features = ["fs"] }
|
||||
toml_edit = { version = "0.22.21", features = ["serde"] }
|
||||
tracing = { version = "0.1.40", features = ["log"] }
|
||||
unicode-bidi = { version = "0.3.15" }
|
||||
unicode-normalization = { version = "0.1.23" }
|
||||
unicode-normalization = { version = "0.1.24" }
|
||||
url = { version = "2.5.2", features = ["serde"] }
|
||||
uuid = { version = "1.8.0", features = ["v4"] }
|
||||
uuid = { version = "1.10.0", features = ["v4"] }
|
||||
void = { version = "1.0.2" }
|
||||
zerocopy = { version = "0.7.35", features = ["derive", "simd"] }
|
||||
zeroize = { version = "1.8.1", features = ["zeroize_derive"] }
|
||||
|
||||
[build-dependencies]
|
||||
actix-router = { version = "0.5.3" }
|
||||
ahash = { version = "0.8.11" }
|
||||
base64 = { version = "0.21.7" }
|
||||
base64-3c51e837cfc5589a = { package = "base64", version = "0.22.1" }
|
||||
base64ct = { version = "1.6.0", default-features = false, features = ["alloc"] }
|
||||
bitflags = { version = "2.5.0", default-features = false, features = ["serde", "std"] }
|
||||
bitflags = { version = "2.6.0", default-features = false, features = ["serde", "std"] }
|
||||
byteorder = { version = "1.5.0" }
|
||||
cc = { version = "1.0.99", default-features = false, features = ["parallel"] }
|
||||
chrono = { version = "0.4.31", features = ["alloc", "serde"] }
|
||||
cc = { version = "1.1.20", default-features = false, features = ["parallel"] }
|
||||
chrono = { version = "0.4.38", features = ["serde"] }
|
||||
concurrent-queue = { version = "2.5.0" }
|
||||
crossbeam-utils = { version = "0.8.20" }
|
||||
crypto-common = { version = "0.1.6", default-features = false, features = ["std"] }
|
||||
derive_more = { version = "0.99.17", features = ["nightly"] }
|
||||
derive_more = { version = "0.99.18", features = ["nightly"] }
|
||||
digest = { version = "0.10.7", features = ["mac", "oid", "std"] }
|
||||
either = { version = "1.12.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.30" }
|
||||
either = { version = "1.13.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.33" }
|
||||
flume = { version = "0.11.0", default-features = false, features = ["async"] }
|
||||
futures-channel = { version = "0.3.30", features = ["sink"] }
|
||||
futures-core = { version = "0.3.30" }
|
||||
@@ -120,97 +121,91 @@ futures-sink = { version = "0.3.30" }
|
||||
futures-task = { version = "0.3.30", default-features = false, features = ["std"] }
|
||||
futures-util = { version = "0.3.30", features = ["channel", "io", "sink"] }
|
||||
generic-array = { version = "0.14.7", default-features = false, features = ["more_lengths"] }
|
||||
getrandom = { version = "0.2.14", default-features = false, features = ["std"] }
|
||||
getrandom = { version = "0.2.15", default-features = false, features = ["std"] }
|
||||
hashbrown = { version = "0.14.5", features = ["raw"] }
|
||||
heck = { version = "0.4.1", features = ["unicode"] }
|
||||
hmac = { version = "0.12.1", default-features = false, features = ["reset"] }
|
||||
indexmap = { version = "2.2.6", features = ["serde"] }
|
||||
itertools = { version = "0.12.1" }
|
||||
lazy_static = { version = "1.4.0", default-features = false, features = ["spin_no_std"] }
|
||||
log = { version = "0.4.21", default-features = false, features = ["std"] }
|
||||
indexmap = { version = "2.5.0", features = ["serde"] }
|
||||
lazy_static = { version = "1.5.0", default-features = false, features = ["spin_no_std"] }
|
||||
log = { version = "0.4.22", default-features = false, features = ["std"] }
|
||||
md-5 = { version = "0.10.6" }
|
||||
memchr = { version = "2.7.4", features = ["use_std"] }
|
||||
miniz_oxide = { version = "0.7.2", features = ["simd"] }
|
||||
mio = { version = "0.8.11", features = ["net", "os-ext"] }
|
||||
native-tls = { version = "0.2.11", default-features = false, features = ["vendored"] }
|
||||
num-integer = { version = "0.1.45", default-features = false, features = ["i128", "std"] }
|
||||
num-iter = { version = "0.1.43", default-features = false, features = ["i128", "std"] }
|
||||
mio = { version = "1.0.2", features = ["net", "os-ext"] }
|
||||
native-tls = { version = "0.2.12", default-features = false, features = ["vendored"] }
|
||||
num-bigint = { version = "0.4.6" }
|
||||
num-integer = { version = "0.1.46", default-features = false, features = ["i128", "std"] }
|
||||
num-iter = { version = "0.1.45", default-features = false, features = ["i128", "std"] }
|
||||
num-traits = { version = "0.2.19", features = ["i128", "libm"] }
|
||||
proc-macro2 = { version = "1.0.85", features = ["span-locations"] }
|
||||
quote = { version = "1.0.36" }
|
||||
proc-macro2 = { version = "1.0.86", features = ["span-locations"] }
|
||||
quote = { version = "1.0.37" }
|
||||
rand = { version = "0.8.5", features = ["small_rng"] }
|
||||
rand_chacha = { version = "0.3.1" }
|
||||
rand_core = { version = "0.6.4", default-features = false, features = ["std"] }
|
||||
regex = { version = "1.10.5" }
|
||||
regex = { version = "1.10.6" }
|
||||
regex-automata = { version = "0.4.7", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
||||
regex-syntax = { version = "0.8.4" }
|
||||
semver = { version = "1.0.23", features = ["serde"] }
|
||||
serde = { version = "1.0.203", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.117", features = ["preserve_order", "raw_value"] }
|
||||
serde = { version = "1.0.210", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.128", features = ["preserve_order", "raw_value"] }
|
||||
sha1 = { version = "0.10.6" }
|
||||
sha2 = { version = "0.10.8" }
|
||||
simd-adler32 = { version = "0.3.7" }
|
||||
smallvec = { version = "1.13.2", default-features = false, features = ["const_new"] }
|
||||
sqlx-core = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-macros = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "chrono", "json", "migrate", "mysql", "sqlite"] }
|
||||
sqlx-macros-core = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "chrono", "json", "migrate", "mysql", "sqlite"] }
|
||||
sqlx-mysql = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-sqlite = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
syn-dff4ba8e3ae991db = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit-mut"] }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.66", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
spin = { version = "0.9.8" }
|
||||
sqlx-core = { version = "0.8.2", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls-ring", "any", "bigdecimal", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-macros = { version = "0.8.2", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls-ring", "bigdecimal", "chrono", "derive", "json", "macros", "migrate", "mysql", "sqlite"] }
|
||||
sqlx-macros-core = { version = "0.8.2", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls-ring", "bigdecimal", "chrono", "derive", "json", "macros", "migrate", "mysql", "sqlite"] }
|
||||
sqlx-mysql = { version = "0.8.2", default-features = false, features = ["any", "bigdecimal", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-sqlite = { version = "0.8.2", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
syn-dff4ba8e3ae991db = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full"] }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.77", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
time-macros = { version = "0.2.18", default-features = false, features = ["formatting", "parsing", "serde"] }
|
||||
tokio = { version = "1.38.0", features = ["full"] }
|
||||
tokio-stream = { version = "0.1.15", features = ["fs"] }
|
||||
tokio = { version = "1.40.0", features = ["full"] }
|
||||
tokio-stream = { version = "0.1.16", features = ["fs"] }
|
||||
toml_edit = { version = "0.22.21", features = ["serde"] }
|
||||
tracing = { version = "0.1.40", features = ["log"] }
|
||||
unicode-bidi = { version = "0.3.15" }
|
||||
unicode-normalization = { version = "0.1.23" }
|
||||
unicode-normalization = { version = "0.1.24" }
|
||||
url = { version = "2.5.2", features = ["serde"] }
|
||||
zerocopy = { version = "0.7.35", features = ["derive", "simd"] }
|
||||
zeroize = { version = "1.8.1", features = ["zeroize_derive"] }
|
||||
|
||||
[target.x86_64-unknown-linux-gnu.dependencies]
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
openssl = { version = "0.10.64", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.102", default-features = false, features = ["vendored"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
spin = { version = "0.9.8" }
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.4.1", features = ["client", "http1", "http2"] }
|
||||
openssl = { version = "0.10.66", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.103", default-features = false, features = ["vendored"] }
|
||||
rustls-pki-types = { version = "1.8.0", features = ["std"] }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
|
||||
[target.x86_64-unknown-linux-gnu.build-dependencies]
|
||||
libc = { version = "0.2.155", features = ["extra_traits"] }
|
||||
openssl = { version = "0.10.64", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.102", default-features = false, features = ["vendored"] }
|
||||
libc = { version = "0.2.158", features = ["extra_traits"] }
|
||||
openssl = { version = "0.10.66", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.103", default-features = false, features = ["vendored"] }
|
||||
rustls-pki-types = { version = "1.8.0", features = ["std"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
spin = { version = "0.9.8" }
|
||||
|
||||
[target.x86_64-apple-darwin.dependencies]
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
spin = { version = "0.9.8" }
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.4.1", features = ["client", "http1", "http2"] }
|
||||
rustls-pki-types = { version = "1.8.0", features = ["std"] }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
|
||||
[target.x86_64-apple-darwin.build-dependencies]
|
||||
libc = { version = "0.2.155", features = ["extra_traits"] }
|
||||
libc = { version = "0.2.158", features = ["extra_traits"] }
|
||||
rustls-pki-types = { version = "1.8.0", features = ["std"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
spin = { version = "0.9.8" }
|
||||
|
||||
[target.x86_64-pc-windows-msvc.dependencies]
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
spin = { version = "0.9.8" }
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.4.1", features = ["client", "http1", "http2"] }
|
||||
rustls-pki-types = { version = "1.8.0", features = ["std"] }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
winapi = { version = "0.3.9", default-features = false, features = ["consoleapi", "errhandlingapi", "fibersapi", "fileapi", "handleapi", "memoryapi", "minwindef", "namedpipeapi", "ntsecapi", "ntstatus", "processenv", "processthreadsapi", "profileapi", "std", "synchapi", "sysinfoapi", "winbase", "wincon", "winerror", "winnt", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip"] }
|
||||
windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52.0", features = ["Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Memory", "Win32_System_Threading", "Win32_System_WindowsProgramming"] }
|
||||
windows-sys-c8eced492e86ede7 = { package = "windows-sys", version = "0.48.0", features = ["Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Time", "Win32_System_WindowsProgramming", "Win32_UI_Shell"] }
|
||||
winapi = { version = "0.3.9", default-features = false, features = ["errhandlingapi", "fileapi", "handleapi", "minwindef", "namedpipeapi", "ntsecapi", "ntstatus", "processenv", "processthreadsapi", "profileapi", "std", "synchapi", "winbase", "winerror", "winnt", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip"] }
|
||||
windows-sys-73dcd821b1037cfd = { package = "windows-sys", version = "0.59.0", features = ["Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Memory", "Win32_System_SystemInformation", "Win32_System_Threading"] }
|
||||
windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52.0", features = ["Wdk_Foundation", "Wdk_Storage_FileSystem", "Wdk_System_IO", "Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Com", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_WindowsProgramming", "Win32_UI_Shell"] }
|
||||
|
||||
[target.x86_64-pc-windows-msvc.build-dependencies]
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
reqwest = { version = "0.12.4", features = ["blocking", "json", "rustls-tls"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.4.1", features = ["client", "http1", "http2"] }
|
||||
reqwest = { version = "0.12.7", features = ["blocking", "json", "rustls-tls"] }
|
||||
rustls-pki-types = { version = "1.8.0", features = ["std"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
spin = { version = "0.9.8" }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
winapi = { version = "0.3.9", default-features = false, features = ["consoleapi", "errhandlingapi", "fibersapi", "fileapi", "handleapi", "memoryapi", "minwindef", "namedpipeapi", "ntsecapi", "ntstatus", "processenv", "processthreadsapi", "profileapi", "std", "synchapi", "sysinfoapi", "winbase", "wincon", "winerror", "winnt", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip"] }
|
||||
windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52.0", features = ["Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Memory", "Win32_System_Threading", "Win32_System_WindowsProgramming"] }
|
||||
windows-sys-c8eced492e86ede7 = { package = "windows-sys", version = "0.48.0", features = ["Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Time", "Win32_System_WindowsProgramming", "Win32_UI_Shell"] }
|
||||
windows-sys-73dcd821b1037cfd = { package = "windows-sys", version = "0.59.0", features = ["Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Memory", "Win32_System_SystemInformation", "Win32_System_Threading"] }
|
||||
windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52.0", features = ["Wdk_Foundation", "Wdk_Storage_FileSystem", "Wdk_System_IO", "Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Com", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_WindowsProgramming", "Win32_UI_Shell"] }
|
||||
|
||||
### END HAKARI SECTION
|
||||
|
||||
@@ -38,7 +38,7 @@ hostname = "0.4.0"
|
||||
log = "0.4.14"
|
||||
rand = "0.8.5"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Runtime
|
||||
# NB: We switched to Tokio from `async-std` for broader ecosystem support.
|
||||
|
||||
@@ -51,7 +51,7 @@ subprocess = "0.2.9"
|
||||
tempdir = "0.3.7"
|
||||
zip = "0.6.6"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis = "0.14.0"
|
||||
|
||||
@@ -45,7 +45,7 @@ hostname = "0.4.0"
|
||||
log = "0.4.14"
|
||||
once_cell = "1.18.0"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis = "0.14.0"
|
||||
|
||||
@@ -43,7 +43,7 @@ log = "0.4.14"
|
||||
once_cell = "1.18.0"
|
||||
rand = "0.8.5"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
elasticsearch = "8.5.0-alpha.1"
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ once_cell = "1.18.0"
|
||||
subprocess = "0.2.9"
|
||||
tempdir = "0.3.7"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis = "0.14.0"
|
||||
|
||||
@@ -41,7 +41,7 @@ log = "0.4.14"
|
||||
subprocess = "0.2.9"
|
||||
tempdir = "0.3.7"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis = "0.14.0"
|
||||
|
||||
@@ -42,7 +42,7 @@ lfu = "0.2.5"
|
||||
log = "0.4.14"
|
||||
tempdir = "0.3.7"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis = "0.14.0"
|
||||
|
||||
@@ -41,7 +41,7 @@ log = "0.4.14"
|
||||
subprocess = "0.2.9"
|
||||
tempdir = "0.3.7"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis = "0.14.0"
|
||||
|
||||
@@ -39,7 +39,7 @@ log = "0.4.14"
|
||||
subprocess = "0.2.9"
|
||||
tempdir = "0.3.7"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis = "0.14.0"
|
||||
|
||||
@@ -56,7 +56,7 @@ async-stripe = { version = "0.26.0", default-features = false, features = ["runt
|
||||
# include support for async fn in traits.
|
||||
async-trait = "0.1.58"
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
utoipa = { version = "4", features = ["chrono","actix_extras"] }
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ futures_old_for_limiter = { package = "futures", version = "0.1.29" } # Older ve
|
||||
futures-core = "0.3.29" # NB: For middleware/futures upgrade
|
||||
pin-project-lite = "0.2.9" # NB: For middleware/futures upgrade
|
||||
|
||||
sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
sqlx = { version = "0.8.2", features = [ "mysql", "runtime-tokio", "tls-rustls", "chrono" ] }
|
||||
|
||||
# Redis Database
|
||||
limitation = { path = "../../../vendor/limitation" }
|
||||
|
||||
@@ -15,6 +15,13 @@ echo 'Looking for unused dependencies'
|
||||
# Needs nightly to run
|
||||
cargo +nightly udeps --all-targets
|
||||
|
||||
# TODO(bt,2024-09-17): Solve this issue:
|
||||
# error: rustc 1.80.0-nightly is not supported by the following package:
|
||||
# parse-size@1.1.0 requires rustc 1.81.0
|
||||
# Either upgrade rustc or select compatible dependency versions with
|
||||
# `cargo update <name>@<current-ver> --precise <compatible-ver>`
|
||||
# where `<compatible-ver>` is the latest version supporting rustc 1.80.0-nightly
|
||||
|
||||
# TODO: Ask for user input before applying some automated heuristics
|
||||
|
||||
echo 'Done.'
|
||||
|
||||
Reference in New Issue
Block a user