Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cargo): prevent crate filename collision #1395

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ inherits = "release"
lto = false
codegen-units = 16

[lib]
name = "ncspot_common"

[dependencies]
chrono = "0.4"
clap = "4.5.4"
Expand Down
2 changes: 1 addition & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use cursive::traits::View;
use cursive::views::Dialog;
use cursive::Cursive;
use log::{debug, error, info};
use ncspot::CONFIGURATION_FILE_NAME;
use ncspot_common::CONFIGURATION_FILE_NAME;
use std::cell::RefCell;

pub enum CommandResult {
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{fs, process};

use cursive::theme::Theme;
use log::{debug, error};
use ncspot::{CONFIGURATION_FILE_NAME, USER_STATE_FILE_NAME};
use ncspot_common::{CONFIGURATION_FILE_NAME, USER_STATE_FILE_NAME};
use platform_dirs::AppDirs;

use crate::command::{SortDirection, SortKey};
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{path::PathBuf, process::exit};
use application::{setup_logging, Application};
use config::set_configuration_base_path;
use log::error;
use ncspot::program_arguments;
use ncspot_common::program_arguments;

mod application;
mod authentication;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cursive::utils::markup::StyledString;
use cursive::view::ViewWrapper;
use cursive::views::{ScrollView, TextView};
use cursive::Cursive;
use ncspot::CONFIGURATION_FILE_NAME;
use ncspot_common::CONFIGURATION_FILE_NAME;

use crate::command::{Command, MoveAmount, MoveMode};
use crate::commands::CommandResult;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cursive::{Cursive, CursiveRunner};
use ncspot::BIN_NAME;
use ncspot_common::BIN_NAME;

pub mod album;
pub mod artist;
Expand Down
6 changes: 3 additions & 3 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use clap::builder::PathBufValueParser;
use clap::error::{Error, ErrorKind};
use clap::ArgMatches;
use clap_complete::Shell;
use ncspot::{AUTHOR, BIN_NAME};
use ncspot_common::{AUTHOR, BIN_NAME};

static DEFAULT_OUTPUT_DIRECTORY: &str = "misc";

Expand Down Expand Up @@ -109,7 +109,7 @@ fn generate_manpage(subcommand_arguments: &ArgMatches) -> Result<(), DynError> {
let output_directory = subcommand_arguments
.get_one::<PathBuf>("output")
.unwrap_or(&default_output_directory);
let cmd = ncspot::program_arguments();
let cmd = ncspot_common::program_arguments();
let man = clap_mangen::Man::new(cmd);
let mut buffer: Vec<u8> = Default::default();

Expand Down Expand Up @@ -154,7 +154,7 @@ fn generate_shell_completion(subcommand_arguments: &ArgMatches) -> Result<(), Dy
for shell in shells {
clap_complete::generate_to(
shell,
&mut ncspot::program_arguments(),
&mut ncspot_common::program_arguments(),
BIN_NAME,
output_directory,
)?;
Expand Down