From c44df688d13aac230a80959754d5f48e7921fd8c Mon Sep 17 00:00:00 2001 From: clearloop Date: Sat, 23 Dec 2023 11:59:11 +0800 Subject: [PATCH] chore(elko): remove clap --- Cargo.lock | 1 - Cargo.toml | 2 -- README.md | 3 +-- RELEASES.md | 1 + elko/Cargo.toml | 1 - elko/src/bin/elko.rs | 5 ++++- elko/src/build.rs | 2 +- elko/src/new.rs | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa93fc781..6cc2cfa2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -631,7 +631,6 @@ dependencies = [ "anyhow", "cargo_metadata", "ccli", - "clap", "colored", "etc", "semver", diff --git a/Cargo.toml b/Cargo.toml index 683cb7fea..90ad30641 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,6 @@ repository = "https://github.com/clearloop/zink.git" anyhow = "1.0.76" cargo_metadata = "0.18.1" ccli = "0.0.1" -clap = "4.4.11" colored = "2.1.0" etc = "0.1.16" hex = "0.4.3" @@ -78,7 +77,6 @@ packages = [ "elko" ] - # Zink Programming Language # ------------------------- diff --git a/README.md b/README.md index eab7ad2c6..beb84fae3 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,7 @@ [![telegram][telegram-badge]][telegram-group] [The Zink project][book] mainly provides a singlepass compiler `zinkc` which compiles -WASM to EVM bytecode, the source code of your smart contract could be any language you -like! +WASM to EVM bytecode, the source code of your smart contracts could be any language you like! ```mermaid flowchart LR diff --git a/RELEASES.md b/RELEASES.md index e713d2a3f..80db66d47 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -8,6 +8,7 @@ - Remove ethers - Move out ccli and conta - Use `anyhow::Result` instead for the result of `zint` +- Remove clap in elko ### FIXED diff --git a/elko/Cargo.toml b/elko/Cargo.toml index 06463f044..726fb8ee2 100644 --- a/elko/Cargo.toml +++ b/elko/Cargo.toml @@ -11,7 +11,6 @@ repository.workspace = true [dependencies] anyhow.workspace = true ccli.workspace = true -clap = { workspace = true, features = [ "derive" ] } cargo_metadata.workspace = true colored.workspace = true etc.workspace = true diff --git a/elko/src/bin/elko.rs b/elko/src/bin/elko.rs index 51465bd81..2493bffe4 100644 --- a/elko/src/bin/elko.rs +++ b/elko/src/bin/elko.rs @@ -1,7 +1,10 @@ //! The package manager of zink. #![deny(missing_docs)] -use ccli::{clap::Subcommand, App, Parser, Result}; +use ccli::{ + clap::{self, Parser, Subcommand}, + App, Result, +}; use elko::{Build, Compile, New}; /// Elko commands diff --git a/elko/src/build.rs b/elko/src/build.rs index c3744e92b..4b13e8124 100644 --- a/elko/src/build.rs +++ b/elko/src/build.rs @@ -1,7 +1,7 @@ //! Command `Build`. use crate::utils::WasmBuilder; use anyhow::{anyhow, Result}; -use clap::Parser; +use ccli::clap::{self, Parser}; use etc::{Etc, FileSystem}; use std::{env, fs, path::PathBuf}; use zinkc::Compiler; diff --git a/elko/src/new.rs b/elko/src/new.rs index bdbf4c23b..1558fe7a9 100644 --- a/elko/src/new.rs +++ b/elko/src/new.rs @@ -1,7 +1,7 @@ //! Command `New` use crate::utils::Manifest; use anyhow::{anyhow, Result}; -use clap::Parser; +use ccli::clap::{self, Parser}; use colored::*; use std::{fs, path::PathBuf};