mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-23 01:22:12 +03:00
move id module to its own crate
This commit is contained in:
parent
b0440ce989
commit
55b8a0357b
14
Cargo.lock
generated
14
Cargo.lock
generated
@ -2100,6 +2100,7 @@ dependencies = [
|
||||
"bstr",
|
||||
"git2",
|
||||
"gitbutler-core",
|
||||
"gitbutler-id",
|
||||
"gitbutler-reference",
|
||||
"gitbutler-serde",
|
||||
"hex",
|
||||
@ -2246,6 +2247,14 @@ dependencies = [
|
||||
"windows 0.57.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gitbutler-id"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gitbutler-notify-debouncer"
|
||||
version = "0.0.0"
|
||||
@ -2295,6 +2304,7 @@ dependencies = [
|
||||
"git2",
|
||||
"gitbutler-core",
|
||||
"gitbutler-error",
|
||||
"gitbutler-id",
|
||||
"gitbutler-serde",
|
||||
"gitbutler-testsupport",
|
||||
"gix",
|
||||
@ -2331,6 +2341,7 @@ dependencies = [
|
||||
"gitbutler-core",
|
||||
"gitbutler-error",
|
||||
"gitbutler-git",
|
||||
"gitbutler-id",
|
||||
"gitbutler-project",
|
||||
"gitbutler-reference",
|
||||
"gitbutler-testsupport",
|
||||
@ -2377,6 +2388,7 @@ dependencies = [
|
||||
"gitbutler-command-context",
|
||||
"gitbutler-core",
|
||||
"gitbutler-error",
|
||||
"gitbutler-id",
|
||||
"gitbutler-oplog",
|
||||
"gitbutler-project",
|
||||
"gitbutler-reference",
|
||||
@ -2402,6 +2414,7 @@ dependencies = [
|
||||
"gitbutler-core",
|
||||
"gitbutler-error",
|
||||
"gitbutler-feedback",
|
||||
"gitbutler-id",
|
||||
"gitbutler-oplog",
|
||||
"gitbutler-project",
|
||||
"gitbutler-reference",
|
||||
@ -2486,6 +2499,7 @@ dependencies = [
|
||||
"gitbutler-core",
|
||||
"gitbutler-error",
|
||||
"gitbutler-git",
|
||||
"gitbutler-id",
|
||||
"gitbutler-oplog",
|
||||
"gitbutler-project",
|
||||
"gitbutler-reference",
|
||||
|
@ -21,7 +21,8 @@ members = [
|
||||
"crates/gitbutler-reference",
|
||||
"crates/gitbutler-error",
|
||||
"crates/gitbutler-serde",
|
||||
"crates/gitbutler-secret",
|
||||
"crates/gitbutler-secret",
|
||||
"crates/gitbutler-id",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
@ -55,6 +56,7 @@ gitbutler-reference = { path = "crates/gitbutler-reference" }
|
||||
gitbutler-error = { path = "crates/gitbutler-error" }
|
||||
gitbutler-serde = { path = "crates/gitbutler-serde" }
|
||||
gitbutler-secret = { path = "crates/gitbutler-secret" }
|
||||
gitbutler-id = { path = "crates/gitbutler-id" }
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
|
||||
|
@ -11,6 +11,7 @@ git2.workspace = true
|
||||
gitbutler-core.workspace = true
|
||||
gitbutler-reference.workspace = true
|
||||
gitbutler-serde.workspace = true
|
||||
gitbutler-id.workspace = true
|
||||
itertools = "0.13"
|
||||
serde = { workspace = true, features = ["std"]}
|
||||
bstr = "1.9.1"
|
||||
|
@ -2,7 +2,7 @@ use anyhow::Result;
|
||||
use gitbutler_reference::{normalize_branch_name, Refname, RemoteRefname, VirtualRefname};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use gitbutler_core::id::Id;
|
||||
use gitbutler_id::id::Id;
|
||||
|
||||
use crate::ownership::BranchOwnershipClaims;
|
||||
|
||||
|
@ -7,7 +7,7 @@ use bstr::{BStr, BString, ByteSlice, ByteVec};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tracing::instrument;
|
||||
|
||||
use gitbutler_core::id::Id;
|
||||
use gitbutler_id::id::Id;
|
||||
|
||||
use crate::branch::Branch;
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
pub mod fs;
|
||||
pub mod git;
|
||||
pub mod id;
|
||||
pub mod path;
|
||||
pub mod storage;
|
||||
pub mod time;
|
||||
|
10
crates/gitbutler-id/Cargo.toml
Normal file
10
crates/gitbutler-id/Cargo.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "gitbutler-id"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
authors = ["GitButler <gitbutler@gitbutler.com>"]
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true, features = ["std"]}
|
||||
uuid.workspace = true
|
1
crates/gitbutler-id/src/lib.rs
Normal file
1
crates/gitbutler-id/src/lib.rs
Normal file
@ -0,0 +1 @@
|
||||
pub mod id;
|
@ -12,6 +12,7 @@ serde_json = { version = "1.0", features = [ "std", "arbitrary_precision" ] }
|
||||
gitbutler-core.workspace = true
|
||||
gitbutler-error.workspace = true
|
||||
gitbutler-serde.workspace = true
|
||||
gitbutler-id.workspace = true
|
||||
git2.workspace = true
|
||||
async-trait = "0.1.80"
|
||||
gix = { workspace = true, features = ["dirwalk", "credentials", "parallel"] }
|
||||
|
@ -5,7 +5,8 @@ use std::{
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use gitbutler_core::{id::Id, types::default_true::DefaultTrue};
|
||||
use gitbutler_core::types::default_true::DefaultTrue;
|
||||
use gitbutler_id::id::Id;
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
@ -25,6 +25,7 @@ gitbutler-project.workspace = true
|
||||
gitbutler-branch.workspace = true
|
||||
gitbutler-reference.workspace = true
|
||||
gitbutler-error.workspace = true
|
||||
gitbutler-id.workspace = true
|
||||
|
||||
[[test]]
|
||||
name="repo"
|
||||
|
@ -4,7 +4,7 @@ use gitbutler_branch::branch::BranchId;
|
||||
use serde::Serialize;
|
||||
use tokio::sync::{oneshot, Mutex};
|
||||
|
||||
use gitbutler_core::id::Id;
|
||||
use gitbutler_id::id::Id;
|
||||
|
||||
static mut GLOBAL_ASKPASS_BROKER: Option<AskpassBroker> = None;
|
||||
|
||||
|
@ -19,3 +19,4 @@ gitbutler-user.workspace = true
|
||||
gitbutler-branch.workspace = true
|
||||
gitbutler-reference.workspace = true
|
||||
gitbutler-error.workspace = true
|
||||
gitbutler-id.workspace = true
|
||||
|
@ -7,8 +7,8 @@ use gitbutler_branch::target::Target;
|
||||
use gitbutler_branchstate::VirtualBranchesAccess;
|
||||
use gitbutler_command_context::ProjectRepo;
|
||||
use gitbutler_core::git::Url;
|
||||
use gitbutler_core::id::Id;
|
||||
use gitbutler_error::error::Code;
|
||||
use gitbutler_id::id::Id;
|
||||
use gitbutler_oplog::oplog::Oplog;
|
||||
use gitbutler_project as projects;
|
||||
use gitbutler_project::{CodePushState, Project};
|
||||
|
@ -60,6 +60,7 @@ gitbutler-branch.workspace = true
|
||||
gitbutler-reference.workspace = true
|
||||
gitbutler-error.workspace = true
|
||||
gitbutler-secret.workspace = true
|
||||
gitbutler-id.workspace = true
|
||||
open = "5"
|
||||
|
||||
[dependencies.tauri]
|
||||
|
@ -1,5 +1,5 @@
|
||||
pub mod commands {
|
||||
use gitbutler_core::id::Id;
|
||||
use gitbutler_id::id::Id;
|
||||
use gitbutler_repo::askpass::{self, AskpassRequest};
|
||||
|
||||
#[tauri::command(async)]
|
||||
|
@ -19,6 +19,7 @@ gitbutler-branch.workspace = true
|
||||
gitbutler-reference.workspace = true
|
||||
gitbutler-error.workspace = true
|
||||
gitbutler-serde.workspace = true
|
||||
gitbutler-id.workspace = true
|
||||
serde = { workspace = true, features = ["std"]}
|
||||
bstr = "1.9.1"
|
||||
diffy = "0.3.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
use gitbutler_branch::branch::Branch;
|
||||
use gitbutler_core::id::Id;
|
||||
use gitbutler_id::id::Id;
|
||||
use gitbutler_virtual::VirtualBranch;
|
||||
|
||||
use super::*;
|
||||
|
Loading…
Reference in New Issue
Block a user