Extra project utilities in their own crate.

This was currently in the 'cli' crates, but this code is pretty standalone and need not to be mixed with the rest of the cli logic.
  Ideally, we want the cli crate to be only a thin wrapper over functionality available from the rest of the lib crates.
This commit is contained in:
KtorZ 2022-10-28 13:48:40 +02:00
parent 819256df99
commit 6d0d938fb9
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
10 changed files with 49 additions and 23 deletions

23
Cargo.lock generated
View File

@ -61,14 +61,8 @@ dependencies = [
"pallas-crypto", "pallas-crypto",
"pallas-primitives", "pallas-primitives",
"pallas-traverse", "pallas-traverse",
"petgraph", "project",
"regex",
"serde",
"serde_json",
"thiserror",
"toml",
"uplc", "uplc",
"walkdir",
] ]
[[package]] [[package]]
@ -808,6 +802,21 @@ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "project"
version = "0.0.21"
dependencies = [
"aiken-lang",
"miette",
"petgraph",
"regex",
"serde",
"serde_json",
"thiserror",
"toml",
"walkdir",
]
[[package]] [[package]]
name = "proptest" name = "proptest"
version = "1.0.0" version = "1.0.0"

View File

@ -12,19 +12,14 @@ authors = ["Lucas Rosa <x@rvcas.dev>", "Kasey White <kwhitemsg@gmail.com>"]
anyhow = "1.0.57" anyhow = "1.0.57"
clap = { version = "3.1.14", features = ["derive"] } clap = { version = "3.1.14", features = ["derive"] }
hex = "0.4.3" hex = "0.4.3"
ignore = "0.4.18"
miette = { version = "5.3.0", features = ["fancy"] }
pallas-addresses = "0.14.0-alpha.3" pallas-addresses = "0.14.0-alpha.3"
pallas-codec = "0.14.0-alpha.3" pallas-codec = "0.14.0-alpha.3"
pallas-crypto = "0.14.0-alpha.3" pallas-crypto = "0.14.0-alpha.3"
pallas-primitives = "0.14.0-alpha.3" pallas-primitives = "0.14.0-alpha.3"
pallas-traverse = "0.14.0-alpha.3" pallas-traverse = "0.14.0-alpha.3"
serde = { version = "1.0.144", features = ["derive"] }
serde_json = "1.0.85"
uplc = { path = '../uplc', version = "0.0.21" }
aiken-lang = { path = "../lang", version = "0.0.20" } aiken-lang = { path = "../lang", version = "0.0.20" }
toml = "0.5.9" project = { path = '../project', version = "0.0.21" }
walkdir = "2.3.2" uplc = { path = '../uplc', version = "0.0.21" }
ignore = "0.4.18"
regex = "1.6.0"
miette = { version = "5.3.0", features = ["fancy"] }
thiserror = "1.0.37"
petgraph = "0.6.2"

View File

@ -1,7 +1,2 @@
pub mod config;
pub mod error;
pub mod module;
pub mod project;
pub use aiken_lang; pub use aiken_lang;
pub use uplc; pub use uplc;

View File

@ -16,7 +16,7 @@ use uplc::{
}, },
}; };
use aiken::{config::Config, project::Project}; use project::{config::Config, Project};
mod args; mod args;

20
crates/project/Cargo.toml Normal file
View File

@ -0,0 +1,20 @@
[package]
name = "project"
description = "Aiken project utilities"
version = "0.0.21"
edition = "2021"
repository = "https://github.com/txpipe/aiken/crates/project"
homepage = "https://github.com/txpipe/aiken"
license = "Apache-2.0"
authors = ["Lucas Rosa <x@rvcas.dev>", "Kasey White <kwhitemsg@gmail.com>"]
[dependencies]
aiken-lang = { path = "../lang", version = "0.0.20" }
miette = { version = "5.3.0", features = ["fancy"] }
petgraph = "0.6.2"
regex = "1.6.0"
serde = { version = "1.0.144", features = ["derive"] }
serde_json = "1.0.85"
thiserror = "1.0.37"
toml = "0.5.9"
walkdir = "2.3.2"

3
crates/project/README.md Normal file
View File

@ -0,0 +1,3 @@
# Project
This crate encapsulates the code used to manage Aiken projects. See [crates/cli](../cli) for usage.

View File

@ -4,6 +4,10 @@ use std::{
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
pub mod config;
pub mod error;
pub mod module;
use aiken_lang::{ast::ModuleKind, builtins, tipo::TypeInfo, IdGenerator}; use aiken_lang::{ast::ModuleKind, builtins, tipo::TypeInfo, IdGenerator};
use crate::{ use crate::{