Skip to content

Commit

Permalink
global: Fix some build warning (#697)
Browse files Browse the repository at this point in the history
* fix build warnings

* revert path changes

* fix workspace typo
  • Loading branch information
4t145 authored Apr 8, 2024
1 parent 0550230 commit 65c162b
Show file tree
Hide file tree
Showing 20 changed files with 25 additions and 29 deletions.
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ members = [
"frontend/sdks/*",
"frontend/clients/*",
]

resolver = "2"
[workspace.package]
version = "0.1.0"
authors = [
Expand Down Expand Up @@ -61,9 +61,9 @@ run_script = { version = "0.10" }
testcontainers-modules = { version = "0.3", features = ["redis"] }
strum = { version = "0.26", features = ["derive"] }
# tardis
# tardis = { version = "0.1.0-rc.10" }
tardis = { version = "0.1.0-rc.11" }
# tardis = { path = "../tardis/tardis" }
tardis = { git = "https://github.com/ideal-world/tardis.git", rev = "191f3ec" }
# tardis = { git = "https://github.com/ideal-world/tardis.git", rev = "191f3ec" }
#spacegate

# spacegate-kernel = { git = "https://github.com/ideal-world/spacegate.git", rev = "f37a81a", features = [
Expand All @@ -81,7 +81,6 @@ spacegate-shell = { git = "https://github.com/ideal-world/spacegate.git", branch
"cache",
"k8s",
"ext-redis",
"ext-axum",
] }

spacegate-plugin = { git = "https://github.com/ideal-world/spacegate.git", branch = "master" }
2 changes: 1 addition & 1 deletion backend/middlewares/event/src/event_initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async fn init_log_ws_client() -> TardisWSClient {
let conf = funs.conf::<EventConfig>();
let mut event_conf = conf.log_event.clone();
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let default_avatar = event_conf.avatars[0].clone();
set_default_log_avatar(default_avatar);
Expand Down
2 changes: 1 addition & 1 deletion backend/middlewares/flow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async-trait.workspace = true
async-recursion.workspace = true
lazy_static.workspace = true
itertools.workspace = true
tardis = { workspace = true, features = ["reldb-postgres", "web-client", "build-info"] }
tardis = { workspace = true, features = ["reldb-postgres", "web-client"] }
bios-basic = { path = "../../basic", features = ["default"] }
bios-sdk-invoke = { path = "../../../frontend/sdks/invoke", features = ["default"] }
[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion backend/middlewares/flow/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub async fn start_flow_event_service(config: &EventTopicConfig) -> TardisResult
let client = event_client::EventClient::new(config.base_url.as_str(), &funs);
let mut event_conf = config.clone();
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let resp = client.register(&event_conf.into()).await?;
let ws_client = TardisFuns::ws_client(&resp.ws_addr, |message| async move {
Expand Down
2 changes: 1 addition & 1 deletion backend/middlewares/flow/src/flow_initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ async fn init_ws_flow_client() -> Option<TardisWSClient> {
return None;
}
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let default_avatar = event_conf.avatars[0].clone();
set_default_flow_avatar(default_avatar);
Expand Down
2 changes: 1 addition & 1 deletion backend/middlewares/schedule/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ git = "https://github.com/4t145/tokio-cron-scheduler.git"
branch = "time-local"
features = ["cron_local"]
[dev-dependencies]
tardis = { workspace = true, features = ["test", "ws-client", "build-info"] }
tardis = { workspace = true, features = ["test", "ws-client"] }
bios-basic = { path = "../../basic", features = ["default", "test"] }
bios-spi-kv = { path = "../../spi/spi-kv" }
bios-spi-log = { path = "../../spi/spi-log" }
2 changes: 1 addition & 1 deletion backend/middlewares/schedule/src/schedule_initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn init_ws_client() -> TardisWSClient {
let conf = funs.conf::<ScheduleConfig>();
let mut event_conf = conf.event.clone();
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let default_avatar = event_conf.avatars[0].clone();
set_default_avatar(default_avatar);
Expand Down
2 changes: 1 addition & 1 deletion backend/services/bios-all/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ publish.workspace = true

[dependencies]
serde.workspace = true
tardis = { workspace = true, features = ["web-server", "conf-remote", "cluster", "k8s", "build-info"] }
tardis = { workspace = true, features = ["web-server", "conf-remote", "cluster", "k8s"] }
bios-iam = { path = "../../supports/iam", features = ["spi_search", "spi_kv"] }
bios-auth = { path = "../../supports/auth", features = ["web-server"] }
bios-reach = { path = "../../supports/reach" }
Expand Down
3 changes: 1 addition & 2 deletions backend/services/spacegate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ spacegate-shell = { workspace = true, features = [
"k8s",
"plugin-all",
"ext-redis",
"ext-axum",
"cache",
] }
tardis = { workerspace = true }
tardis = { workspace = true }
spacegate-plugins = { path = "../../gateways/spacegate-plugins" }
envy = "0.4"
[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bios_spi_conf::{
conf_constants::DOMAIN_CODE,
dto::conf_auth_dto::{RegisterRequest, RegisterResponse},
};
use tardis::web::reqwest::header::HeaderName;
use tardis::web::reqwest::{self, header::HeaderName};
use tardis::{
basic::{dto::TardisContext, field::TrimString, result::TardisResult},
log,
Expand Down
1 change: 0 additions & 1 deletion backend/spi/spi-log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ serde.workspace = true
tardis = { workspace = true, features = [
"reldb-postgres",
"web-server",
"build-info"
] }
bios-basic = { path = "../../basic", features = ["default"] }
bios-sdk-invoke = { path = "../../../frontend/sdks/invoke", features = [
Expand Down
2 changes: 1 addition & 1 deletion backend/spi/spi-log/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub async fn start_log_event_service(config: &EventTopicConfig) -> TardisResult<
let client = event_client::EventClient::new(config.base_url.as_str(), &funs);
let mut event_conf = config.clone();
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let resp = client.register(&event_conf.into()).await?;
let ws_client = TardisFuns::ws_client(&resp.ws_addr, |message| async move {
Expand Down
2 changes: 1 addition & 1 deletion backend/spi/spi-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async-trait.workspace = true
tardis = { workspace = true, features = ["reldb-postgres", "web-server"] }
bios-basic = { path = "../../basic", features = ["default"] }
bios-sdk-invoke = { path = "../../../frontend/sdks/invoke", features = ["default"] }
strum = { workerspace = true, features = ["derive"] }
strum = { workspace = true, features = ["derive"] }

[dev-dependencies]
tardis = { workspace = true, features = ["test", "ws-client"] }
Expand Down
3 changes: 1 addition & 2 deletions backend/spi/spi-search/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ tardis = { workspace = true, features = [
"web-server",
"web-client",
"openapi-rapidoc",
"build-info"
] }
bios-basic = { path = "../../basic", features = ["default"] }
strum = { workerspace = true, features = ["derive"] }
strum = { workspace = true, features = ["derive"] }
pinyin = { version = "0.10" }
bios-sdk-invoke = { path = "../../../frontend/sdks/invoke", features = [
"event",
Expand Down
2 changes: 1 addition & 1 deletion backend/spi/spi-search/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub async fn start_search_event_service(config: &EventTopicConfig) -> TardisResu
let client = event_client::EventClient::new(config.base_url.as_str(), &funs);
let mut event_conf = config.clone();
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let resp = client.register(&event_conf.into()).await?;
let ws_client = TardisFuns::ws_client(&resp.ws_addr, |message| async move {
Expand Down
2 changes: 1 addition & 1 deletion backend/spi/spi-stats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ lazy_static.workspace = true
itertools.workspace = true
tardis = { workspace = true, features = ["reldb-postgres", "web-server"] }
serde_json = { workspace = true, features = ["preserve_order"] }
strum = { workerspace = true, features = ["derive"] }
strum = { workspace = true, features = ["derive"] }

[dev-dependencies]
tardis = { workspace = true, features = ["test"] }
Expand Down
3 changes: 1 addition & 2 deletions backend/supports/iam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ tardis = { workspace = true, features = [
"web-client",
"mail",
"k8s",
"build-info"
] }
bios-basic = { path = "../../basic", features = ["default", "with-mq"] }
bios-sdk-invoke = { path = "../../../frontend/sdks/invoke", features = ["default", "event"] }
Expand All @@ -46,8 +45,8 @@ tokio-util = { version = "0.7", optional = true }
ldap3 = { version = "0.11", optional = true }
# todo Wait for tardis field to upgrade during removal
nanoid = { version = "0.4" }
strum = { workerspace = true, features = ["derive"] }

strum = { workspace = true, features = ["derive"] }
[dev-dependencies]
tardis = { workspace = true, features = ["test"] }
bios-basic = { path = "../../basic", features = ["default", "test"] }
Expand Down
8 changes: 4 additions & 4 deletions backend/supports/iam/src/iam_initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ async fn init_ws_log_client() -> Option<TardisWSClient> {
return None;
}
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let default_avatar = event_conf.avatars[0].clone();
set_default_log_avatar(default_avatar);
Expand Down Expand Up @@ -782,7 +782,7 @@ async fn init_ws_search_client() -> Option<TardisWSClient> {
return None;
}
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let default_avatar = event_conf.avatars[0].clone();
set_default_search_avatar(default_avatar);
Expand Down Expand Up @@ -821,7 +821,7 @@ async fn init_ws_iam_send_event_client() -> Option<TardisWSClient> {
return None;
}
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let default_avatar = event_conf.avatars[0].clone();
set_default_iam_send_avatar(default_avatar);
Expand Down Expand Up @@ -853,7 +853,7 @@ pub async fn init_ws_iam_event_client() -> TardisResult<()> {
let conf = funs.conf::<IamConfig>();
let mut event_conf = conf.iam_event_bus.clone();
if event_conf.avatars.is_empty() {
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, tardis::pkg!()))
event_conf.avatars.push(format!("{}/{}", event_conf.topic_code, env!("CARGO_PKG_NAME")))
}
let client = bios_sdk_invoke::clients::event_client::EventClient::new(&event_conf.base_url, &funs);
let addr = loop {
Expand Down
3 changes: 2 additions & 1 deletion frontend/enhance-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ license.workspace = true
edition.workspace = true
readme.workspace = true
publish.workspace = true

[lib]
name = "bios_enhance_wasm"
path = "src/lib.rs"
Expand All @@ -33,6 +32,8 @@ wasm-bindgen-futures = { version = "0" }
serde-wasm-bindgen = { version = "0" }
js-sys = { version = "0" }
web-sys = { version = "0", features = [
'MessageEvent',
'Event',
'Headers',
'Request',
'RequestInit',
Expand Down
2 changes: 1 addition & 1 deletion frontend/sdks/invoke/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ simple-invoke-client-macro = { path = "../simple-invoke-client-macro" }

[[test]]
name = "test_macros"
features = ["macro"]
required-features = ["macro"]

0 comments on commit 65c162b

Please sign in to comment.