restructure project into a virtual manifest
- remove redundant readme - de-duplicate Cargo.toml information using workspace inheritance - rename "pacdef_core" to "pacdef" - move "crates/main/main.rs" to "crates/pacdef/src/main.rs"
This commit is contained in:
48 files changed
+37
-73
No files matched your search
Generated
-8
@@ -390,14 +390,6 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||
[[package]]
|
||||
name = "pacdef"
|
||||
version = "1.6.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"pacdef_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pacdef_core"
|
||||
version = "1.6.0"
|
||||
dependencies = [
|
||||
"alpm",
|
||||
"anyhow",
|
||||
|
||||
+7
-21
@@ -1,8 +1,9 @@
|
||||
[package]
|
||||
name = "pacdef"
|
||||
version = "1.6.0"
|
||||
[workspace]
|
||||
members = ["crates/*"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
edition = "2021"
|
||||
description = "multi-backend declarative package manager for Linux"
|
||||
license = "GPL-3.0-or-later"
|
||||
repository = "https://github.com/steven-omaha/pacdef"
|
||||
readme = "README.md"
|
||||
@@ -10,26 +11,11 @@ keywords = ["package-manager", "linux", "declarative", "cli"]
|
||||
categories = ["command-line-utilities"]
|
||||
rust-version = "1.74"
|
||||
|
||||
[workspace]
|
||||
members = ["crates/pacdef_macros", "crates/pacdef_core"]
|
||||
|
||||
[workspace.dependencies]
|
||||
anyhow = "1.0"
|
||||
|
||||
[dependencies]
|
||||
anyhow = {workspace = true}
|
||||
pacdef_core = {path = "crates/pacdef_core", version = "=1.6.0" }
|
||||
|
||||
[[bin]]
|
||||
name = "pacdef"
|
||||
path = "crates/main/main.rs"
|
||||
pacdef_macros = { path = "crates/pacdef_macros", version = "1.0" }
|
||||
pacdef = { path = "crates/pacdef", version = "1.6" }
|
||||
|
||||
[profile.release]
|
||||
lto = "off"
|
||||
opt-level = "z"
|
||||
strip = true
|
||||
|
||||
[features]
|
||||
default = []
|
||||
debian = ["pacdef_core/debian"]
|
||||
arch = ["pacdef_core/arch"]
|
||||
@@ -6,7 +6,7 @@ Release Checklist
|
||||
* Run `cargo outdated` and review semver incompatible updates.
|
||||
Unless there is a strong motivation otherwise, review and update every dependency.
|
||||
* Update the date and version in all man pages: "chore(release): bump man pages".
|
||||
* Run `cargo release -p pacdef_core -p pacdef <level>`.
|
||||
* Run `cargo release -p pacdef <version>`.
|
||||
`pacdef_core` and `pacdef` shall have the same version at all times.
|
||||
Verify everything works as expected.
|
||||
* Rerun `cargo publish` with `--execute.`
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ command = [
|
||||
"--color",
|
||||
"always",
|
||||
"--package",
|
||||
"pacdef_core",
|
||||
"pacdef",
|
||||
"--",
|
||||
"--color",
|
||||
"always", # see https://github.com/Canop/bacon/issues/124
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
[package]
|
||||
name = "pacdef_core"
|
||||
name = "pacdef"
|
||||
description = "multi-backend declarative package manager for Linux"
|
||||
version = "1.6.0"
|
||||
edition = "2021"
|
||||
description = "pacdef core library"
|
||||
license = "GPL-3.0-or-later"
|
||||
repository = "https://github.com/steven-omaha/pacdef/tree/main/crates/pacdef_core"
|
||||
readme = "README.md"
|
||||
keywords = ["package-manager", "linux", "declarative", "cli"]
|
||||
categories = ["command-line-utilities"]
|
||||
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
anyhow = "1.0"
|
||||
clap = "4.5"
|
||||
const_format = { version = "0.2", default-features = false }
|
||||
path-absolutize = "3.1"
|
||||
@@ -24,7 +25,7 @@ serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_yaml = "0.9"
|
||||
|
||||
pacdef_macros = { path = "../pacdef_macros", version = "1.0" }
|
||||
pacdef_macros.workspace = true
|
||||
|
||||
# backends
|
||||
alpm = { version = "3.0", optional = true }
|
||||
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -548,7 +548,7 @@ where
|
||||
Err(e) => {
|
||||
// CrossesDevices is nightly. See rust #86442.
|
||||
// We cannot check that here, so we just assume that
|
||||
// that would be the error if permisisons are okay.
|
||||
// that would be the error if permissions are okay.
|
||||
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
||||
bail!(e);
|
||||
}
|
||||
@@ -583,7 +583,7 @@ fn find_groups_by_name<'a>(names: &[String], groups: &'a HashSet<Group>) -> Resu
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
/// Show the error chain for an error that has occured when a backend was queried
|
||||
/// Show the error chain for an error that has occurred when a backend was queried
|
||||
/// if the `RUST_BACKTRACE` env variable is set to `1` or `full`.
|
||||
#[allow(clippy::option_if_let_else)]
|
||||
fn show_backend_query_error(error: &anyhow::Error, backend: &dyn Backend) {
|
||||
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.
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
Main program for `pacdef`. All internal logic happens in [`pacdef_core`].
|
||||
Main program for `pacdef`.
|
||||
*/
|
||||
|
||||
#![warn(
|
||||
@@ -21,8 +21,8 @@ use std::process::{ExitCode, Termination};
|
||||
|
||||
use anyhow::{bail, Context, Result};
|
||||
|
||||
use pacdef_core::path::{get_config_path, get_config_path_old_version, get_group_dir};
|
||||
use pacdef_core::{get_args, Config, Error as PacdefError, Group, Pacdef};
|
||||
use pacdef::path::{get_config_path, get_config_path_old_version, get_group_dir};
|
||||
use pacdef::{get_args, Config, Error as PacdefError, Group, Pacdef};
|
||||
|
||||
const MAJOR_UPDATE_MESSAGE: &str = "VERSION UPGRADE
|
||||
You seem to have used version 0.x of pacdef before.
|
||||
File renamed without changes.
File renamed without changes.
@@ -53,8 +53,8 @@ pub fn review(
|
||||
println!();
|
||||
let mut iter = strategies.iter().peekable();
|
||||
|
||||
while let Some(strat) = iter.next() {
|
||||
strat.show();
|
||||
while let Some(strategy) = iter.next() {
|
||||
strategy.show();
|
||||
|
||||
if iter.peek().is_some() {
|
||||
println!();
|
||||
@@ -66,8 +66,8 @@ pub fn review(
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
for strat in strategies {
|
||||
strat.execute()?;
|
||||
for strategy in strategies {
|
||||
strategy.execute()?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,8 +0,0 @@
|
||||
# pacdef_core
|
||||
|
||||
core library for pacdef
|
||||
|
||||
|
||||
## supported rust version
|
||||
|
||||
latest stable
|
||||
@@ -1,13 +1,14 @@
|
||||
[package]
|
||||
name = "pacdef_macros"
|
||||
version = "1.0.1"
|
||||
edition = "2021"
|
||||
license = "GPL-3.0-or-later"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/steven-omaha/pacdef/tree/main/crates/pacdef_macros"
|
||||
description = "procedural macros for pacdef"
|
||||
keywords = ["macro", "proc-macro"]
|
||||
categories = ["command-line-utilities"]
|
||||
version = "1.0.1"
|
||||
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# pacdef_macros
|
||||
|
||||
procedural macros for pacdef
|
||||
|
||||
|
||||
## supported rust version
|
||||
|
||||
latest stable
|
||||
Reference in new issue
Block a user