refactor: merge actor-macros into core
Starting to flatten the crates.
This commit is contained in:
parent
758ca5c2dc
commit
48c968db2d
19 changed files with 52 additions and 18 deletions
|
@ -23,6 +23,7 @@ unwrap_used = "warn"
|
|||
expect_used = "warn"
|
||||
|
||||
[workspace.dependencies]
|
||||
git-next-core = { path = "crates/core", version = "0.10" }
|
||||
git-next-server = { path = "crates/server", version = "0.10" }
|
||||
git-next-server-actor = { path = "crates/server-actor", version = "0.10" }
|
||||
git-next-config = { path = "crates/config", version = "0.10" }
|
||||
|
|
|
@ -4,11 +4,9 @@ version = { workspace = true }
|
|||
edition = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
description = "macros for actors for git-next, the trunk-based development manager"
|
||||
description = "[deprecated crate] macros for actors for git-next, the trunk-based development manager"
|
||||
|
||||
[dependencies]
|
||||
# Actors
|
||||
actix = { workspace = true }
|
||||
|
||||
[lints.clippy]
|
||||
nursery = { level = "warn", priority = -1 }
|
||||
|
|
|
@ -7,3 +7,5 @@ development workflows where each commit must pass CI before being included in
|
|||
the main branch.
|
||||
|
||||
See [git-next](https://crates.io/crates/git-next) for more information.
|
||||
|
||||
N.B. this crate has been merged into [git-next-core](https://crates.io/crates/git-next-core).
|
||||
|
|
|
@ -1 +1 @@
|
|||
mod message;
|
||||
// moved to crates/core/src/macros/
|
||||
|
|
|
@ -4,7 +4,7 @@ version = { workspace = true }
|
|||
edition = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
description = "CLI support for git-next, the trunk-based development manager"
|
||||
description = "git-next, the trunk-based development manager"
|
||||
authors = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
@ -12,6 +12,7 @@ keywords = { workspace = true }
|
|||
categories = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
git-next-core = { workspace = true }
|
||||
git-next-server = { workspace = true }
|
||||
|
||||
# CLI parsing
|
||||
|
|
|
@ -519,10 +519,11 @@ The following diagram shows the dependency between the crates that make up `git-
|
|||
```mermaid
|
||||
stateDiagram-v2
|
||||
|
||||
cli --> core
|
||||
|
||||
cli --> server
|
||||
|
||||
file_watcher_actor --> config
|
||||
file_watcher_actor --> actor_macros
|
||||
|
||||
forge --> config
|
||||
forge --> git
|
||||
|
@ -537,23 +538,24 @@ stateDiagram-v2
|
|||
|
||||
git --> config
|
||||
|
||||
repo_actor --> core
|
||||
repo_actor --> config
|
||||
repo_actor --> git
|
||||
repo_actor --> forge
|
||||
repo_actor --> actor_macros
|
||||
|
||||
server --> config
|
||||
server --> file_watcher_actor
|
||||
server --> server_actor
|
||||
|
||||
server_actor --> core
|
||||
server_actor --> config
|
||||
server_actor --> git
|
||||
server_actor --> forge
|
||||
server_actor --> repo_actor
|
||||
server_actor --> actor_macros
|
||||
server_actor --> file_watcher_actor
|
||||
server_actor --> webhook_actor
|
||||
|
||||
webhook_actor --> core
|
||||
webhook_actor --> config
|
||||
webhook_actor --> repo_actor
|
||||
```
|
||||
|
|
30
crates/core/Cargo.toml
Normal file
30
crates/core/Cargo.toml
Normal file
|
@ -0,0 +1,30 @@
|
|||
[package]
|
||||
name = "git-next-core"
|
||||
version = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
description = "core for git-next, the trunk-based development manager"
|
||||
|
||||
[dependencies]
|
||||
# logging
|
||||
console-subscriber = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
|
||||
# fs/network
|
||||
kxio = { workspace = true }
|
||||
|
||||
# Actors
|
||||
actix = { workspace = true }
|
||||
actix-rt = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
# Testing
|
||||
assert2 = { workspace = true }
|
||||
|
||||
[lints.clippy]
|
||||
nursery = { level = "warn", priority = -1 }
|
||||
# pedantic = "warn"
|
||||
unwrap_used = "warn"
|
||||
expect_used = "warn"
|
1
crates/core/src/lib.rs
Normal file
1
crates/core/src/lib.rs
Normal file
|
@ -0,0 +1 @@
|
|||
mod macros;
|
1
crates/core/src/macros/mod.rs
Normal file
1
crates/core/src/macros/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
mod message;
|
|
@ -8,8 +8,6 @@ description = "Config file watcher for git-next, the trunk-based development man
|
|||
|
||||
[dependencies]
|
||||
git-next-config = { workspace = true }
|
||||
git-next-actor-macros = { workspace = true }
|
||||
# git-next-repo-actor = { workspace = true }
|
||||
|
||||
# logging
|
||||
tracing = { workspace = true }
|
||||
|
|
|
@ -12,10 +12,10 @@ forgejo = []
|
|||
github = []
|
||||
|
||||
[dependencies]
|
||||
git-next-core = { workspace = true }
|
||||
git-next-config = { workspace = true }
|
||||
git-next-git = { workspace = true }
|
||||
git-next-forge = { workspace = true }
|
||||
git-next-actor-macros = { workspace = true }
|
||||
|
||||
# logging
|
||||
tracing = { workspace = true }
|
||||
|
|
|
@ -3,8 +3,8 @@ use config::newtype;
|
|||
use derive_more::Display;
|
||||
|
||||
use git::UserNotification;
|
||||
use git_next_actor_macros::message;
|
||||
use git_next_config as config;
|
||||
use git_next_core::message;
|
||||
use git_next_git as git;
|
||||
|
||||
message!(LoadConfigFromRepo: "Request to load the `git-next.toml` from the git repo.");
|
||||
|
|
|
@ -16,8 +16,8 @@ use git::{
|
|||
repository::{factory::MockRepositoryFactory, open::MockOpenRepositoryLike, Direction},
|
||||
Generation, MockForgeLike, RepoDetails,
|
||||
};
|
||||
use git_next_actor_macros::message;
|
||||
use git_next_config as config;
|
||||
use git_next_core::message;
|
||||
use git_next_git as git;
|
||||
use mockall::predicate::eq;
|
||||
use std::{
|
||||
|
|
|
@ -7,11 +7,11 @@ repository = { workspace = true }
|
|||
description = "Server actor for git-next, the trunk-based development manager"
|
||||
|
||||
[dependencies]
|
||||
git-next-core = { workspace = true }
|
||||
git-next-config = { workspace = true }
|
||||
git-next-git = { workspace = true }
|
||||
git-next-forge = { workspace = true }
|
||||
git-next-repo-actor = { workspace = true }
|
||||
git-next-actor-macros = { workspace = true }
|
||||
git-next-file-watcher-actor = { workspace = true }
|
||||
git-next-webhook-actor = { workspace = true }
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ use webhook::WebhookActor;
|
|||
|
||||
pub use git_next_git::repository::{factory::real as repository_factory, RepositoryFactory};
|
||||
|
||||
use crate::messages::ReceiveServerConfig;
|
||||
use messages::ReceiveServerConfig;
|
||||
|
||||
#[derive(Debug, derive_more::Display, derive_more::From)]
|
||||
pub enum Error {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//-
|
||||
use derive_more::Constructor;
|
||||
use git_next_actor_macros::message;
|
||||
use git_next_config::server::{ServerConfig, ServerStorage};
|
||||
use git_next_core::message;
|
||||
use std::net::SocketAddr;
|
||||
|
||||
// receive server config
|
||||
|
|
|
@ -7,7 +7,7 @@ repository = { workspace = true }
|
|||
description = "webhook actor for git-next, the trunk-based development manager"
|
||||
|
||||
[dependencies]
|
||||
git-next-actor-macros = { workspace = true }
|
||||
git-next-core = { workspace = true }
|
||||
git-next-config = { workspace = true }
|
||||
git-next-repo-actor = { workspace = true }
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//
|
||||
use git_next_actor_macros::message;
|
||||
use git_next_core::message;
|
||||
|
||||
message!(ShutdownWebhook: "Request to shutdown the Webhook actor");
|
||||
|
|
Loading…
Reference in a new issue