Skip to content

Commit

Permalink
mering with master
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Sep 20, 2024
2 parents 371d5ea + faca130 commit 81da29e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "lingua-franca"
version = "0.2.0"
edition = "2021"

description = "Packagemanager for Lingua-Franca"
description = "Package manager and build tool for the Lingua Franca coordination language"
homepage = "https://lf-lang.org"
repository = "https://github.com/lf-lang/lingo"
license = "BSD-2-Clause"
Expand Down
24 changes: 10 additions & 14 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use clap::{Args, Parser, Subcommand};
use serde_derive::{Deserialize, Serialize};
use std::path::PathBuf;

#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq, Hash)]
#[clap(rename_all = "lowercase")]

Check warning on line 7 in src/args.rs

View workflow job for this annotation

GitHub Actions / Check

use of deprecated function `<args::TargetLanguage as clap::ValueEnum>::to_possible_value::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[value(...)]`

Check warning on line 7 in src/args.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

use of deprecated function `<args::TargetLanguage as clap::ValueEnum>::to_possible_value::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[value(...)]`

warning: use of deprecated function `<args::TargetLanguage as clap::ValueEnum>::to_possible_value::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[value(...)]` --> src/args.rs:7:3 | 7 | #[clap(rename_all = "lowercase")] | ^^^^ | = note: `#[warn(deprecated)]` on by default
pub enum TargetLanguage {
C,
Cpp,
Expand All @@ -12,7 +13,7 @@ pub enum TargetLanguage {
Python,
}

#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq)]
#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq, Hash)]
pub enum Platform {
Native,
Zephyr,
Expand Down Expand Up @@ -78,19 +79,14 @@ impl BuildArgs {
}
}

impl ToString for TargetLanguage {
fn to_string(&self) -> String {
format!("{:?}", self)
}
}

#[derive(Args, Debug)]
pub struct InitArgs {
#[arg(value_enum, short, long)]
pub language: Option<TargetLanguage>,
#[arg(value_enum, short, long, default_value_t = Platform::Native)]
pub platform: Platform,
}

impl InitArgs {
pub fn get_target_language(&self) -> TargetLanguage {
self.language.unwrap_or({
Expand Down Expand Up @@ -124,10 +120,10 @@ pub enum Command {
}

#[derive(Parser)]
#[command(name = "lingua-franca package manager and build tool")]
#[command(author = "[email protected]")]
#[command(version = env!("CARGO_PKG_VERSION"))]
#[command(about = "Build system of lingua-franca projects", long_about = None)]
#[clap(name = "Lingua Franca package manager and build tool")]

Check warning on line 123 in src/args.rs

View workflow job for this annotation

GitHub Actions / Check

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

Check warning on line 123 in src/args.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

warning: use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]` --> src/args.rs:123:3 | 123 | #[clap(name = "Lingua Franca package manager and build tool")] | ^^^^
#[clap(author = "[email protected]")]

Check warning on line 124 in src/args.rs

View workflow job for this annotation

GitHub Actions / Check

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

Check warning on line 124 in src/args.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

warning: use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]` --> src/args.rs:124:3 | 124 | #[clap(author = "[email protected]")] | ^^^^
#[clap(version = env!("CARGO_PKG_VERSION"))]

Check warning on line 125 in src/args.rs

View workflow job for this annotation

GitHub Actions / Check

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

Check warning on line 125 in src/args.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

warning: use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]` --> src/args.rs:125:3 | 125 | #[clap(version = env!("CARGO_PKG_VERSION"))] | ^^^^
#[clap(about = "Build system for the Lingua Franca coordination language", long_about = None)]

Check warning on line 126 in src/args.rs

View workflow job for this annotation

GitHub Actions / Check

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

Check warning on line 126 in src/args.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]`

warning: use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[command(...)]` --> src/args.rs:126:3 | 126 | #[clap(about = "Build system for the Lingua Franca coordination language", long_about = None)] | ^^^^
pub struct CommandLineArgs {
/// which command of lingo to use
#[clap(subcommand)]
Expand All @@ -137,7 +133,7 @@ pub struct CommandLineArgs {
#[arg(short, long)]
pub quiet: bool,

/// lingo wouldn't produce any output
#[arg(short, long)]
/// lingo will give more detailed feedback
#[clap(short, long, action)]

Check warning on line 137 in src/args.rs

View workflow job for this annotation

GitHub Actions / Check

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[arg(...)]`

Check warning on line 137 in src/args.rs

View workflow job for this annotation

GitHub Actions / Check

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::bare_action`: `#[arg(action)]` is now the default and is no longer needed`

Check warning on line 137 in src/args.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::bare_action`: `#[arg(action)]` is now the default and is no longer needed`

warning: use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::bare_action`: `#[arg(action)]` is now the default and is no longer needed` --> src/args.rs:137:25 | 137 | #[clap(short, long, action)] | ^^^^^^

Check warning on line 137 in src/args.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[arg(...)]`

warning: use of deprecated function `<args::CommandLineArgs as clap::Args>::augment_args::old_attribute`: Attribute `#[clap(...)]` has been deprecated in favor of `#[arg(...)]` --> src/args.rs:137:7 | 137 | #[clap(short, long, action)] | ^^^^
pub verbose: bool,
}

0 comments on commit 81da29e

Please sign in to comment.