Skip to content

Commit

Permalink
fixing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Sep 20, 2024
1 parent 81da29e commit c686814
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
16 changes: 8 additions & 8 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +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)]
#[clap(rename_all = "lowercase")]
#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq, Hash)]
#[value(rename_all = "lowercase")]
pub enum TargetLanguage {
C,
Cpp,
Expand All @@ -13,7 +13,7 @@ pub enum TargetLanguage {
Python,
}

#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq, Hash)]
#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq, Hash)]
pub enum Platform {
Native,
Zephyr,
Expand Down Expand Up @@ -120,10 +120,10 @@ pub enum Command {
}

#[derive(Parser)]
#[clap(name = "Lingua Franca package manager and build tool")]
#[clap(author = "[email protected]")]
#[clap(version = env!("CARGO_PKG_VERSION"))]
#[clap(about = "Build system for the Lingua Franca coordination language", long_about = None)]
#[command(name = "Lingua Franca package manager and build tool")]
#[command(author = "[email protected]")]
#[command(version = env!("CARGO_PKG_VERSION"))]
#[command(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 @@ -134,6 +134,6 @@ pub struct CommandLineArgs {
pub quiet: bool,

/// lingo will give more detailed feedback
#[clap(short, long, action)]
#[arg(short, long)]
pub verbose: bool,
}
3 changes: 1 addition & 2 deletions src/package/lock.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::package::deserialize_version;
use crate::package::management::copy_dir_all;
use crate::package::serialize_version;
use crate::package::target_properties::{LibraryTargetProperties, MergeTargetProperties};
use crate::package::tree::{DependencyTreeNode, PackageDetails, ProjectSource};
use crate::package::ConfigFile;
use crate::package::{deserialize_version, serialize_version};
use crate::util::errors::LingoError;
use colored::Colorize;
use serde::de::{Error, StdError};
Expand Down
19 changes: 8 additions & 11 deletions src/package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,26 @@ pub mod target_properties;

use crate::args::{BuildSystem, InitArgs, Platform, TargetLanguage};
use crate::util::{analyzer, copy_recursively};
use git2::Repository;
use serde::de::{Error, Visitor};
use serde::{Deserializer, Serializer};
use serde_derive::{Deserialize, Serialize};
use std::collections::HashMap;

use std::fs::{read_to_string, remove_dir_all, remove_file, write};
use std::io::ErrorKind;
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::{env, fmt, io};

use crate::args::BuildSystem::{CMake, LFC};
use crate::util::errors::{BuildResult, LingoError};
use git2::Repository;
use serde::de::{Error, Visitor};
use serde::{Deserializer, Serializer};
use tempfile::tempdir;
use versions::Versioning;
use which::which;

use crate::args::BuildSystem::{CMake, LFC};
use crate::package::target_properties::{
AppTargetProperties, AppTargetPropertiesFile, LibraryTargetProperties,
LibraryTargetPropertiesFile,
};
use crate::package::tree::PackageDetails;
use which::which;
use crate::util::errors::{BuildResult, LingoError};

/// place where are the build artifacts will be dropped
pub const OUTPUT_DIRECTORY: &str = "build";
Expand All @@ -37,10 +34,10 @@ pub const OUTPUT_DIRECTORY: &str = "build";
pub const LIBRARY_DIRECTORY: &str = "libraries";

/// default folder for lf executable files
const DEFAULT_EXECUTABLE_FOLDER: &'static str = "src";
const DEFAULT_EXECUTABLE_FOLDER: &str = "src";

/// default folder for lf library files
const DEFAULT_LIBRARY_FOLDER: &'static str = "lib";
const DEFAULT_LIBRARY_FOLDER: &str = "lib";

fn is_valid_location_for_project(path: &std::path::Path) -> bool {
!path.join(DEFAULT_EXECUTABLE_FOLDER).exists()
Expand Down
1 change: 0 additions & 1 deletion src/util/analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const DEFAULT_TARGET: TargetLanguage = TargetLanguage::C;

/// this functions searches inside the file for a main reactor declaration
fn search_inside_file(path: &Path) -> io::Result<Option<MainReactorSpec>> {
println!("Searching File {:?}", path);
let content = std::fs::read_to_string(path)?;

let mut target: TargetLanguage = DEFAULT_TARGET;
Expand Down

0 comments on commit c686814

Please sign in to comment.