diff --git a/.gitignore b/.gitignore index e25e8838..6e0aa75b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,13 +8,18 @@ /result* -# Temp test files -/rocks-lib/resources/test/luatest-0.2-1/ -/rocks-lib/proptest-regressions/ -/*.rockspec -*.snap.new +# For compat /.rocks /rocks.lock /rocks.toml +# Temp test files +/lux-lib/resources/test/luatest-0.2-1/ +/lux-lib/proptest-regressions/ +/*.rockspec +*.snap.new +/.lux +/lux.lock +/lux.toml + .pre-commit-config.yaml diff --git a/Cargo.lock b/Cargo.lock index 8bd4cfa0..57405da7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2107,6 +2107,107 @@ dependencies = [ "which 6.0.3", ] +[[package]] +name = "lux" +version = "0.1.0" +dependencies = [ + "assert_fs", + "clap 4.5.23", + "edit", + "eyre", + "git-url-parse", + "git2", + "indicatif", + "inquire", + "itertools 0.14.0", + "lux-lib", + "nucleo", + "octocrab", + "open", + "path-absolutize", + "serde_json", + "spdx", + "spinners", + "strum 0.27.0", + "strum_macros 0.27.0", + "stylua", + "tempdir", + "termcolor", + "text_trees", + "tokio", + "toml", + "url", + "uzers", + "walkdir", + "which 7.0.0", +] + +[[package]] +name = "lux-lib" +version = "0.1.0" +dependencies = [ + "assert_fs", + "async-recursion", + "bon", + "bytes", + "cc", + "clap 4.5.23", + "clean-path", + "diffy", + "dir-diff", + "directories", + "flate2", + "fs_extra", + "futures", + "git-url-parse", + "git2", + "gpgme", + "hex", + "html-escape", + "httpdate", + "httptest", + "indicatif", + "infer", + "insta", + "itertools 0.14.0", + "lets_find_up", + "lua-src", + "luajit-src", + "md5", + "mlua", + "nix-nar", + "openssl", + "pathdiff", + "pkg-config", + "predicates", + "proptest", + "remove_dir_all 1.0.0", + "reqwest", + "semver", + "serde", + "serde-enum-str", + "serde_json", + "serial_test", + "sha2", + "shell-words", + "shlex", + "ssri", + "strum 0.27.0", + "strum_macros 0.27.0", + "tar", + "target-lexicon 0.13.0", + "tempdir", + "thiserror 2.0.3", + "tokio", + "toml", + "toml_edit", + "url", + "vfs", + "walkdir", + "which 7.0.0", + "zip", +] + [[package]] name = "lzma-rs" version = "0.3.0" @@ -3054,107 +3155,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rocks" -version = "0.1.0" -dependencies = [ - "assert_fs", - "clap 4.5.23", - "edit", - "eyre", - "git-url-parse", - "git2", - "indicatif", - "inquire", - "itertools 0.14.0", - "nucleo", - "octocrab", - "open", - "path-absolutize", - "rocks-lib", - "serde_json", - "spdx", - "spinners", - "strum 0.27.0", - "strum_macros 0.27.0", - "stylua", - "tempdir", - "termcolor", - "text_trees", - "tokio", - "toml", - "url", - "uzers", - "walkdir", - "which 7.0.0", -] - -[[package]] -name = "rocks-lib" -version = "0.1.0" -dependencies = [ - "assert_fs", - "async-recursion", - "bon", - "bytes", - "cc", - "clap 4.5.23", - "clean-path", - "diffy", - "dir-diff", - "directories", - "flate2", - "fs_extra", - "futures", - "git-url-parse", - "git2", - "gpgme", - "hex", - "html-escape", - "httpdate", - "httptest", - "indicatif", - "infer", - "insta", - "itertools 0.14.0", - "lets_find_up", - "lua-src", - "luajit-src", - "md5", - "mlua", - "nix-nar", - "openssl", - "pathdiff", - "pkg-config", - "predicates", - "proptest", - "remove_dir_all 1.0.0", - "reqwest", - "semver", - "serde", - "serde-enum-str", - "serde_json", - "serial_test", - "sha2", - "shell-words", - "shlex", - "ssri", - "strum 0.27.0", - "strum_macros 0.27.0", - "tar", - "target-lexicon 0.13.0", - "tempdir", - "thiserror 2.0.3", - "tokio", - "toml", - "toml_edit", - "url", - "vfs", - "walkdir", - "which 7.0.0", - "zip", -] - [[package]] name = "roff" version = "0.2.2" @@ -4845,7 +4845,7 @@ dependencies = [ "clap 4.5.23", "clap_complete", "clap_mangen", - "rocks", + "lux", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7c422b02..90707a4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [workspace] members = [ - "rocks-lib", - "rocks-bin", + "lux-lib", + "lux-bin", "xtask", - # "rocks-lua", + # "lux-lua", ] resolver = "2" diff --git a/README.md b/README.md index f7f2520c..8552cdc6 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ > [!WARNING] > -> **rocks is a work in progress +> **lux is a work in progress > and does not have a stable release yet.** -Rocks serves as an application for: +Lux serves as an application for: - Installing and managing rocks - Creating Lua projects with dependencies, build scripts and desired Lua versions - Creating and publishing your own rocks @@ -19,20 +19,20 @@ Rocks serves as an application for: ## :books: Usage ```sh -rocks +lux ``` -To view available options and their descriptions, run `rocks --help`. +To view available options and their descriptions, run `lux --help`. ## Comparison with [`luarocks v3.11.1`](https://github.com/luarocks/luarocks) As this project is still a work in progress, some luarocks features have not been (fully) implemented yet. -On the other hand, rocks has some features that are not present in luarocks. +On the other hand, lux has some features that are not present in luarocks. The following table provides a brief (incomplete) comparison: -| | `rocks` | `luarocks v3.11.1` | +| | `lux` | `luarocks v3.11.1` | | --- | --- | --- | | `builtin` build spec | :white_check_mark: | :white_check_mark: | | `make` build spec | :white_check_mark: | :white_check_mark: | @@ -63,7 +63,7 @@ The following table provides a brief (incomplete) comparison: ## :book: License -`rocks` is licensed under [MIT](./LICENSE). +`lux` is licensed under [MIT](./LICENSE). ## :green_heart: Contributing diff --git a/rocks-bin/Cargo.toml b/lux-bin/Cargo.toml similarity index 92% rename from rocks-bin/Cargo.toml rename to lux-bin/Cargo.toml index 2e37af66..9b87c015 100644 --- a/rocks-bin/Cargo.toml +++ b/lux-bin/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rocks" +name = "lux" version = "0.1.0" edition = "2021" @@ -35,6 +35,6 @@ edit = "0.1.5" [dev-dependencies] assert_fs = "1.1.2" -[dependencies.rocks-lib] -path = "../rocks-lib/" +[dependencies.lux-lib] +path = "../lux-lib/" features = ["clap"] diff --git a/rocks-bin/src/add.rs b/lux-bin/src/add.rs similarity index 90% rename from rocks-bin/src/add.rs rename to lux-bin/src/add.rs index b1d742a4..1a519c0f 100644 --- a/rocks-bin/src/add.rs +++ b/lux-bin/src/add.rs @@ -1,5 +1,5 @@ use eyre::{Context, OptionExt, Result}; -use rocks_lib::{ +use lux_lib::{ config::Config, lockfile::PinnedState, luarocks::luarocks_installation::LuaRocksInstallation, @@ -44,7 +44,7 @@ pub async fn add(data: Add, config: Config) -> Result<()> { if !data.package_req.is_empty() { // NOTE: We only update the lockfile if one exists. - // Otherwise, the next `rocks build` will install the packages. + // Otherwise, the next `lux build` will install the packages. if let Some(mut lockfile) = project.try_lockfile()? { Sync::new(&tree, &mut lockfile, &config) .progress(progress.clone()) @@ -57,7 +57,7 @@ pub async fn add(data: Add, config: Config) -> Result<()> { project .add( - rocks_lib::project::DependencyType::Regular(data.package_req), + lux_lib::project::DependencyType::Regular(data.package_req), &db, ) .await?; @@ -78,7 +78,7 @@ pub async fn add(data: Add, config: Config) -> Result<()> { project .add( - rocks_lib::project::DependencyType::Build(build_packages), + lux_lib::project::DependencyType::Build(build_packages), &db, ) .await?; @@ -96,7 +96,7 @@ pub async fn add(data: Add, config: Config) -> Result<()> { .wrap_err("syncing test dependencies with the project lockfile failed.")?; project - .add(rocks_lib::project::DependencyType::Test(test_packages), &db) + .add(lux_lib::project::DependencyType::Test(test_packages), &db) .await?; } } diff --git a/rocks-bin/src/build.rs b/lux-bin/src/build.rs similarity index 99% rename from rocks-bin/src/build.rs rename to lux-bin/src/build.rs index 23ee1303..bf6d875d 100644 --- a/rocks-bin/src/build.rs +++ b/lux-bin/src/build.rs @@ -4,7 +4,7 @@ use std::sync::Arc; use clap::Args; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ build::{self, BuildBehaviour}, config::Config, lockfile::PinnedState, diff --git a/rocks-bin/src/check.rs b/lux-bin/src/check.rs similarity index 97% rename from rocks-bin/src/check.rs rename to lux-bin/src/check.rs index 2afed894..57f3305f 100644 --- a/rocks-bin/src/check.rs +++ b/lux-bin/src/check.rs @@ -1,5 +1,5 @@ use eyre::{OptionExt, Result}; -use rocks_lib::{ +use lux_lib::{ build::BuildBehaviour, config::Config, lockfile::PinnedState::Pinned, diff --git a/rocks-bin/src/config.rs b/lux-bin/src/config.rs similarity index 94% rename from rocks-bin/src/config.rs rename to lux-bin/src/config.rs index b88ca0b0..2fb60354 100644 --- a/rocks-bin/src/config.rs +++ b/lux-bin/src/config.rs @@ -1,6 +1,6 @@ use eyre::{eyre, Result}; use inquire::Confirm; -use rocks_lib::config::{Config, ConfigBuilder}; +use lux_lib::config::{Config, ConfigBuilder}; #[derive(clap::Subcommand)] pub enum ConfigCmd { @@ -56,7 +56,7 @@ pub fn config(cmd: ConfigCmd, config: Config) -> Result<()> { return Err(eyre!( " No config file found. -Use 'rocks config init', 'rocks config init --default', or 'rocks config init --current' +Use 'lux config init', 'lux config init --default', or 'lux config init --current' to initialise a config file. " )); diff --git a/rocks-bin/src/debug.rs b/lux-bin/src/debug.rs similarity index 100% rename from rocks-bin/src/debug.rs rename to lux-bin/src/debug.rs diff --git a/rocks-bin/src/doc.rs b/lux-bin/src/doc.rs similarity index 99% rename from rocks-bin/src/doc.rs rename to lux-bin/src/doc.rs index b56d9432..41d3665a 100644 --- a/rocks-bin/src/doc.rs +++ b/lux-bin/src/doc.rs @@ -2,7 +2,7 @@ use clap::Args; use eyre::{eyre, Result}; use inquire::{Confirm, Select}; use itertools::Itertools; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, lockfile::LocalPackage, lua_rockspec::LuaRockspec, diff --git a/rocks-bin/src/download.rs b/lux-bin/src/download.rs similarity index 97% rename from rocks-bin/src/download.rs rename to lux-bin/src/download.rs index d3921018..f23ff1ee 100644 --- a/rocks-bin/src/download.rs +++ b/lux-bin/src/download.rs @@ -1,6 +1,6 @@ use clap::Args; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::Config, operations, package::PackageReq, diff --git a/rocks-bin/src/fetch.rs b/lux-bin/src/fetch.rs similarity index 88% rename from rocks-bin/src/fetch.rs rename to lux-bin/src/fetch.rs index 20de2c9f..45eb3bdc 100644 --- a/rocks-bin/src/fetch.rs +++ b/lux-bin/src/fetch.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::Config, operations::Download, progress::{MultiProgress, Progress}, @@ -23,7 +23,7 @@ pub async fn fetch_remote(data: UnpackRemote, config: Config) -> Result<()> { let destination = data.path.unwrap_or_else(|| { PathBuf::from(format!("{}-{}", &rockspec.package(), &rockspec.version())) }); - rocks_lib::operations::FetchSrc::new(destination.clone().as_path(), &rockspec, &config, &bar) + lux_lib::operations::FetchSrc::new(destination.clone().as_path(), &rockspec, &config, &bar) .fetch() .await?; @@ -39,7 +39,7 @@ pub async fn fetch_remote(data: UnpackRemote, config: Config) -> Result<()> { " You may now enter the following directory: {} -and type `rocks build` to build. +and type `lux build` to build. ", build_dir.as_path().display() )) diff --git a/rocks-bin/src/format.rs b/lux-bin/src/format.rs similarity index 92% rename from rocks-bin/src/format.rs rename to lux-bin/src/format.rs index 790abfd9..b68c7382 100644 --- a/rocks-bin/src/format.rs +++ b/lux-bin/src/format.rs @@ -1,14 +1,14 @@ use std::path::PathBuf; use eyre::{OptionExt, Result}; -use rocks_lib::project::Project; +use lux_lib::project::Project; use stylua_lib::Config; use walkdir::WalkDir; // TODO: Add `PathBuf` parameter that describes what directory or file to format here. pub fn format() -> Result<()> { let project = Project::current()?.ok_or_eyre( - "`rocks fmt` can only be executed in a rocks project! Run `rocks new` to create one.", + "`lux fmt` can only be executed in a rocks project! Run `lux new` to create one.", )?; let config: Config = std::fs::read_to_string("stylua.toml") diff --git a/rocks-bin/src/info.rs b/lux-bin/src/info.rs similarity index 99% rename from rocks-bin/src/info.rs rename to lux-bin/src/info.rs index 4366a710..da25caa5 100644 --- a/rocks-bin/src/info.rs +++ b/lux-bin/src/info.rs @@ -1,6 +1,6 @@ use clap::Args; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, operations::Download, package::PackageReq, diff --git a/rocks-bin/src/install.rs b/lux-bin/src/install.rs similarity index 98% rename from rocks-bin/src/install.rs rename to lux-bin/src/install.rs index d9f436e6..c6dba578 100644 --- a/rocks-bin/src/install.rs +++ b/lux-bin/src/install.rs @@ -1,5 +1,5 @@ use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, lockfile::PinnedState, operations, diff --git a/rocks-bin/src/install_lua.rs b/lux-bin/src/install_lua.rs similarity index 97% rename from rocks-bin/src/install_lua.rs rename to lux-bin/src/install_lua.rs index 5c50ca25..f80439c3 100644 --- a/rocks-bin/src/install_lua.rs +++ b/lux-bin/src/install_lua.rs @@ -1,5 +1,5 @@ use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, lua_installation::LuaInstallation, progress::{MultiProgress, ProgressBar}, diff --git a/rocks-bin/src/install_rockspec.rs b/lux-bin/src/install_rockspec.rs similarity index 99% rename from rocks-bin/src/install_rockspec.rs rename to lux-bin/src/install_rockspec.rs index 093bf018..893bfa97 100644 --- a/rocks-bin/src/install_rockspec.rs +++ b/lux-bin/src/install_rockspec.rs @@ -4,7 +4,7 @@ use std::{path::PathBuf, sync::Arc}; use clap::Args; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ build::{self, BuildBehaviour}, config::Config, lockfile::PinnedState, diff --git a/rocks-bin/src/lib.rs b/lux-bin/src/lib.rs similarity index 87% rename from rocks-bin/src/lib.rs rename to lux-bin/src/lib.rs index e414b690..a67e0167 100644 --- a/rocks-bin/src/lib.rs +++ b/lux-bin/src/lib.rs @@ -17,7 +17,7 @@ use pack::Pack; use path::Path; use pin::ChangePin; use remove::Remove; -use rocks_lib::config::LuaVersion; +use lux_lib::config::LuaVersion; use run::Run; use run_lua::RunLua; use search::Search; @@ -66,7 +66,7 @@ pub mod which; #[derive(Parser)] #[command(author, version, about, long_about = None, arg_required_else_help = true)] pub struct Cli { - /// Enable the sub-repositories in rocks servers for + /// Enable the sub-repositories in luarocks servers for /// rockspecs of in-development versions. #[arg(long)] pub dev: bool, @@ -85,11 +85,11 @@ pub struct Cli { #[arg(long, value_name = "url")] pub only_sources: Option, - /// Specify the rocks server namespace to use. + /// Specify the luarocks server namespace to use. #[arg(long, value_name = "namespace")] pub namespace: Option, - /// Specify the rocks server namespace to use. + /// Specify the luarocks server namespace to use. #[arg(long, value_name = "prefix")] pub lua_dir: Option, @@ -130,7 +130,7 @@ pub enum Commands { Build(Build), /// Runs `luacheck` in the current project. Check, - /// Interact with the rocks configuration. + /// Interact with the lux configuration. #[command(subcommand, arg_required_else_help = true)] Config(ConfigCmd), /// Various debugging utilities. @@ -138,7 +138,7 @@ pub enum Commands { Debug(Debug), /// [UNIMPLEMENTED] Show documentation for an installed rock. Doc(Doc), - /// Download a specific rock file from a rocks server. + /// Download a specific rock file from a luarocks server. #[command(arg_required_else_help = true)] Download(Download), /// Formats the codebase with stylua. @@ -148,7 +148,7 @@ pub enum Commands { /// Install a rock for use on the system. #[command(arg_required_else_help = true)] Install(Install), - /// Install a local RockSpec for use on the system. + /// Install a local rockspec for use on the system. #[command(arg_required_else_help = true)] InstallRockspec(InstallRockspec), /// Manually install and manage Lua headers for various Lua versions. @@ -157,7 +157,7 @@ pub enum Commands { Lint, /// List currently installed rocks. List(ListCmd), - /// Run lua, with the `LUA_PATH` and `LUA_CPATH` set to the specified rocks tree. + /// Run lua, with the `LUA_PATH` and `LUA_CPATH` set to the specified lux tree. Lua(RunLua), /// Create a new Lua project. New(NewProject), @@ -171,14 +171,14 @@ pub enum Commands { Pin(ChangePin), /// Remove all installed rocks from a tree. Purge, - /// Remove a rock from the current project's rocks.toml dependencies. + /// Remove a rock from the current project's lux.toml dependencies. Remove(Remove), - /// Run a command that has been installed with rocks. + /// Run a command that has been installed with lux. /// If the command is not found: - /// When run from within a rocks project, this command will build the project. + /// When run from within a lux project, this command will build the project. /// Otherwise, it will try to install a package named after the command. Run(Run), - /// Query the Luarocks servers. + /// Query the luarocks servers. #[command(arg_required_else_help = true)] Search(Search), /// Synchronise a tree with a lockfile. @@ -191,7 +191,7 @@ pub enum Commands { Unpin(ChangePin), /// Updates all rocks in a project. Update(Update), - /// Upload a rockspec to the public rocks repository. + /// Upload a rockspec to the public luarocks repository. Upload(Upload), /// Tell which file corresponds to a given module name. Which(Which), diff --git a/rocks-bin/src/list.rs b/lux-bin/src/list.rs similarity index 98% rename from rocks-bin/src/list.rs rename to lux-bin/src/list.rs index 4333608e..e25c2adb 100644 --- a/rocks-bin/src/list.rs +++ b/lux-bin/src/list.rs @@ -1,7 +1,7 @@ use clap::Args; use eyre::Result; use itertools::Itertools as _; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, lockfile::PinnedState, }; diff --git a/rocks-bin/src/main.rs b/lux-bin/src/main.rs similarity index 99% rename from rocks-bin/src/main.rs rename to lux-bin/src/main.rs index f2a40654..a12118d3 100644 --- a/rocks-bin/src/main.rs +++ b/lux-bin/src/main.rs @@ -1,7 +1,7 @@ use std::time::Duration; use clap::Parser; -use rocks::{ +use lux::{ add, build, check, config, debug::Debug, doc, download, fetch, format, info, install, install_lua, install_rockspec, list, outdated, @@ -10,7 +10,7 @@ use rocks::{ upload::{self}, which, Cli, Commands, }; -use rocks_lib::{ +use lux_lib::{ config::ConfigBuilder, lockfile::PinnedState::{Pinned, Unpinned}, }; diff --git a/rocks-bin/src/outdated.rs b/lux-bin/src/outdated.rs similarity index 99% rename from rocks-bin/src/outdated.rs rename to lux-bin/src/outdated.rs index 521a24cf..46b07394 100644 --- a/rocks-bin/src/outdated.rs +++ b/lux-bin/src/outdated.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use clap::Args; use eyre::Result; use itertools::Itertools; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, progress::{MultiProgress, Progress}, remote_package_db::RemotePackageDB, diff --git a/rocks-bin/src/pack.rs b/lux-bin/src/pack.rs similarity index 85% rename from rocks-bin/src/pack.rs rename to lux-bin/src/pack.rs index 1512cdd6..67f1022a 100644 --- a/rocks-bin/src/pack.rs +++ b/lux-bin/src/pack.rs @@ -2,14 +2,14 @@ use std::{path::PathBuf, str::FromStr}; use clap::Args; use eyre::{eyre, OptionExt, Result}; -use rocks_lib::{ +use lux_lib::{ build::{Build, BuildBehaviour}, config::{Config, LuaVersion}, lua_rockspec::LuaRockspec, operations::{self, Install}, package::PackageReq, progress::MultiProgress, - project::{rocks_toml::RocksToml, Project}, + project::{project_toml::ProjectToml, Project}, tree::Tree, }; use tempdir::TempDir; @@ -48,7 +48,7 @@ pub struct Pack { /// In case of multiple matches, the latest version will be packed. /// Examples: "pkg", "pkg@1.0.0", "pkg>=1.0.0" /// - /// If not set, rocks will pack the current project's rocks.toml. + /// If not set, rocks will pack the current project's lux.toml. #[clap(value_parser)] package_or_rockspec: Option, } @@ -61,15 +61,15 @@ pub async fn pack(args: Pack, config: Config) -> Result<()> { Some(package_or_rockspec) => package_or_rockspec, None => { let project = Project::current()?.ok_or_eyre("Not in a project!")?; - PackageOrRockspec::RockSpec(project.rocks_path()) + PackageOrRockspec::RockSpec(project.toml_path()) } }; let result: Result = match package_or_rockspec { PackageOrRockspec::Package(package_req) => { let default_tree = config.tree(lua_version.clone())?; match default_tree.match_rocks(&package_req)? { - rocks_lib::tree::RockMatches::NotFound(_) => { - let temp_dir = TempDir::new("rocks-pack")?.into_path(); + lux_lib::tree::RockMatches::NotFound(_) => { + let temp_dir = TempDir::new("lux-pack")?.into_path(); let tree = Tree::new(temp_dir.clone(), lua_version.clone())?; let packages = Install::new(&tree, &config) .package(BuildBehaviour::Force, package_req) @@ -81,14 +81,14 @@ pub async fn pack(args: Pack, config: Config) -> Result<()> { operations::Pack::new(dest_dir, tree, package.clone()).pack()?; Ok(rock_path) } - rocks_lib::tree::RockMatches::Single(local_package_id) => { + lux_lib::tree::RockMatches::Single(local_package_id) => { let lockfile = default_tree.lockfile()?; let package = lockfile.get(&local_package_id).unwrap(); let rock_path = operations::Pack::new(dest_dir, default_tree, package.clone()).pack()?; Ok(rock_path) } - rocks_lib::tree::RockMatches::Many(vec) => { + lux_lib::tree::RockMatches::Many(vec) => { let local_package_id = vec.first().unwrap(); let lockfile = default_tree.lockfile()?; let package = lockfile.get(local_package_id).unwrap(); @@ -107,14 +107,14 @@ pub async fn pack(args: Pack, config: Config) -> Result<()> { .as_str() { ".rockspec" => Ok(LuaRockspec::new(&content)?), - ".toml" => Ok(RocksToml::new(&content)? - .into_validated_rocks_toml()? + ".toml" => Ok(ProjectToml::new(&content)? + .into_validated()? .to_rockspec()?), _ => Err(eyre!( - "expected a path to a .rockspec or rocks.toml or a package requirement." + "expected a path to a .rockspec or lux.toml or a package requirement." )), }?; - let temp_dir = TempDir::new("rocks-pack")?.into_path(); + let temp_dir = TempDir::new("lux-pack")?.into_path(); let bar = progress.map(|p| p.new_bar()); let tree = Tree::new(temp_dir.clone(), lua_version.clone())?; let config = config.with_tree(temp_dir); diff --git a/rocks-bin/src/path.rs b/lux-bin/src/path.rs similarity index 98% rename from rocks-bin/src/path.rs rename to lux-bin/src/path.rs index 15a8355d..e4cf2b7d 100644 --- a/rocks-bin/src/path.rs +++ b/lux-bin/src/path.rs @@ -2,7 +2,7 @@ use std::{env, str::FromStr as _}; use clap::Subcommand; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, path::{BinPath, PackagePath, Paths}, }; @@ -27,13 +27,13 @@ enum PathCmd { /// Generate an export statement for all paths. /// (formatted as a shell command) [Default] Full(FullArgs), - /// Generate a `LUA_PATH` expression for `lua` libraries in the rocks tree. + /// Generate a `LUA_PATH` expression for `lua` libraries in the lux tree. /// (not formatted as a shell command) Lua, - /// Generate a `LUA_CPATH` expression for native `lib` libraries in the rocks tree. + /// Generate a `LUA_CPATH` expression for native `lib` libraries in the lux tree. /// (not formatted as a shell command) C, - /// Generate a `PATH` expression for `bin` executables in the rocks tree. + /// Generate a `PATH` expression for `bin` executables in the lux tree. /// (not formatted as a shell command) Bin, } diff --git a/rocks-bin/src/pin.rs b/lux-bin/src/pin.rs similarity index 79% rename from rocks-bin/src/pin.rs rename to lux-bin/src/pin.rs index 31234aef..5ee6f4c5 100644 --- a/rocks-bin/src/pin.rs +++ b/lux-bin/src/pin.rs @@ -1,11 +1,11 @@ use clap::Args; use eyre::eyre; use eyre::Result; -use rocks_lib::config::{Config, LuaVersion}; -use rocks_lib::lockfile::PinnedState; -use rocks_lib::operations; -use rocks_lib::package::PackageSpec; -use rocks_lib::tree::RockMatches; +use lux_lib::config::{Config, LuaVersion}; +use lux_lib::lockfile::PinnedState; +use lux_lib::operations; +use lux_lib::package::PackageSpec; +use lux_lib::tree::RockMatches; #[derive(Args)] pub struct ChangePin { diff --git a/rocks-bin/src/project/debug.rs b/lux-bin/src/project/debug.rs similarity index 85% rename from rocks-bin/src/project/debug.rs rename to lux-bin/src/project/debug.rs index fad48a06..85c1a2ab 100644 --- a/rocks-bin/src/project/debug.rs +++ b/lux-bin/src/project/debug.rs @@ -1,11 +1,11 @@ use eyre::Result; -use rocks_lib::project::Project; +use lux_lib::project::Project; pub fn debug_project() -> Result<()> { let project = Project::current()?; if let Some(project) = project { - let rocks = project.rocks(); + let rocks = project.toml(); println!("Project Name: {}", rocks.package()); println!("Project Version: {}", rocks.version()); diff --git a/rocks-bin/src/project/mod.rs b/lux-bin/src/project/mod.rs similarity index 100% rename from rocks-bin/src/project/mod.rs rename to lux-bin/src/project/mod.rs diff --git a/rocks-bin/src/project/new.rs b/lux-bin/src/project/new.rs similarity index 98% rename from rocks-bin/src/project/new.rs rename to lux-bin/src/project/new.rs index b9fe8439..899e7c59 100644 --- a/rocks-bin/src/project/new.rs +++ b/lux-bin/src/project/new.rs @@ -12,9 +12,9 @@ use spdx::LicenseId; use spinners::{Spinner, Spinners}; use crate::utils::github_metadata::{self, RepoMetadata}; -use rocks_lib::{ +use lux_lib::{ package::PackageReq, - project::{Project, ROCKS_TOML}, + project::{Project, PROJECT_TOML}, }; // TODO: @@ -111,7 +111,7 @@ pub async fn write_project_rockspec(cli_flags: NewProject) -> Result<()> { if project.is_some() && !Confirm::new("Target directory already has a project, write anyway?") .with_default(false) - .with_help_message(&format!("This may overwrite your existing {}", ROCKS_TOML)) + .with_help_message(&format!("This may overwrite your existing {}", PROJECT_TOML)) .with_render_config(render_config) .prompt()? { @@ -263,7 +263,7 @@ pub async fn write_project_rockspec(cli_flags: NewProject) -> Result<()> { let _ = std::fs::create_dir_all(&cli_flags.directory); - let rocks_path = cli_flags.directory.join(ROCKS_TOML); + let rocks_path = cli_flags.directory.join(PROJECT_TOML); std::fs::write( &rocks_path, diff --git a/rocks-bin/src/purge.rs b/lux-bin/src/purge.rs similarity index 97% rename from rocks-bin/src/purge.rs rename to lux-bin/src/purge.rs index 063f5233..a25862ec 100644 --- a/rocks-bin/src/purge.rs +++ b/lux-bin/src/purge.rs @@ -1,6 +1,6 @@ use eyre::Result; use inquire::Confirm; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, progress::{MultiProgress, ProgressBar}, }; diff --git a/rocks-bin/src/remove.rs b/lux-bin/src/remove.rs similarity index 91% rename from rocks-bin/src/remove.rs rename to lux-bin/src/remove.rs index 8608856f..aaedeaac 100644 --- a/rocks-bin/src/remove.rs +++ b/lux-bin/src/remove.rs @@ -3,7 +3,7 @@ use std::io; use clap::Args; use eyre::{eyre, Result}; use itertools::Itertools; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, operations, package::PackageReq, @@ -11,8 +11,8 @@ use rocks_lib::{ }; // NOTE: This is currently functionally equivalent -// to `rocks uninstall`, but that will change -// when we can use it to edit projects' rocks.toml files. +// to `lux uninstall`, but that will change +// when we can use it to edit projects' lux.toml files. #[derive(Args)] pub struct Remove { @@ -57,7 +57,7 @@ Multiple packages satisfying your version requirements were found: {:#?} Please specify the exact package to uninstall: -> rocks remove '@' +> lux remove '@' ", duplicate_packages, )); diff --git a/rocks-bin/src/run.rs b/lux-bin/src/run.rs similarity index 93% rename from rocks-bin/src/run.rs rename to lux-bin/src/run.rs index fd13a1ea..3646bf7b 100644 --- a/rocks-bin/src/run.rs +++ b/lux-bin/src/run.rs @@ -2,7 +2,7 @@ use std::env; use clap::Args; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, operations::{self, install_command}, path::Paths, @@ -24,7 +24,7 @@ pub struct Run { pub async fn run(run: Run, config: Config) -> Result<()> { let project = Project::current()?; let lua_version = match &project { - Some(prj) => prj.rocks().lua_version_matches(&config)?, + Some(prj) => prj.toml().lua_version_matches(&config)?, None => LuaVersion::from(&config)?, }; let tree = config.tree(lua_version)?; diff --git a/rocks-bin/src/run_lua.rs b/lux-bin/src/run_lua.rs similarity index 95% rename from rocks-bin/src/run_lua.rs rename to lux-bin/src/run_lua.rs index c2081f1c..f14042a3 100644 --- a/rocks-bin/src/run_lua.rs +++ b/lux-bin/src/run_lua.rs @@ -3,7 +3,7 @@ use std::process::Command; use clap::Args; use eyre::{eyre, Result}; use itertools::Itertools; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, lua_installation::get_installed_lua_version, path::Paths, @@ -33,7 +33,7 @@ pub async fn run_lua(run_lua: RunLua, config: Config) -> Result<()> { } let project = Project::current()?; let lua_version = match &project { - Some(prj) => prj.rocks().lua_version_matches(&config)?, + Some(prj) => prj.toml().lua_version_matches(&config)?, None => LuaVersion::from(&config)?, }; match get_installed_lua_version(&lua_cmd).and_then(|ver| Ok(LuaVersion::from_version(ver)?)) { @@ -107,7 +107,7 @@ fn print_lua_help(lua_cmd: &str) -> Result<()> { .join("\n"); print!( " -Usage: rocks lua -- [LUA_OPTIONS] [SCRIPT [ARGS]]... +Usage: lux lua -- [LUA_OPTIONS] [SCRIPT [ARGS]]... Arguments: [LUA_OPTIONS]... @@ -125,7 +125,7 @@ Options: mod test { use std::path::PathBuf; - use rocks_lib::config::ConfigBuilder; + use lux_lib::config::ConfigBuilder; use super::*; diff --git a/rocks-bin/src/search.rs b/lux-bin/src/search.rs similarity index 98% rename from rocks-bin/src/search.rs rename to lux-bin/src/search.rs index b46e065d..108c5050 100644 --- a/rocks-bin/src/search.rs +++ b/lux-bin/src/search.rs @@ -5,7 +5,7 @@ use eyre::Result; use itertools::Itertools; use text_trees::{FormatCharacters, StringTreeNode, TreeFormatting}; -use rocks_lib::{ +use lux_lib::{ config::Config, package::{PackageName, PackageReq, PackageVersion}, progress::{MultiProgress, Progress}, diff --git a/rocks-bin/src/sync.rs b/lux-bin/src/sync.rs similarity index 73% rename from rocks-bin/src/sync.rs rename to lux-bin/src/sync.rs index 0aa0f37a..6b0c052f 100644 --- a/rocks-bin/src/sync.rs +++ b/lux-bin/src/sync.rs @@ -2,12 +2,12 @@ use std::path::PathBuf; use clap::Args; use eyre::{eyre, Context, Result}; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, lockfile::ProjectLockfile, operations, package::PackageReq, - project::{rocks_toml::RocksToml, ROCKS_TOML}, + project::{project_toml::ProjectToml, PROJECT_TOML}, rockspec::Rockspec, }; @@ -16,14 +16,14 @@ pub struct Sync { /// The path to the lockfile to synchronise from. lockfile: PathBuf, - /// Path to a rocks.toml. - /// If set, 'rocks sync' will also synchronise the dependencies in the rocks.toml + /// Path to a lux.toml. + /// If set, 'lux sync' will also synchronise the dependencies in the rocks.toml /// with the lockfile. /// This is useful if dependencies have been added or removed manually /// and the lockfile is out of sync. /// - /// If not set, rocks will check the lockfile's parent directory for a - /// rocks.toml file and use that. + /// If not set, lux will check the lockfile's parent directory for a + /// lux.toml file and use that. manifest_path: Option, /// Skip the integrity checks for installed rocks. @@ -47,9 +47,9 @@ pub async fn sync(args: Sync, config: Config) -> Result<()> { Some(path) } None => { - let rocks_path = args.lockfile.parent().map(|parent| parent.join(ROCKS_TOML)); - if rocks_path.as_ref().is_some_and(|p| p.is_file()) { - rocks_path + let toml_path = args.lockfile.parent().map(|parent| parent.join(PROJECT_TOML)); + if toml_path.as_ref().is_some_and(|p| p.is_file()) { + toml_path } else { None } @@ -59,9 +59,9 @@ pub async fn sync(args: Sync, config: Config) -> Result<()> { if let Some(dependencies) = manifest_path .map(|manifest_path| -> Result> { let content = std::fs::read_to_string(&manifest_path)?; - let rocks = RocksToml::new(&content)?; - Ok(rocks - .into_validated_rocks_toml()? + let toml = ProjectToml::new(&content)?; + Ok(toml + .into_validated()? .dependencies() .current_platform() .clone()) diff --git a/rocks-bin/src/test.rs b/lux-bin/src/test.rs similarity index 88% rename from rocks-bin/src/test.rs rename to lux-bin/src/test.rs index 7f06910f..07f8953e 100644 --- a/rocks-bin/src/test.rs +++ b/lux-bin/src/test.rs @@ -1,6 +1,6 @@ use clap::Args; use eyre::{OptionExt, Result}; -use rocks_lib::{ +use lux_lib::{ config::Config, operations::{self, TestEnv}, project::Project, @@ -21,7 +21,7 @@ pub struct Test { pub async fn test(test: Test, config: Config) -> Result<()> { let project = Project::current()? - .ok_or_eyre("'rocks test' must be run in a project root, with a 'project.rockspec'")?; + .ok_or_eyre("'lux test' must be run in a project root, with a 'project.rockspec'")?; let test_args = test.test_args.unwrap_or_default(); let test_env = if test.impure { TestEnv::Impure diff --git a/rocks-bin/src/uninstall.rs b/lux-bin/src/uninstall.rs similarity index 96% rename from rocks-bin/src/uninstall.rs rename to lux-bin/src/uninstall.rs index b0a0b5a8..34c47a85 100644 --- a/rocks-bin/src/uninstall.rs +++ b/lux-bin/src/uninstall.rs @@ -3,7 +3,7 @@ use std::io; use clap::Args; use eyre::{eyre, Result}; use itertools::Itertools; -use rocks_lib::{ +use lux_lib::{ config::{Config, LuaVersion}, operations, package::PackageReq, @@ -53,7 +53,7 @@ Multiple packages satisfying your version requirements were found: {:#?} Please specify the exact package to uninstall: -> rocks uninstall '@' +> lux uninstall '@' ", duplicate_packages, )); diff --git a/rocks-bin/src/unpack.rs b/lux-bin/src/unpack.rs similarity index 82% rename from rocks-bin/src/unpack.rs rename to lux-bin/src/unpack.rs index 37d4d293..cc8087c6 100644 --- a/rocks-bin/src/unpack.rs +++ b/lux-bin/src/unpack.rs @@ -2,7 +2,7 @@ use std::{fs::File, io::Cursor, path::PathBuf}; use clap::Args; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::Config, operations, package::PackageReq, @@ -11,7 +11,7 @@ use rocks_lib::{ #[derive(Args)] pub struct Unpack { - /// A path to a .src.rock file. Usually obtained via `rocks download`. + /// A path to a .src.rock file. Usually obtained via `lux download`. path: PathBuf, /// Where to unpack the rock. destination: Option, @@ -32,14 +32,14 @@ pub async fn unpack(data: Unpack) -> Result<()> { let progress = MultiProgress::new(); let bar = Progress::Progress(progress.new_bar()); - let unpack_path = rocks_lib::operations::unpack_src_rock(src_file, destination, &bar).await?; + let unpack_path = lux_lib::operations::unpack_src_rock(src_file, destination, &bar).await?; bar.map(|b| { b.finish_with_message(format!( " You may now enter the following directory: {} -and type `rocks make` to build.", +and type `lux make` to build.", unpack_path.display() )) }); @@ -59,14 +59,14 @@ pub async fn unpack_remote(data: UnpackRemote, config: Config) -> Result<()> { let destination = data .path .unwrap_or_else(|| PathBuf::from(format!("{}-{}", &rock.name, &rock.version))); - let unpack_path = rocks_lib::operations::unpack_src_rock(cursor, destination, &bar).await?; + let unpack_path = lux_lib::operations::unpack_src_rock(cursor, destination, &bar).await?; bar.map(|p| { p.finish_with_message(format!( " You may now enter the following directory: {} -and type `rocks make` to build.", +and type `lux make` to build.", unpack_path.display() )) }); diff --git a/rocks-bin/src/update.rs b/lux-bin/src/update.rs similarity index 81% rename from rocks-bin/src/update.rs rename to lux-bin/src/update.rs index 51d388fd..3eb704a7 100644 --- a/rocks-bin/src/update.rs +++ b/lux-bin/src/update.rs @@ -1,9 +1,9 @@ use clap::Args; use eyre::Result; -use rocks_lib::config::LuaVersion; -use rocks_lib::lockfile::PinnedState; -use rocks_lib::progress::{MultiProgress, ProgressBar}; -use rocks_lib::{config::Config, operations}; +use lux_lib::config::LuaVersion; +use lux_lib::lockfile::PinnedState; +use lux_lib::progress::{MultiProgress, ProgressBar}; +use lux_lib::{config::Config, operations}; #[derive(Args)] pub struct Update {} diff --git a/rocks-bin/src/upload.rs b/lux-bin/src/upload.rs similarity index 96% rename from rocks-bin/src/upload.rs rename to lux-bin/src/upload.rs index 583932c1..8cca023e 100644 --- a/rocks-bin/src/upload.rs +++ b/lux-bin/src/upload.rs @@ -1,6 +1,6 @@ use clap::Args; use eyre::Result; -use rocks_lib::{ +use lux_lib::{ config::Config, project::Project, upload::{ProjectUpload, SignatureProtocol}, diff --git a/rocks-bin/src/utils/github_metadata.rs b/lux-bin/src/utils/github_metadata.rs similarity index 100% rename from rocks-bin/src/utils/github_metadata.rs rename to lux-bin/src/utils/github_metadata.rs diff --git a/rocks-bin/src/utils/install.rs b/lux-bin/src/utils/install.rs similarity index 98% rename from rocks-bin/src/utils/install.rs rename to lux-bin/src/utils/install.rs index 3da345b2..9a095b2d 100644 --- a/rocks-bin/src/utils/install.rs +++ b/lux-bin/src/utils/install.rs @@ -1,7 +1,7 @@ //! Utilities for converting a list of packages into a list with the correct build behaviour. use inquire::Confirm; -use rocks_lib::{ +use lux_lib::{ build::BuildBehaviour, lockfile::PinnedState, package::PackageReq, diff --git a/rocks-bin/src/utils/mod.rs b/lux-bin/src/utils/mod.rs similarity index 100% rename from rocks-bin/src/utils/mod.rs rename to lux-bin/src/utils/mod.rs diff --git a/rocks-bin/src/which.rs b/lux-bin/src/which.rs similarity index 83% rename from rocks-bin/src/which.rs rename to lux-bin/src/which.rs index 0a29d9f2..702c1490 100644 --- a/rocks-bin/src/which.rs +++ b/lux-bin/src/which.rs @@ -1,6 +1,6 @@ use clap::Args; use eyre::Result; -use rocks_lib::{config::Config, lua_rockspec::LuaModule, package::PackageReq, which}; +use lux_lib::{config::Config, lua_rockspec::LuaModule, package::PackageReq, which}; #[derive(Args)] pub struct Which { diff --git a/rocks-lib/Cargo.toml b/lux-lib/Cargo.toml similarity index 98% rename from rocks-lib/Cargo.toml rename to lux-lib/Cargo.toml index 5b059f8c..01b27af1 100644 --- a/rocks-lib/Cargo.toml +++ b/lux-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "rocks-lib" +name = "lux-lib" version = "0.1.0" edition = "2021" diff --git a/rocks-lib/resources/test/lua-cjson-2.1.0-1.rockspec b/lux-lib/resources/test/lua-cjson-2.1.0-1.rockspec similarity index 100% rename from rocks-lib/resources/test/lua-cjson-2.1.0-1.rockspec rename to lux-lib/resources/test/lua-cjson-2.1.0-1.rockspec diff --git a/rocks-lib/resources/test/luaposix-35.1-1.rockspec b/lux-lib/resources/test/luaposix-35.1-1.rockspec similarity index 100% rename from rocks-lib/resources/test/luaposix-35.1-1.rockspec rename to lux-lib/resources/test/luaposix-35.1-1.rockspec diff --git a/rocks-lib/resources/test/luatest-0.2-1.src.rock b/lux-lib/resources/test/luatest-0.2-1.src.rock similarity index 100% rename from rocks-lib/resources/test/luatest-0.2-1.src.rock rename to lux-lib/resources/test/luatest-0.2-1.src.rock diff --git a/rocks-lib/resources/test/luv-1.48.0-2.rockspec b/lux-lib/resources/test/luv-1.48.0-2.rockspec similarity index 100% rename from rocks-lib/resources/test/luv-1.48.0-2.rockspec rename to lux-lib/resources/test/luv-1.48.0-2.rockspec diff --git a/lux-lib/resources/test/lux.lock b/lux-lib/resources/test/lux.lock new file mode 100644 index 00000000..61d734f8 --- /dev/null +++ b/lux-lib/resources/test/lux.lock @@ -0,0 +1,15 @@ +{ + "version": "1.0.0", + "dependencies": { + "rocks": {}, + "entrypoints": [] + }, + "test_dependencies": { + "rocks": {}, + "entrypoints": [] + }, + "build_dependencies": { + "rocks": {}, + "entrypoints": [] + } +} \ No newline at end of file diff --git a/rocks-lib/resources/test/make-project/Makefile b/lux-lib/resources/test/make-project/Makefile similarity index 100% rename from rocks-lib/resources/test/make-project/Makefile rename to lux-lib/resources/test/make-project/Makefile diff --git a/rocks-lib/resources/test/make-project/make-project-scm-1.rockspec b/lux-lib/resources/test/make-project/make-project-scm-1.rockspec similarity index 100% rename from rocks-lib/resources/test/make-project/make-project-scm-1.rockspec rename to lux-lib/resources/test/make-project/make-project-scm-1.rockspec diff --git a/rocks-lib/resources/test/manifest-5.1 b/lux-lib/resources/test/manifest-5.1 similarity index 100% rename from rocks-lib/resources/test/manifest-5.1 rename to lux-lib/resources/test/manifest-5.1 diff --git a/rocks-lib/resources/test/patch_test/pack.lua b/lux-lib/resources/test/patch_test/pack.lua similarity index 100% rename from rocks-lib/resources/test/patch_test/pack.lua rename to lux-lib/resources/test/patch_test/pack.lua diff --git a/rocks-lib/resources/test/rocks.lock b/lux-lib/resources/test/rocks.lock similarity index 99% rename from rocks-lib/resources/test/rocks.lock rename to lux-lib/resources/test/rocks.lock index f80f5853..764e0814 100644 --- a/rocks-lib/resources/test/rocks.lock +++ b/lux-lib/resources/test/rocks.lock @@ -274,4 +274,4 @@ "rocks": {}, "entrypoints": [] } -} \ No newline at end of file +} diff --git a/rocks-lib/resources/test/sample-project-busted/.busted b/lux-lib/resources/test/sample-project-busted/.busted similarity index 100% rename from rocks-lib/resources/test/sample-project-busted/.busted rename to lux-lib/resources/test/sample-project-busted/.busted diff --git a/rocks-lib/resources/test/sample-project-busted/.gitignore b/lux-lib/resources/test/sample-project-busted/.gitignore similarity index 100% rename from rocks-lib/resources/test/sample-project-busted/.gitignore rename to lux-lib/resources/test/sample-project-busted/.gitignore diff --git a/rocks-lib/resources/test/sample-project-busted/lua/foo.lua b/lux-lib/resources/test/sample-project-busted/lua/foo.lua similarity index 100% rename from rocks-lib/resources/test/sample-project-busted/lua/foo.lua rename to lux-lib/resources/test/sample-project-busted/lua/foo.lua diff --git a/rocks-lib/resources/test/sample-project-busted/rocks.toml b/lux-lib/resources/test/sample-project-busted/lux.toml similarity index 100% rename from rocks-lib/resources/test/sample-project-busted/rocks.toml rename to lux-lib/resources/test/sample-project-busted/lux.toml diff --git a/rocks-lib/resources/test/sample-project-busted/spec/example_spec.lua b/lux-lib/resources/test/sample-project-busted/spec/example_spec.lua similarity index 100% rename from rocks-lib/resources/test/sample-project-busted/spec/example_spec.lua rename to lux-lib/resources/test/sample-project-busted/spec/example_spec.lua diff --git a/rocks-lib/resources/test/sample-project-extra-rockspec/.gitignore b/lux-lib/resources/test/sample-project-extra-rockspec/.gitignore similarity index 100% rename from rocks-lib/resources/test/sample-project-extra-rockspec/.gitignore rename to lux-lib/resources/test/sample-project-extra-rockspec/.gitignore diff --git a/rocks-lib/resources/test/sample-project-extra-rockspec/extra.rockspec b/lux-lib/resources/test/sample-project-extra-rockspec/extra.rockspec similarity index 100% rename from rocks-lib/resources/test/sample-project-extra-rockspec/extra.rockspec rename to lux-lib/resources/test/sample-project-extra-rockspec/extra.rockspec diff --git a/rocks-lib/resources/test/sample-project-extra-rockspec/lua/foo.lua b/lux-lib/resources/test/sample-project-extra-rockspec/lua/foo.lua similarity index 100% rename from rocks-lib/resources/test/sample-project-extra-rockspec/lua/foo.lua rename to lux-lib/resources/test/sample-project-extra-rockspec/lua/foo.lua diff --git a/rocks-lib/resources/test/sample-project-extra-rockspec/rocks.toml b/lux-lib/resources/test/sample-project-extra-rockspec/lux.toml similarity index 100% rename from rocks-lib/resources/test/sample-project-extra-rockspec/rocks.toml rename to lux-lib/resources/test/sample-project-extra-rockspec/lux.toml diff --git a/rocks-lib/resources/test/sample-project-lockfile-missing-deps/README.md b/lux-lib/resources/test/sample-project-lockfile-missing-deps/README.md similarity index 100% rename from rocks-lib/resources/test/sample-project-lockfile-missing-deps/README.md rename to lux-lib/resources/test/sample-project-lockfile-missing-deps/README.md diff --git a/rocks-lib/resources/test/sample-project-lockfile-missing-deps/lua/foo.lua b/lux-lib/resources/test/sample-project-lockfile-missing-deps/lua/foo.lua similarity index 100% rename from rocks-lib/resources/test/sample-project-lockfile-missing-deps/lua/foo.lua rename to lux-lib/resources/test/sample-project-lockfile-missing-deps/lua/foo.lua diff --git a/rocks-lib/resources/test/sample-project-lockfile-missing-deps/rocks.toml b/lux-lib/resources/test/sample-project-lockfile-missing-deps/lux.toml similarity index 100% rename from rocks-lib/resources/test/sample-project-lockfile-missing-deps/rocks.toml rename to lux-lib/resources/test/sample-project-lockfile-missing-deps/lux.toml diff --git a/rocks-lib/resources/test/sample-project-lockfile-missing-deps/rocks.lock b/lux-lib/resources/test/sample-project-lockfile-missing-deps/rocks.lock similarity index 100% rename from rocks-lib/resources/test/sample-project-lockfile-missing-deps/rocks.lock rename to lux-lib/resources/test/sample-project-lockfile-missing-deps/rocks.lock diff --git a/rocks-lib/resources/test/sample-project-no-build-spec/foo-1.0.0-1.rockspec b/lux-lib/resources/test/sample-project-no-build-spec/foo-1.0.0-1.rockspec similarity index 100% rename from rocks-lib/resources/test/sample-project-no-build-spec/foo-1.0.0-1.rockspec rename to lux-lib/resources/test/sample-project-no-build-spec/foo-1.0.0-1.rockspec diff --git a/rocks-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/baz.lua b/lux-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/baz.lua similarity index 100% rename from rocks-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/baz.lua rename to lux-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/baz.lua diff --git a/rocks-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/init.lua b/lux-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/init.lua similarity index 100% rename from rocks-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/init.lua rename to lux-lib/resources/test/sample-project-no-build-spec/lua/foo/bar/init.lua diff --git a/rocks-lib/resources/test/sample-project-no-build-spec/lua/foo/init.lua b/lux-lib/resources/test/sample-project-no-build-spec/lua/foo/init.lua similarity index 100% rename from rocks-lib/resources/test/sample-project-no-build-spec/lua/foo/init.lua rename to lux-lib/resources/test/sample-project-no-build-spec/lua/foo/init.lua diff --git a/rocks-lib/resources/test/sample-project-no-build-spec/rocks.toml b/lux-lib/resources/test/sample-project-no-build-spec/lux.toml similarity index 100% rename from rocks-lib/resources/test/sample-project-no-build-spec/rocks.toml rename to lux-lib/resources/test/sample-project-no-build-spec/lux.toml diff --git a/rocks-lib/resources/test/sample-project-no-build-spec/src/bin/hello b/lux-lib/resources/test/sample-project-no-build-spec/src/bin/hello similarity index 100% rename from rocks-lib/resources/test/sample-project-no-build-spec/src/bin/hello rename to lux-lib/resources/test/sample-project-no-build-spec/src/bin/hello diff --git a/rocks-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/lib/bat/baz.so b/lux-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/lib/bat/baz.so similarity index 100% rename from rocks-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/lib/bat/baz.so rename to lux-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/lib/bat/baz.so diff --git a/rocks-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/src/foo/bar.lua b/lux-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/src/foo/bar.lua similarity index 100% rename from rocks-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/src/foo/bar.lua rename to lux-lib/resources/test/sample-tree/5.1/04bfd5b08a74ba37c05241ef51d7afc47e1f3379c872dca34d99031b1ea7b855-neorg@8.0.0-1/src/foo/bar.lua diff --git a/rocks-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/lib/bat/baz.so b/lux-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/lib/bat/baz.so similarity index 100% rename from rocks-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/lib/bat/baz.so rename to lux-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/lib/bat/baz.so diff --git a/rocks-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/src/foo/bar.lua b/lux-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/src/foo/bar.lua similarity index 100% rename from rocks-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/src/foo/bar.lua rename to lux-lib/resources/test/sample-tree/5.1/bf813f9f333f9efc8108b86386ea8a2a7aeaff1d5cdf470449d5e5242e3794d3-neorg@8.8.1-1/src/foo/bar.lua diff --git a/rocks-lib/resources/test/sample-tree/5.1/lock.json b/lux-lib/resources/test/sample-tree/5.1/lock.json similarity index 100% rename from rocks-lib/resources/test/sample-tree/5.1/lock.json rename to lux-lib/resources/test/sample-tree/5.1/lock.json diff --git a/rocks-lib/resources/test/toml-edit-0.6.0-1.linux-x86_64.rock b/lux-lib/resources/test/toml-edit-0.6.0-1.linux-x86_64.rock similarity index 100% rename from rocks-lib/resources/test/toml-edit-0.6.0-1.linux-x86_64.rock rename to lux-lib/resources/test/toml-edit-0.6.0-1.linux-x86_64.rock diff --git a/rocks-lib/src/build/builtin.rs b/lux-lib/src/build/builtin.rs similarity index 100% rename from rocks-lib/src/build/builtin.rs rename to lux-lib/src/build/builtin.rs diff --git a/rocks-lib/src/build/cmake.rs b/lux-lib/src/build/cmake.rs similarity index 98% rename from rocks-lib/src/build/cmake.rs rename to lux-lib/src/build/cmake.rs index 207edfc6..f41437f4 100644 --- a/rocks-lib/src/build/cmake.rs +++ b/lux-lib/src/build/cmake.rs @@ -16,7 +16,7 @@ use crate::{ use super::variables; -const CMAKE_BUILD_FILE: &str = "build.rocks"; +const CMAKE_BUILD_FILE: &str = "build.lux"; #[derive(Error, Debug)] pub enum CMakeError { diff --git a/rocks-lib/src/build/command.rs b/lux-lib/src/build/command.rs similarity index 100% rename from rocks-lib/src/build/command.rs rename to lux-lib/src/build/command.rs diff --git a/rocks-lib/src/build/external_dependency.rs b/lux-lib/src/build/external_dependency.rs similarity index 100% rename from rocks-lib/src/build/external_dependency.rs rename to lux-lib/src/build/external_dependency.rs diff --git a/rocks-lib/src/build/luarocks.rs b/lux-lib/src/build/luarocks.rs similarity index 99% rename from rocks-lib/src/build/luarocks.rs rename to lux-lib/src/build/luarocks.rs index 6363add2..1efebae2 100644 --- a/rocks-lib/src/build/luarocks.rs +++ b/lux-lib/src/build/luarocks.rs @@ -69,7 +69,7 @@ fn install( .join("lib") .join("luarocks") .join(format!( - "rocks-{}", + "lux-{}", &lua_version.version_compatibility_str() )) .join(format!("{}", rockspec.package())) diff --git a/rocks-lib/src/build/make.rs b/lux-lib/src/build/make.rs similarity index 100% rename from rocks-lib/src/build/make.rs rename to lux-lib/src/build/make.rs diff --git a/rocks-lib/src/build/mod.rs b/lux-lib/src/build/mod.rs similarity index 98% rename from rocks-lib/src/build/mod.rs rename to lux-lib/src/build/mod.rs index 6fe69fe5..88d0915d 100644 --- a/rocks-lib/src/build/mod.rs +++ b/lux-lib/src/build/mod.rs @@ -279,7 +279,7 @@ async fn do_build( } } - let source_url = match &build.rockspec.source().current_platform().source_spec { + let source_url = match &build.rockspec.source().current_platform().source_spec { crate::lua_rockspec::RockSourceSpec::Git(git_source) => RemotePackageSourceUrl::Git { url: format!("{}", &git_source.url), }, @@ -411,7 +411,7 @@ mod tests { config::{ConfigBuilder, LuaVersion}, lua_installation::LuaInstallation, progress::MultiProgress, - project::rocks_toml::RocksToml, + project::project_toml::ProjectToml, tree::RockLayout, }; @@ -434,12 +434,12 @@ mod tests { }; let lua = LuaInstallation::new(config.lua_version().unwrap_or(&LuaVersion::Lua51), &config); let rockspec_content = String::from_utf8( - std::fs::read("resources/test/sample-project-no-build-spec/rocks.toml").unwrap(), + std::fs::read("resources/test/sample-project-no-build-spec/lux.toml").unwrap(), ) .unwrap(); - let rockspec = RocksToml::new(&rockspec_content) + let rockspec = ProjectToml::new(&rockspec_content) .unwrap() - .into_validated_rocks_toml() + .into_validated() .unwrap(); let progress = Progress::Progress(MultiProgress::new()); run_build( diff --git a/rocks-lib/src/build/patch.rs b/lux-lib/src/build/patch.rs similarity index 100% rename from rocks-lib/src/build/patch.rs rename to lux-lib/src/build/patch.rs diff --git a/rocks-lib/src/build/rust_mlua.rs b/lux-lib/src/build/rust_mlua.rs similarity index 100% rename from rocks-lib/src/build/rust_mlua.rs rename to lux-lib/src/build/rust_mlua.rs diff --git a/rocks-lib/src/build/utils.rs b/lux-lib/src/build/utils.rs similarity index 100% rename from rocks-lib/src/build/utils.rs rename to lux-lib/src/build/utils.rs diff --git a/rocks-lib/src/build/variables.rs b/lux-lib/src/build/variables.rs similarity index 100% rename from rocks-lib/src/build/variables.rs rename to lux-lib/src/build/variables.rs diff --git a/rocks-lib/src/config/external_deps.rs b/lux-lib/src/config/external_deps.rs similarity index 100% rename from rocks-lib/src/config/external_deps.rs rename to lux-lib/src/config/external_deps.rs diff --git a/rocks-lib/src/config/mod.rs b/lux-lib/src/config/mod.rs similarity index 98% rename from rocks-lib/src/config/mod.rs rename to lux-lib/src/config/mod.rs index 62606ff6..9d951557 100644 --- a/rocks-lib/src/config/mod.rs +++ b/lux-lib/src/config/mod.rs @@ -178,7 +178,7 @@ pub struct Config { impl Config { pub fn get_project_dirs() -> Result { - directories::ProjectDirs::from("org", "neorocks", "rocks").ok_or(NoValidHomeDirectory) + directories::ProjectDirs::from("org", "neorocks", "lux").ok_or(NoValidHomeDirectory) } pub fn get_default_cache_path() -> Result { @@ -305,7 +305,7 @@ pub enum ConfigError { NoValidHomeDirectory(#[from] NoValidHomeDirectory), #[error(transparent)] Project(#[from] ProjectError), - #[error("error deserializing rocks config: {0}")] + #[error("error deserializing lux config: {0}")] Deserialize(#[from] toml::de::Error), #[error("error parsing URL: {0}")] UrlParseError(#[from] url::ParseError), @@ -354,9 +354,9 @@ impl ConfigBuilder { } } - /// Get the path to the rocks config file. + /// Get the path to the lux config file. pub fn config_file() -> Result { - let project_dirs = directories::ProjectDirs::from("org", "neorocks", "rocks") + let project_dirs = directories::ProjectDirs::from("org", "neorocks", "lux") .ok_or(NoValidHomeDirectory)?; Ok(project_dirs.config_dir().join("config.toml").to_path_buf()) } @@ -440,7 +440,7 @@ impl ConfigBuilder { .lua_version .or(current_project .as_ref() - .and_then(|project| project.rocks().lua_version())) + .and_then(|project| project.toml().lua_version())) .or(crate::lua_installation::get_installed_lua_version("lua") .ok() .and_then(|version| LuaVersion::from_version(version).ok())); diff --git a/rocks-lib/src/hash.rs b/lux-lib/src/hash.rs similarity index 100% rename from rocks-lib/src/hash.rs rename to lux-lib/src/hash.rs diff --git a/rocks-lib/src/lib.rs b/lux-lib/src/lib.rs similarity index 100% rename from rocks-lib/src/lib.rs rename to lux-lib/src/lib.rs diff --git a/rocks-lib/src/lockfile/mod.rs b/lux-lib/src/lockfile/mod.rs similarity index 100% rename from rocks-lib/src/lockfile/mod.rs rename to lux-lib/src/lockfile/mod.rs diff --git a/rocks-lib/src/lockfile/snapshots/rocks_lib__lockfile__tests__add_rocks.snap b/lux-lib/src/lockfile/snapshots/lux_lib__lockfile__tests__add_rocks.snap similarity index 99% rename from rocks-lib/src/lockfile/snapshots/rocks_lib__lockfile__tests__add_rocks.snap rename to lux-lib/src/lockfile/snapshots/lux_lib__lockfile__tests__add_rocks.snap index c868ce5b..acc72048 100644 --- a/rocks-lib/src/lockfile/snapshots/rocks_lib__lockfile__tests__add_rocks.snap +++ b/lux-lib/src/lockfile/snapshots/lux_lib__lockfile__tests__add_rocks.snap @@ -1,5 +1,5 @@ --- -source: rocks-lib/src/lockfile/mod.rs +source: lux-lib/src/lockfile/mod.rs assertion_line: 1276 expression: lockfile --- diff --git a/rocks-lib/src/lockfile/snapshots/rocks_lib__lockfile__tests__parse_lockfile.snap b/lux-lib/src/lockfile/snapshots/lux_lib__lockfile__tests__parse_lockfile.snap similarity index 99% rename from rocks-lib/src/lockfile/snapshots/rocks_lib__lockfile__tests__parse_lockfile.snap rename to lux-lib/src/lockfile/snapshots/lux_lib__lockfile__tests__parse_lockfile.snap index d2b233df..07ef5642 100644 --- a/rocks-lib/src/lockfile/snapshots/rocks_lib__lockfile__tests__parse_lockfile.snap +++ b/lux-lib/src/lockfile/snapshots/lux_lib__lockfile__tests__parse_lockfile.snap @@ -1,5 +1,5 @@ --- -source: rocks-lib/src/lockfile/mod.rs +source: lux-lib/src/lockfile/mod.rs assertion_line: 1226 expression: lockfile --- diff --git a/rocks-lib/src/lua_installation/mod.rs b/lux-lib/src/lua_installation/mod.rs similarity index 100% rename from rocks-lib/src/lua_installation/mod.rs rename to lux-lib/src/lua_installation/mod.rs diff --git a/rocks-lib/src/lua_rockspec/build/builtin.rs b/lux-lib/src/lua_rockspec/build/builtin.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/build/builtin.rs rename to lux-lib/src/lua_rockspec/build/builtin.rs diff --git a/rocks-lib/src/lua_rockspec/build/cmake.rs b/lux-lib/src/lua_rockspec/build/cmake.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/build/cmake.rs rename to lux-lib/src/lua_rockspec/build/cmake.rs diff --git a/rocks-lib/src/lua_rockspec/build/make.rs b/lux-lib/src/lua_rockspec/build/make.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/build/make.rs rename to lux-lib/src/lua_rockspec/build/make.rs diff --git a/rocks-lib/src/lua_rockspec/build/mod.rs b/lux-lib/src/lua_rockspec/build/mod.rs similarity index 99% rename from rocks-lib/src/lua_rockspec/build/mod.rs rename to lux-lib/src/lua_rockspec/build/mod.rs index 7ec10086..c9de0fbf 100644 --- a/rocks-lib/src/lua_rockspec/build/mod.rs +++ b/lux-lib/src/lua_rockspec/build/mod.rs @@ -223,7 +223,7 @@ impl Default for BuildBackendSpec { /// When selecting a backend, one may provide extra parameters /// to `build = { ... }` in order to further customize the behaviour of the build step. /// -/// Luarocks provides several default build types, these are also reflected in `rocks` +/// Luarocks provides several default build types, these are also reflected in `lux` /// for compatibility. #[derive(Debug, PartialEq, Clone)] pub enum BuildBackendSpec { diff --git a/rocks-lib/src/lua_rockspec/build/rust_mlua.rs b/lux-lib/src/lua_rockspec/build/rust_mlua.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/build/rust_mlua.rs rename to lux-lib/src/lua_rockspec/build/rust_mlua.rs diff --git a/rocks-lib/src/lua_rockspec/dependency.rs b/lux-lib/src/lua_rockspec/dependency.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/dependency.rs rename to lux-lib/src/lua_rockspec/dependency.rs diff --git a/rocks-lib/src/lua_rockspec/mod.rs b/lux-lib/src/lua_rockspec/mod.rs similarity index 98% rename from rocks-lib/src/lua_rockspec/mod.rs rename to lux-lib/src/lua_rockspec/mod.rs index 588594d5..9b1ec835 100644 --- a/rocks-lib/src/lua_rockspec/mod.rs +++ b/lux-lib/src/lua_rockspec/mod.rs @@ -402,14 +402,14 @@ mod tests { assert_eq!(rockspec.description, RockDescription::default()); let rockspec_content = " - package = 'rocks'\n + package = 'rocks.nvim'\n version = '3.0.0-1'\n description = {\n summary = 'some summary', detailed = 'some detailed description', license = 'MIT', - homepage = 'https://github.com/nvim-neorocks/rocks', - issues_url = 'https://github.com/nvim-neorocks/rocks/issues', + homepage = 'https://github.com/nvim-neorocks/rocks.nvim', + issues_url = 'https://github.com/nvim-neorocks/rocks.nvim/issues', maintainer = 'neorocks', }\n source = {\n @@ -419,28 +419,28 @@ mod tests { .to_string(); let rockspec = LuaRockspec::new(&rockspec_content).unwrap(); assert_eq!(rockspec.rockspec_format, None); - assert_eq!(rockspec.package, "rocks".into()); + assert_eq!(rockspec.package, "rocks.nvim".into()); assert_eq!(rockspec.version, "3.0.0-1".parse().unwrap()); let expected_description = RockDescription { summary: Some("some summary".into()), detailed: Some("some detailed description".into()), license: Some("MIT".into()), - homepage: Some(Url::parse("https://github.com/nvim-neorocks/rocks").unwrap()), - issues_url: Some("https://github.com/nvim-neorocks/rocks/issues".into()), + homepage: Some(Url::parse("https://github.com/nvim-neorocks/rocks.nvim").unwrap()), + issues_url: Some("https://github.com/nvim-neorocks/rocks.nvim/issues".into()), maintainer: Some("neorocks".into()), labels: Vec::new(), }; assert_eq!(rockspec.description, expected_description); let rockspec_content = " - package = 'rocks'\n + package = 'rocks.nvim'\n version = '3.0.0-1'\n description = {\n summary = 'some summary', detailed = 'some detailed description', license = 'MIT', - homepage = 'https://github.com/nvim-neorocks/rocks', - issues_url = 'https://github.com/nvim-neorocks/rocks/issues', + homepage = 'https://github.com/nvim-neorocks/rocks.nvim', + issues_url = 'https://github.com/nvim-neorocks/rocks.nvim/issues', maintainer = 'neorocks', labels = {}, }\n @@ -452,14 +452,14 @@ mod tests { .to_string(); let rockspec = LuaRockspec::new(&rockspec_content).unwrap(); assert_eq!(rockspec.rockspec_format, None); - assert_eq!(rockspec.package, "rocks".into()); + assert_eq!(rockspec.package, "rocks.nvim".into()); assert_eq!(rockspec.version, "3.0.0-1".parse().unwrap()); let expected_description = RockDescription { summary: Some("some summary".into()), detailed: Some("some detailed description".into()), license: Some("MIT".into()), - homepage: Some(Url::parse("https://github.com/nvim-neorocks/rocks").unwrap()), - issues_url: Some("https://github.com/nvim-neorocks/rocks/issues".into()), + homepage: Some(Url::parse("https://github.com/nvim-neorocks/rocks.nvim").unwrap()), + issues_url: Some("https://github.com/nvim-neorocks/rocks.nvim/issues".into()), maintainer: Some("neorocks".into()), labels: Vec::new(), }; @@ -470,14 +470,14 @@ mod tests { ); let rockspec_content = " - package = 'rocks'\n + package = 'rocks.nvim'\n version = '3.0.0-1'\n description = {\n summary = 'some summary', detailed = 'some detailed description', license = 'MIT', - homepage = 'https://github.com/nvim-neorocks/rocks', - issues_url = 'https://github.com/nvim-neorocks/rocks/issues', + homepage = 'https://github.com/nvim-neorocks/rocks.nvim', + issues_url = 'https://github.com/nvim-neorocks/rocks.nvim/issues', maintainer = 'neorocks', labels = { 'package management', }, }\n @@ -494,14 +494,14 @@ mod tests { .to_string(); let rockspec = LuaRockspec::new(&rockspec_content).unwrap(); assert_eq!(rockspec.rockspec_format, None); - assert_eq!(rockspec.package, "rocks".into()); + assert_eq!(rockspec.package, "rocks.nvim".into()); assert_eq!(rockspec.version, "3.0.0-1".parse().unwrap()); let expected_description = RockDescription { summary: Some("some summary".into()), detailed: Some("some detailed description".into()), license: Some("MIT".into()), - homepage: Some(Url::parse("https://github.com/nvim-neorocks/rocks").unwrap()), - issues_url: Some("https://github.com/nvim-neorocks/rocks/issues".into()), + homepage: Some(Url::parse("https://github.com/nvim-neorocks/rocks.nvim").unwrap()), + issues_url: Some("https://github.com/nvim-neorocks/rocks.nvim/issues".into()), maintainer: Some("neorocks".into()), labels: vec!["package management".into()], }; diff --git a/rocks-lib/src/lua_rockspec/partial.rs b/lux-lib/src/lua_rockspec/partial.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/partial.rs rename to lux-lib/src/lua_rockspec/partial.rs diff --git a/rocks-lib/src/lua_rockspec/platform.rs b/lux-lib/src/lua_rockspec/platform.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/platform.rs rename to lux-lib/src/lua_rockspec/platform.rs diff --git a/rocks-lib/src/lua_rockspec/rock_source.rs b/lux-lib/src/lua_rockspec/rock_source.rs similarity index 96% rename from rocks-lib/src/lua_rockspec/rock_source.rs rename to lux-lib/src/lua_rockspec/rock_source.rs index 9c00f2f0..3a33b26d 100644 --- a/rocks-lib/src/lua_rockspec/rock_source.rs +++ b/lux-lib/src/lua_rockspec/rock_source.rs @@ -223,13 +223,13 @@ pub enum SourceUrlError { Io(#[from] io::Error), Git(#[from] GitUrlParseError), Url(#[source] ::Err), - #[error("rocks does not support rockspecs with CVS sources.")] + #[error("lux does not support rockspecs with CVS sources.")] CVS, - #[error("rocks does not support rockspecs with mercurial sources.")] + #[error("lux does not support rockspecs with mercurial sources.")] Mercurial, - #[error("rocks does not support rockspecs with SSCM sources.")] + #[error("lux does not support rockspecs with SSCM sources.")] SSCM, - #[error("rocks does not support rockspecs with SVN sources.")] + #[error("lux does not support rockspecs with SVN sources.")] SVN, #[error("unsupported source url: {0}")] Unsupported(String), @@ -305,7 +305,7 @@ mod tests { #[tokio::test] async fn parse_source_url() { - let dir = TempDir::new("rocks-test").unwrap().into_path(); + let dir = TempDir::new("lux-test").unwrap().into_path(); let url: SourceUrl = format!("file://{}", dir.to_string_lossy()).parse().unwrap(); assert_eq!(url, SourceUrl::File(dir)); let url: SourceUrl = "ftp://example.com/foo".parse().unwrap(); diff --git a/rocks-lib/src/lua_rockspec/serde_util.rs b/lux-lib/src/lua_rockspec/serde_util.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/serde_util.rs rename to lux-lib/src/lua_rockspec/serde_util.rs diff --git a/rocks-lib/src/lua_rockspec/test_spec.rs b/lux-lib/src/lua_rockspec/test_spec.rs similarity index 100% rename from rocks-lib/src/lua_rockspec/test_spec.rs rename to lux-lib/src/lua_rockspec/test_spec.rs diff --git a/rocks-lib/src/luarocks/install_binary_rock.rs b/lux-lib/src/luarocks/install_binary_rock.rs similarity index 98% rename from rocks-lib/src/luarocks/install_binary_rock.rs rename to lux-lib/src/luarocks/install_binary_rock.rs index 58acad4f..4cc02c2d 100644 --- a/rocks-lib/src/luarocks/install_binary_rock.rs +++ b/lux-lib/src/luarocks/install_binary_rock.rs @@ -125,7 +125,7 @@ impl<'a> BinaryRockInstall<'a> { match tree.lockfile()?.get(&package.id()) { Some(package) if self.behaviour == BuildBehaviour::NoForce => Ok(package.clone()), _ => { - let unpack_dir = TempDir::new("rocks-bin-rock").unwrap().into_path(); + let unpack_dir = TempDir::new("lux-bin-rock").unwrap().into_path(); let cursor = Cursor::new(self.rock_bytes); let mut zip = zip::ZipArchive::new(cursor)?; zip.extract(&unpack_dir)?; @@ -216,7 +216,7 @@ mod test { /// are the same. #[tokio::test] async fn install_binary_rock_roundtrip() { - if std::env::var("ROCKS_SKIP_IMPURE_TESTS").unwrap_or("0".into()) == "1" { + if std::env::var("LUX_SKIP_IMPURE_TESTS").unwrap_or("0".into()) == "1" { println!("Skipping impure test"); return; } diff --git a/rocks-lib/src/luarocks/luarocks_installation.rs b/lux-lib/src/luarocks/luarocks_installation.rs similarity index 99% rename from rocks-lib/src/luarocks/luarocks_installation.rs rename to lux-lib/src/luarocks/luarocks_installation.rs index 231d9481..7e7b76cf 100644 --- a/rocks-lib/src/luarocks/luarocks_installation.rs +++ b/lux-lib/src/luarocks/luarocks_installation.rs @@ -248,7 +248,7 @@ impl LuaRocksInstallation { ) -> Result<(), ExecLuaRocksError> { let luarocks_paths = Paths::new(self.tree)?; // Ensure a pure environment so we can do parallel builds - let temp_dir = TempDir::new("rocks-run-luarocks").unwrap(); + let temp_dir = TempDir::new("lux-run-luarocks").unwrap(); let luarocks_config_content = format!( " variables = {{ diff --git a/rocks-lib/src/luarocks/mod.rs b/lux-lib/src/luarocks/mod.rs similarity index 100% rename from rocks-lib/src/luarocks/mod.rs rename to lux-lib/src/luarocks/mod.rs diff --git a/rocks-lib/src/luarocks/rock_manifest.rs b/lux-lib/src/luarocks/rock_manifest.rs similarity index 100% rename from rocks-lib/src/luarocks/rock_manifest.rs rename to lux-lib/src/luarocks/rock_manifest.rs diff --git a/rocks-lib/src/manifest/mod.rs b/lux-lib/src/manifest/mod.rs similarity index 99% rename from rocks-lib/src/manifest/mod.rs rename to lux-lib/src/manifest/mod.rs index 2c854033..e9d4f8df 100644 --- a/rocks-lib/src/manifest/mod.rs +++ b/lux-lib/src/manifest/mod.rs @@ -69,7 +69,7 @@ async fn manifest_from_server( .replace(&[':', '*', '?', '"', '<', '>', '|', '/', '\\'][..], "_"), ); - // Ensure all intermediate directories for the cache file are created (e.g. `~/.cache/rocks/manifest`) + // Ensure all intermediate directories for the cache file are created (e.g. `~/.cache/lux/manifest`) fs::create_dir_all(cache.parent().unwrap()).await?; let client = Client::new(); diff --git a/rocks-lib/src/manifest/pull_manifest.rs b/lux-lib/src/manifest/pull_manifest.rs similarity index 100% rename from rocks-lib/src/manifest/pull_manifest.rs rename to lux-lib/src/manifest/pull_manifest.rs diff --git a/rocks-lib/src/operations/download.rs b/lux-lib/src/operations/download.rs similarity index 100% rename from rocks-lib/src/operations/download.rs rename to lux-lib/src/operations/download.rs diff --git a/rocks-lib/src/operations/fetch.rs b/lux-lib/src/operations/fetch.rs similarity index 100% rename from rocks-lib/src/operations/fetch.rs rename to lux-lib/src/operations/fetch.rs diff --git a/rocks-lib/src/operations/install.rs b/lux-lib/src/operations/install.rs similarity index 98% rename from rocks-lib/src/operations/install.rs rename to lux-lib/src/operations/install.rs index d579b0fd..ac160076 100644 --- a/rocks-lib/src/operations/install.rs +++ b/lux-lib/src/operations/install.rs @@ -96,7 +96,7 @@ impl<'a> Install<'a> { } } - /// Attach a project to the install phase (also affects the project's `rocks.lock`). + /// Attach a project to the install phase (also affects the project's `lux.lock`). pub fn project(self, project: &'a Project) -> Self { Self { project: Some(project), @@ -258,7 +258,7 @@ async fn install_impl( .await? } RemoteRockDownload::SrcRock { .. } => todo!( - "rocks does not yet support installing .src.rock packages without a rockspec" + "lux does not yet support installing .src.rock packages without a rockspec" ), }; diff --git a/rocks-lib/src/operations/mod.rs b/lux-lib/src/operations/mod.rs similarity index 100% rename from rocks-lib/src/operations/mod.rs rename to lux-lib/src/operations/mod.rs diff --git a/rocks-lib/src/operations/pack.rs b/lux-lib/src/operations/pack.rs similarity index 98% rename from rocks-lib/src/operations/pack.rs rename to lux-lib/src/operations/pack.rs index e77be847..9497fb1f 100644 --- a/rocks-lib/src/operations/pack.rs +++ b/lux-lib/src/operations/pack.rs @@ -76,7 +76,7 @@ fn do_pack(args: Pack) -> Result { let lib_entries = add_rock_entries(&mut zip, &layout.lib, "lib".into())?; let doc_entries = add_rock_entries(&mut zip, &layout.doc, "doc".into())?; // We copy entries from `etc` to the root directory, as luarocks doesn't have an etc directory. - let temp_dir = TempDir::new("rocks-pack-temp-root").unwrap().into_path(); + let temp_dir = TempDir::new("lux-pack-temp-root").unwrap().into_path(); utils::recursive_copy_dir(&layout.etc, &temp_dir)?; // prevent duplicate doc entries let doc = temp_dir.join("doc"); diff --git a/rocks-lib/src/operations/pin.rs b/lux-lib/src/operations/pin.rs similarity index 100% rename from rocks-lib/src/operations/pin.rs rename to lux-lib/src/operations/pin.rs diff --git a/rocks-lib/src/operations/remove.rs b/lux-lib/src/operations/remove.rs similarity index 98% rename from rocks-lib/src/operations/remove.rs rename to lux-lib/src/operations/remove.rs index 90d87a46..3804edf2 100644 --- a/rocks-lib/src/operations/remove.rs +++ b/lux-lib/src/operations/remove.rs @@ -119,7 +119,7 @@ async fn remove_package( tokio::fs::remove_dir_all(tree.root_for(&package)).await?; - // Delete the corresponding binaries attached to the current package (located under `{ROCKS_TREE}/bin/`) + // Delete the corresponding binaries attached to the current package (located under `{LUX_TREE}/bin/`) for relative_binary_path in package.spec.binaries() { let binary_path = tree.bin().join( relative_binary_path diff --git a/rocks-lib/src/operations/resolve.rs b/lux-lib/src/operations/resolve.rs similarity index 100% rename from rocks-lib/src/operations/resolve.rs rename to lux-lib/src/operations/resolve.rs diff --git a/rocks-lib/src/operations/run.rs b/lux-lib/src/operations/run.rs similarity index 100% rename from rocks-lib/src/operations/run.rs rename to lux-lib/src/operations/run.rs diff --git a/rocks-lib/src/operations/sync.rs b/lux-lib/src/operations/sync.rs similarity index 96% rename from rocks-lib/src/operations/sync.rs rename to lux-lib/src/operations/sync.rs index b51652b7..76c3a944 100644 --- a/rocks-lib/src/operations/sync.rs +++ b/lux-lib/src/operations/sync.rs @@ -233,12 +233,12 @@ mod tests { #[tokio::test] async fn test_sync_add_rocks() { - if std::env::var("ROCKS_SKIP_IMPURE_TESTS").unwrap_or("0".into()) == "1" { + if std::env::var("LUX_SKIP_IMPURE_TESTS").unwrap_or("0".into()) == "1" { println!("Skipping impure test"); return; } let project_lockfile_path = - PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("resources/test/rocks.lock"); + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("resources/test/lux.lock"); let mut source_lockfile = ProjectLockfile::new(project_lockfile_path.clone()).unwrap(); let temp_dir = TempDir::new().unwrap(); let config = ConfigBuilder::new() @@ -262,12 +262,12 @@ mod tests { #[tokio::test] async fn test_sync_add_rocks_with_new_package() { - if std::env::var("ROCKS_SKIP_IMPURE_TESTS").unwrap_or("0".into()) == "1" { + if std::env::var("LUX_SKIP_IMPURE_TESTS").unwrap_or("0".into()) == "1" { println!("Skipping impure test"); return; } let empty_lockfile_dir = TempDir::new().unwrap(); - let lockfile_path = empty_lockfile_dir.path().join("rocks.lock"); + let lockfile_path = empty_lockfile_dir.path().join("lux.lock"); let mut empty_lockfile = ProjectLockfile::new(lockfile_path.clone()).unwrap(); let temp_dir = TempDir::new().unwrap(); let config = ConfigBuilder::new() @@ -303,7 +303,7 @@ mod tests { let temp_dir = TempDir::new().unwrap(); temp_dir.copy_from(&tree_path, &["**"]).unwrap(); let empty_lockfile_dir = TempDir::new().unwrap(); - let lockfile_path = empty_lockfile_dir.path().join("rocks.lock"); + let lockfile_path = empty_lockfile_dir.path().join("lux.lock"); let mut empty_lockfile = ProjectLockfile::new(lockfile_path.clone()).unwrap(); let config = ConfigBuilder::new() .unwrap() diff --git a/rocks-lib/src/operations/test.rs b/lux-lib/src/operations/test.rs similarity index 97% rename from rocks-lib/src/operations/test.rs rename to lux-lib/src/operations/test.rs index b456a495..1cbb3e2f 100644 --- a/rocks-lib/src/operations/test.rs +++ b/lux-lib/src/operations/test.rs @@ -6,7 +6,7 @@ use crate::{ package::{PackageName, PackageReq, PackageVersionReqError}, path::Paths, progress::{MultiProgress, Progress}, - project::{rocks_toml::RocksTomlValidationError, Project, ProjectTreeError}, + project::{project_toml::ProjectTomlValidationError, Project, ProjectTreeError}, rockspec::Rockspec, tree::Tree, }; @@ -81,13 +81,13 @@ pub enum RunTestsError { #[error(transparent)] Tree(#[from] ProjectTreeError), #[error(transparent)] - RocksTomlValidation(#[from] RocksTomlValidationError), + ProjectTomlValidation(#[from] ProjectTomlValidationError), #[error("failed to sync dependencies: {0}")] Sync(#[from] SyncError), } async fn run_tests(test: Test<'_>) -> Result<(), RunTestsError> { - let rocks = test.project.rocks().into_validated_rocks_toml()?; + let rocks = test.project.toml().into_validated()?; let project_tree = test.project.tree(test.config)?; let test_tree = test.project.test_tree(test.config)?; std::fs::create_dir_all(test_tree.root())?; diff --git a/rocks-lib/src/operations/unpack.rs b/lux-lib/src/operations/unpack.rs similarity index 99% rename from rocks-lib/src/operations/unpack.rs rename to lux-lib/src/operations/unpack.rs index e59ae608..e76643ab 100644 --- a/rocks-lib/src/operations/unpack.rs +++ b/lux-lib/src/operations/unpack.rs @@ -227,7 +227,7 @@ mod tests { .join("test") .join("luatest-0.2-1.src.rock"); let file = File::open(&test_rock_path).unwrap(); - let dest = TempDir::new("rocks-test").unwrap(); + let dest = TempDir::new("lux-test").unwrap(); unpack_src_rock( file, dest.into_path(), diff --git a/rocks-lib/src/operations/update.rs b/lux-lib/src/operations/update.rs similarity index 100% rename from rocks-lib/src/operations/update.rs rename to lux-lib/src/operations/update.rs diff --git a/rocks-lib/src/package/mod.rs b/lux-lib/src/package/mod.rs similarity index 100% rename from rocks-lib/src/package/mod.rs rename to lux-lib/src/package/mod.rs diff --git a/rocks-lib/src/package/outdated.rs b/lux-lib/src/package/outdated.rs similarity index 100% rename from rocks-lib/src/package/outdated.rs rename to lux-lib/src/package/outdated.rs diff --git a/rocks-lib/src/package/version.rs b/lux-lib/src/package/version.rs similarity index 100% rename from rocks-lib/src/package/version.rs rename to lux-lib/src/package/version.rs diff --git a/rocks-lib/src/path.rs b/lux-lib/src/path.rs similarity index 100% rename from rocks-lib/src/path.rs rename to lux-lib/src/path.rs diff --git a/rocks-lib/src/progress.rs b/lux-lib/src/progress.rs similarity index 100% rename from rocks-lib/src/progress.rs rename to lux-lib/src/progress.rs diff --git a/rocks-lib/src/project/mod.rs b/lux-lib/src/project/mod.rs similarity index 80% rename from rocks-lib/src/project/mod.rs rename to lux-lib/src/project/mod.rs index 1fc93aa0..f8c4005b 100644 --- a/rocks-lib/src/project/mod.rs +++ b/lux-lib/src/project/mod.rs @@ -1,5 +1,5 @@ use lets_find_up::{find_up_with, FindUpKind, FindUpOptions}; -use rocks_toml::{RocksToml, RocksTomlValidationError}; +use project_toml::{ProjectToml, ProjectTomlValidationError}; use std::{ collections::HashMap, io, @@ -21,16 +21,16 @@ use crate::{ tree::Tree, }; -pub mod rocks_toml; +pub mod project_toml; -pub const ROCKS_TOML: &str = "rocks.toml"; +pub const PROJECT_TOML: &str = "lux.toml"; pub const EXTRA_ROCKSPEC: &str = "extra.rockspec"; #[derive(Error, Debug)] #[error(transparent)] pub enum ProjectError { Io(#[from] io::Error), - Rocks(#[from] RocksTomlValidationError), + Project(#[from] ProjectTomlValidationError), Toml(#[from] toml::de::Error), #[error("error when parsing `extra.rockspec`: {0}")] Rockspec(#[from] PartialRockspecError), @@ -39,7 +39,7 @@ pub enum ProjectError { #[derive(Error, Debug)] #[error(transparent)] pub enum IntoRockspecError { - RocksTomlValidationError(#[from] RocksTomlValidationError), + RocksTomlValidationError(#[from] ProjectTomlValidationError), RockspecError(#[from] RockspecError), } @@ -66,10 +66,10 @@ pub enum ProjectTreeError { #[derive(Clone, Debug)] pub struct Project { - /// The path where the `rocks.toml` resides. + /// The path where the `lux.toml` resides. root: PathBuf, - /// The parsed rocks.toml. - rocks: RocksToml, + /// The parsed lux.toml. + toml: ProjectToml, } impl Project { @@ -83,23 +83,23 @@ impl Project { } match find_up_with( - ROCKS_TOML, + PROJECT_TOML, FindUpOptions { cwd: start.as_ref(), kind: FindUpKind::File, }, )? { Some(path) => { - let rocks_content = std::fs::read_to_string(&path)?; + let toml_content = std::fs::read_to_string(&path)?; let root = path.parent().unwrap(); let mut project = Project { root: root.to_path_buf(), - rocks: RocksToml::new(&rocks_content)?, + toml: ProjectToml::new(&toml_content)?, }; if let Some(extra_rockspec) = project.extra_rockspec()? { - project.rocks = project.rocks.merge(extra_rockspec); + project.toml = project.toml.merge(extra_rockspec); } std::fs::create_dir_all(root)?; @@ -110,9 +110,9 @@ impl Project { } } - /// Get the `rocks.toml` path. - pub fn rocks_path(&self) -> PathBuf { - self.root.join(ROCKS_TOML) + /// Get the `lux.toml` path. + pub fn toml_path(&self) -> PathBuf { + self.root.join(PROJECT_TOML) } /// Get the `extra.rockspec` path. @@ -120,17 +120,17 @@ impl Project { self.root.join(EXTRA_ROCKSPEC) } - /// Get the `rocks.lock` lockfile path. + /// Get the `lux.lock` lockfile path. pub fn lockfile_path(&self) -> PathBuf { - self.root.join("rocks.lock") + self.root.join("lux.lock") } - /// Get the `rocks.lock` lockfile in the project root. + /// Get the `lux.lock` lockfile in the project root. pub fn lockfile(&self) -> Result, io::Error> { ProjectLockfile::new(self.lockfile_path()) } - /// Get the `rocks.lock` lockfile in the project root, if present. + /// Get the `lux.lock` lockfile in the project root, if present. pub fn try_lockfile(&self) -> Result>, io::Error> { let path = self.lockfile_path(); if path.is_file() { @@ -144,12 +144,12 @@ impl Project { &self.root } - pub fn rocks(&self) -> &RocksToml { - &self.rocks + pub fn toml(&self) -> &ProjectToml { + &self.toml } pub fn rockspec(&self) -> Result { - Ok(self.rocks().into_validated_rocks_toml()?.to_rockspec()?) + Ok(self.toml().into_validated()?.to_rockspec()?) } pub fn extra_rockspec(&self) -> Result, PartialRockspecError> { @@ -174,7 +174,7 @@ impl Project { } fn tree_root_dir(&self) -> PathBuf { - self.root.join(".rocks") + self.root.join(".lux") } pub fn tree(&self, config: &Config) -> Result { @@ -189,7 +189,7 @@ impl Project { } pub fn lua_version(&self, config: &Config) -> Result { - self.rocks().lua_version_matches(config) + self.toml().lua_version_matches(config) } pub async fn add( @@ -197,39 +197,39 @@ impl Project { dependencies: DependencyType, package_db: &RemotePackageDB, ) -> Result<(), ProjectEditError> { - let mut rocks = - toml_edit::DocumentMut::from_str(&tokio::fs::read_to_string(self.rocks_path()).await?)?; + let mut project_toml = + toml_edit::DocumentMut::from_str(&tokio::fs::read_to_string(self.toml_path()).await?)?; - if !rocks.contains_table("dependencies") { + if !project_toml.contains_table("dependencies") { let mut table = toml_edit::table().into_table().unwrap(); table.set_implicit(true); - rocks["dependencies"] = toml_edit::Item::Table(table); + project_toml["dependencies"] = toml_edit::Item::Table(table); } - if !rocks.contains_table("build_dependencies") { + if !project_toml.contains_table("build_dependencies") { let mut table = toml_edit::table().into_table().unwrap(); table.set_implicit(true); - rocks["build_dependencies"] = toml_edit::Item::Table(table); + project_toml["build_dependencies"] = toml_edit::Item::Table(table); } - if !rocks.contains_table("test_dependencies") { + if !project_toml.contains_table("test_dependencies") { let mut table = toml_edit::table().into_table().unwrap(); table.set_implicit(true); - rocks["test_dependencies"] = toml_edit::Item::Table(table); + project_toml["test_dependencies"] = toml_edit::Item::Table(table); } - if !rocks.contains_table("external_dependencies") { + if !project_toml.contains_table("external_dependencies") { let mut table = toml_edit::table().into_table().unwrap(); table.set_implicit(true); - rocks["external_dependencies"] = toml_edit::Item::Table(table); + project_toml["external_dependencies"] = toml_edit::Item::Table(table); } let table = match dependencies { - DependencyType::Regular(_) => &mut rocks["dependencies"], - DependencyType::Build(_) => &mut rocks["build_dependencies"], - DependencyType::Test(_) => &mut rocks["test_dependencies"], - DependencyType::External(_) => &mut rocks["external_dependencies"], + DependencyType::Regular(_) => &mut project_toml["dependencies"], + DependencyType::Build(_) => &mut project_toml["build_dependencies"], + DependencyType::Test(_) => &mut project_toml["test_dependencies"], + DependencyType::External(_) => &mut project_toml["external_dependencies"], }; match dependencies { @@ -269,12 +269,12 @@ impl Project { } }; - tokio::fs::write(self.rocks_path(), rocks.to_string()).await?; + tokio::fs::write(self.toml_path(), project_toml.to_string()).await?; match dependencies { DependencyType::Regular(deps) => { - self.rocks.dependencies = Some( - self.rocks + self.toml.dependencies = Some( + self.toml .dependencies .take() .unwrap_or_default() @@ -284,8 +284,8 @@ impl Project { ) } DependencyType::Build(deps) => { - self.rocks.build_dependencies = Some( - self.rocks + self.toml.build_dependencies = Some( + self.toml .build_dependencies .take() .unwrap_or_default() @@ -295,8 +295,8 @@ impl Project { ) } DependencyType::Test(deps) => { - self.rocks.test_dependencies = Some( - self.rocks + self.toml.test_dependencies = Some( + self.toml .test_dependencies .take() .unwrap_or_default() @@ -306,8 +306,8 @@ impl Project { ) } DependencyType::External(deps) => { - self.rocks.external_dependencies = Some( - self.rocks + self.toml.external_dependencies = Some( + self.toml .external_dependencies .take() .unwrap_or_default() @@ -391,24 +391,24 @@ mod tests { .collect() }; - // Reparse the rocks.toml (not usually necessary, but we want to test that the file was + // Reparse the lux.toml (not usually necessary, but we want to test that the file was // written correctly) let project = Project::from(&project_root).unwrap().unwrap(); - let validated_rocks_toml = project.rocks().into_validated_rocks_toml().unwrap(); + let validated_toml = project.toml().into_validated().unwrap(); assert_eq!( - strip_lua(validated_rocks_toml.dependencies().current_platform()), + strip_lua(validated_toml.dependencies().current_platform()), expected_dependencies ); assert_eq!( - strip_lua(validated_rocks_toml.build_dependencies().current_platform()), + strip_lua(validated_toml.build_dependencies().current_platform()), expected_dependencies ); assert_eq!( - strip_lua(validated_rocks_toml.test_dependencies().current_platform()), + strip_lua(validated_toml.test_dependencies().current_platform()), expected_dependencies ); assert_eq!( - validated_rocks_toml + validated_toml .external_dependencies() .current_platform() .get("lib") @@ -429,7 +429,7 @@ mod tests { assert!(extra_rockspec.is_some()); - let rocks = project.rocks().into_validated_rocks_toml().unwrap(); + let rocks = project.toml().into_validated().unwrap(); assert_eq!(rocks.package().to_string(), "custom-package"); assert_eq!(rocks.version().to_string(), "2.0.0-1"); diff --git a/rocks-lib/src/project/rocks_toml.rs b/lux-lib/src/project/project_toml.rs similarity index 90% rename from rocks-lib/src/project/rocks_toml.rs rename to lux-lib/src/project/project_toml.rs index b1155420..eee1f447 100644 --- a/rocks-lib/src/project/rocks_toml.rs +++ b/lux-lib/src/project/project_toml.rs @@ -1,4 +1,4 @@ -//! Structs and utilities for `rocks.toml` +//! Structs and utilities for `lux.toml` use std::{collections::HashMap, path::PathBuf}; @@ -39,7 +39,7 @@ where } #[derive(Debug, Error)] -pub enum RocksTomlValidationError { +pub enum ProjectTomlValidationError { #[error("no source url provided")] NoSource, #[error("no lua version provided")] @@ -56,11 +56,11 @@ pub enum RocksTomlValidationError { CopyDirectoriesContainRockspecName(Option), } -/// The `rocks.toml` file. -/// The only required fields are `package` and `build`, which are required to build a project using `rocks build`. +/// The `lux.toml` file. +/// The only required fields are `package` and `build`, which are required to build a project using `lux build`. /// The rest of the fields are optional, but are required to build a rockspec. #[derive(Clone, Debug, Deserialize)] -pub struct RocksToml { +pub struct ProjectToml { pub(crate) package: PackageName, pub(crate) version: PackageVersion, pub(crate) build: BuildSpecInternal, @@ -85,9 +85,9 @@ pub struct RocksToml { pub(crate) test: Option, } -/// Equivalent to [`RocksToml`], but with all fields required +/// Equivalent to [`ProjectToml`], but with all fields required #[derive(Debug)] -pub struct RocksTomlValidated { +pub struct ProjectTomlValidated { package: PackageName, version: PackageVersion, lua: PackageVersionReq, @@ -103,31 +103,31 @@ pub struct RocksTomlValidated { build: PerPlatform, // Used for simpler serialization - internal: RocksToml, + internal: ProjectToml, } -impl RocksToml { +impl ProjectToml { pub fn new(str: &str) -> Result { toml::from_str(str) } - pub fn into_validated_rocks_toml( + pub fn into_validated( &self, - ) -> Result { - let rocks = self.clone(); + ) -> Result { + let project = self.clone(); - let validated = RocksTomlValidated { - internal: rocks.clone(), + let validated = ProjectTomlValidated { + internal: project.clone(), - package: rocks.package, - version: rocks.version, - lua: rocks + package: project.package, + version: project.version, + lua: project .lua .clone() - .ok_or(RocksTomlValidationError::NoLuaVersion)?, - description: rocks.description.unwrap_or_default(), + .ok_or(ProjectTomlValidationError::NoLuaVersion)?, + description: project.description.unwrap_or_default(), supported_platforms: PlatformSupport::parse( - &rocks + &project .supported_platforms .unwrap_or_default() .into_iter() @@ -143,28 +143,28 @@ impl RocksToml { // Merge dependencies internally with lua version // so the output of `dependencies()` is consistent dependencies: PerPlatform::new( - rocks + project .dependencies .unwrap_or_default() .into_iter() .chain(std::iter::once(PackageReq { name: "lua".into(), - version_req: rocks.lua.unwrap_or(PackageVersionReq::any()), + version_req: project.lua.unwrap_or(PackageVersionReq::any()), })) .collect(), ), - build_dependencies: PerPlatform::new(rocks.build_dependencies.unwrap_or_default()), + build_dependencies: PerPlatform::new(project.build_dependencies.unwrap_or_default()), external_dependencies: PerPlatform::new( - rocks.external_dependencies.unwrap_or_default(), + project.external_dependencies.unwrap_or_default(), ), - test_dependencies: PerPlatform::new(rocks.test_dependencies.unwrap_or_default()), + test_dependencies: PerPlatform::new(project.test_dependencies.unwrap_or_default()), source: PerPlatform::new(RockSource::from_platform_overridable( - rocks.source.ok_or(RocksTomlValidationError::NoSource)?, + project.source.ok_or(ProjectTomlValidationError::NoSource)?, )?), test: PerPlatform::new(TestSpec::from_platform_overridable( - rocks.test.clone().unwrap_or_default(), + project.test.clone().unwrap_or_default(), )?), - build: PerPlatform::new(BuildSpec::from_internal_spec(rocks.build.clone())?), + build: PerPlatform::new(BuildSpec::from_internal_spec(project.build.clone())?), rockspec_format: self.rockspec_format.clone(), }; @@ -176,7 +176,7 @@ impl RocksToml { .copy_directories .contains(&PathBuf::from(&rockspec_file_name)) { - return Err(RocksTomlValidationError::CopyDirectoriesContainRockspecName(None)); + return Err(ProjectTomlValidationError::CopyDirectoriesContainRockspecName(None)); } for (platform, build_override) in &validated.build.per_platform { @@ -185,7 +185,7 @@ impl RocksToml { .contains(&PathBuf::from(&rockspec_file_name)) { return Err( - RocksTomlValidationError::CopyDirectoriesContainRockspecName(Some( + ProjectTomlValidationError::CopyDirectoriesContainRockspecName(Some( platform.to_string(), )), ); @@ -205,10 +205,10 @@ impl RocksToml { &self.version } - /// Merge the `RocksToml` struct with an unvalidated `LuaRockspec`. + /// Merge the `ProjectToml` struct with an unvalidated `LuaRockspec`. /// The final merged struct can then be validated. pub fn merge(self, other: PartialLuaRockspec) -> Self { - RocksToml { + ProjectToml { package: other.package.unwrap_or(self.package), version: other.version.unwrap_or(self.version), lua: other @@ -250,7 +250,7 @@ impl RocksToml { } } -impl RocksTomlValidated { +impl ProjectTomlValidated { pub fn to_rockspec_string(&self) -> String { let starter = format!( r#" @@ -326,9 +326,9 @@ version = "{}""#, } // This is automatically implemented for `RocksTomlValidated` by `Rockspec`, -// but we also add a special implementation for `RocksToml` (as providing a lua version) +// but we also add a special implementation for `ProjectToml` (as providing a lua version) // is required even by the non-validated struct. -impl LuaVersionCompatibility for RocksToml { +impl LuaVersionCompatibility for ProjectToml { fn validate_lua_version(&self, config: &Config) -> Result<(), LuaVersionError> { let _ = self.lua_version_matches(config)?; Ok(()) @@ -382,7 +382,7 @@ impl LuaVersionCompatibility for RocksToml { } } -impl Rockspec for RocksTomlValidated { +impl Rockspec for ProjectTomlValidated { fn package(&self) -> &PackageName { &self.package } @@ -456,11 +456,11 @@ mod tests { rockspec::Rockspec, }; - use super::RocksToml; + use super::ProjectToml; #[test] - fn rocks_toml_parsing() { - let rocks_toml = r#" + fn project_toml_parsing() { + let project_toml = r#" package = "my-package" version = "1.0.0" lua = "5.3" @@ -478,10 +478,10 @@ mod tests { type = "builtin" "#; - let rocks = RocksToml::new(rocks_toml).unwrap(); - let _ = rocks.into_validated_rocks_toml().unwrap(); + let project = ProjectToml::new(project_toml).unwrap(); + let _ = project.into_validated().unwrap(); - let rocks_toml = r#" + let project_toml = r#" package = "my-package" version = "1.0.0" lua = "5.1" @@ -530,13 +530,13 @@ mod tests { type = "builtin" "#; - let rocks = RocksToml::new(rocks_toml).unwrap(); - let _ = rocks.into_validated_rocks_toml().unwrap(); + let project = ProjectToml::new(project_toml).unwrap(); + let _ = project.into_validated().unwrap(); } #[test] - fn compare_rocks_toml_with_rockspec() { - let rocks_toml = r#" + fn compare_project_toml_with_rockspec() { + let project_toml = r#" package = "my-package" version = "1.0.0" lua = "5.1" @@ -645,9 +645,9 @@ mod tests { let expected_rockspec = LuaRockspec::new(expected_rockspec).unwrap(); - let rocks_toml = RocksToml::new(rocks_toml).unwrap(); - let rockspec = rocks_toml - .into_validated_rocks_toml() + let project_toml = ProjectToml::new(project_toml).unwrap(); + let rockspec = project_toml + .into_validated() .unwrap() .to_rockspec() .unwrap(); @@ -688,8 +688,8 @@ mod tests { } #[test] - fn merge_rocks_toml_with_partial_rockspec() { - let rocks_toml = r#" + fn merge_project_toml_with_partial_rockspec() { + let project_toml = r#" package = "my-package" version = "1.0.0" lua = "5.1" @@ -797,13 +797,13 @@ mod tests { } "#; - let rocks_toml = RocksToml::new(rocks_toml).unwrap(); + let project_toml = ProjectToml::new(project_toml).unwrap(); let partial_rockspec = PartialLuaRockspec::new(mergable_rockspec_content).unwrap(); let expected_rockspec = LuaRockspec::new(mergable_rockspec_content).unwrap(); - let merged = rocks_toml + let merged = project_toml .merge(partial_rockspec) - .into_validated_rocks_toml() + .into_validated() .unwrap(); let sorted_package_reqs = |v: &PerPlatform>| { diff --git a/rocks-lib/src/remote_package_db/mod.rs b/lux-lib/src/remote_package_db/mod.rs similarity index 100% rename from rocks-lib/src/remote_package_db/mod.rs rename to lux-lib/src/remote_package_db/mod.rs diff --git a/rocks-lib/src/remote_package_source/mod.rs b/lux-lib/src/remote_package_source/mod.rs similarity index 100% rename from rocks-lib/src/remote_package_source/mod.rs rename to lux-lib/src/remote_package_source/mod.rs diff --git a/rocks-lib/src/rockspec/mod.rs b/lux-lib/src/rockspec/mod.rs similarity index 99% rename from rocks-lib/src/rockspec/mod.rs rename to lux-lib/src/rockspec/mod.rs index 2b48782a..08c274e5 100644 --- a/rocks-lib/src/rockspec/mod.rs +++ b/lux-lib/src/rockspec/mod.rs @@ -16,7 +16,7 @@ use crate::{ package::{PackageName, PackageReq, PackageVersion}, }; -/// A trait for querying information about a project from either a rockspec or `rocks.toml` file. +/// A trait for querying information about a project from either a rockspec or `lux.toml` file. pub trait Rockspec { fn package(&self) -> &PackageName; fn version(&self) -> &PackageVersion; diff --git a/rocks-lib/src/tree/list.rs b/lux-lib/src/tree/list.rs similarity index 100% rename from rocks-lib/src/tree/list.rs rename to lux-lib/src/tree/list.rs diff --git a/rocks-lib/src/tree/mod.rs b/lux-lib/src/tree/mod.rs similarity index 99% rename from rocks-lib/src/tree/mod.rs rename to lux-lib/src/tree/mod.rs index cdf154c3..d1fc655b 100644 --- a/rocks-lib/src/tree/mod.rs +++ b/lux-lib/src/tree/mod.rs @@ -17,7 +17,7 @@ mod list; /// A tree is a collection of files where installed rocks are located. /// -/// `rocks` diverges from the traditional hierarchy employed by luarocks. +/// `lux` diverges from the traditional hierarchy employed by luarocks. /// Instead, we opt for a much simpler approach: /// /// - /rocks/ - contains rocks diff --git a/rocks-lib/src/tree/snapshots/rocks_lib__tree__tests__tree_list.snap b/lux-lib/src/tree/snapshots/lux_lib__tree__tests__tree_list.snap similarity index 91% rename from rocks-lib/src/tree/snapshots/rocks_lib__tree__tests__tree_list.snap rename to lux-lib/src/tree/snapshots/lux_lib__tree__tests__tree_list.snap index bb718211..cc701ef2 100644 --- a/rocks-lib/src/tree/snapshots/rocks_lib__tree__tests__tree_list.snap +++ b/lux-lib/src/tree/snapshots/lux_lib__tree__tests__tree_list.snap @@ -1,5 +1,5 @@ --- -source: rocks-lib/src/tree/mod.rs +source: lux-lib/src/tree/mod.rs assertion_line: 438 expression: sorted_result --- diff --git a/rocks-lib/src/upload/mod.rs b/lux-lib/src/upload/mod.rs similarity index 94% rename from rocks-lib/src/upload/mod.rs rename to lux-lib/src/upload/mod.rs index d51a50e4..2b44507d 100644 --- a/rocks-lib/src/upload/mod.rs +++ b/lux-lib/src/upload/mod.rs @@ -1,7 +1,7 @@ use std::env; use std::io::Read; -use crate::project::rocks_toml::RocksTomlValidationError; +use crate::project::project_toml::ProjectTomlValidationError; use crate::rockspec::Rockspec; use crate::TOOL_VERSION; use crate::{config::Config, project::Project}; @@ -69,7 +69,7 @@ pub enum ToolCheckError { ParseError(#[from] url::ParseError), #[error(transparent)] Request(#[from] reqwest::Error), - #[error("`rocks` is out of date with {0}'s expected tool version! `rocks` is at version {TOOL_VERSION}, server is at {server_version}", server_version = _1.version)] + #[error("`lux` is out of date with {0}'s expected tool version! `lux` is at version {TOOL_VERSION}, server is at {server_version}", server_version = _1.version)] ToolOutdated(String, VersionCheckResponse), } @@ -109,21 +109,21 @@ pub enum UploadError { ToolCheck(#[from] ToolCheckError), UserCheck(#[from] UserCheckError), ApiKeyUnspecified(#[from] ApiKeyUnspecified), - ValidationError(#[from] RocksTomlValidationError), + ValidationError(#[from] ProjectTomlValidationError), } pub struct ApiKey(String); #[derive(Error, Debug)] -#[error("no API key provided! Please set the $ROCKS_API_KEY variable")] +#[error("no API key provided! Please set the $LUX_API_KEY variable")] pub struct ApiKeyUnspecified; impl ApiKey { - /// Retrieves the rocks API key from the `$ROCKS_API_KEY` environment + /// Retrieves the rocks API key from the `$LUX_API_KEY` environment /// variable and seals it in this struct. pub fn new() -> Result { Ok(Self( - env::var("ROCKS_API_KEY").map_err(|_| ApiKeyUnspecified)?, + env::var("LUX_API_KEY").map_err(|_| ApiKeyUnspecified)?, )) } @@ -195,7 +195,7 @@ async fn upload_from_project( helpers::ensure_tool_version(&client, config.server()).await?; helpers::ensure_user_exists(&client, api_key, config.server()).await?; - let rocks = project.rocks().into_validated_rocks_toml()?; + let rocks = project.toml().into_validated()?; if helpers::rock_exists( &client, diff --git a/rocks-lib/src/which/mod.rs b/lux-lib/src/which/mod.rs similarity index 100% rename from rocks-lib/src/which/mod.rs rename to lux-lib/src/which/mod.rs diff --git a/rocks-lib/tests/build.rs b/lux-lib/tests/build.rs similarity index 94% rename from rocks-lib/tests/build.rs rename to lux-lib/tests/build.rs index e6bb956f..1a4ce37e 100644 --- a/rocks-lib/tests/build.rs +++ b/lux-lib/tests/build.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use rocks_lib::{ +use lux_lib::{ build::{Build, BuildBehaviour::Force}, config::{ConfigBuilder, LuaVersion}, lua_rockspec::LuaRockspec, @@ -10,7 +10,7 @@ use tempdir::TempDir; #[tokio::test] async fn builtin_build() { - let dir = TempDir::new("rocks-test").unwrap(); + let dir = TempDir::new("lux-test").unwrap(); let content = String::from_utf8(std::fs::read("resources/test/lua-cjson-2.1.0-1.rockspec").unwrap()) @@ -37,7 +37,7 @@ async fn builtin_build() { #[tokio::test] async fn make_build() { - let dir = TempDir::new("rocks-test").unwrap(); + let dir = TempDir::new("lux-test").unwrap(); let content = String::from_utf8( std::fs::read("resources/test/make-project/make-project-scm-1.rockspec").unwrap(), @@ -80,7 +80,7 @@ async fn command_build() { } async fn test_build_rockspec(rockspec_path: PathBuf) { - let dir = TempDir::new("rocks-test").unwrap(); + let dir = TempDir::new("lux-test").unwrap(); let content = String::from_utf8(std::fs::read(rockspec_path).unwrap()).unwrap(); let rockspec = LuaRockspec::new(&content).unwrap(); diff --git a/rocks-lib/tests/luarocks_installation.rs b/lux-lib/tests/luarocks_installation.rs similarity index 95% rename from rocks-lib/tests/luarocks_installation.rs rename to lux-lib/tests/luarocks_installation.rs index cd0c5dc0..175f499d 100644 --- a/rocks-lib/tests/luarocks_installation.rs +++ b/lux-lib/tests/luarocks_installation.rs @@ -4,8 +4,8 @@ use assert_fs::assert::PathAssert; use assert_fs::prelude::{PathChild, PathCopy}; use assert_fs::TempDir; use predicates::prelude::predicate; -use rocks_lib::progress::{MultiProgress, Progress, ProgressBar}; -use rocks_lib::{ +use lux_lib::progress::{MultiProgress, Progress, ProgressBar}; +use lux_lib::{ config::{ConfigBuilder, LuaVersion}, lua_installation::LuaInstallation, luarocks::luarocks_installation::LuaRocksInstallation, diff --git a/rocks-lib/tests/run.rs b/lux-lib/tests/run.rs similarity index 86% rename from rocks-lib/tests/run.rs rename to lux-lib/tests/run.rs index 7f3a428c..5d14fbad 100644 --- a/rocks-lib/tests/run.rs +++ b/lux-lib/tests/run.rs @@ -1,4 +1,4 @@ -use rocks_lib::{ +use lux_lib::{ config::ConfigBuilder, operations::{install_command, Run}, }; @@ -6,7 +6,7 @@ use tempdir::TempDir; #[tokio::test] async fn run_nlua() { - let dir = TempDir::new("rocks-test").unwrap(); + let dir = TempDir::new("lux-test").unwrap(); let config = ConfigBuilder::new() .unwrap() .tree(Some(dir.into_path())) diff --git a/rocks-lib/tests/test.rs b/lux-lib/tests/test.rs similarity index 86% rename from rocks-lib/tests/test.rs rename to lux-lib/tests/test.rs index 6dba6b5a..b2db8767 100644 --- a/rocks-lib/tests/test.rs +++ b/lux-lib/tests/test.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use assert_fs::prelude::PathCopy; -use rocks_lib::{config::ConfigBuilder, operations::Test, project::Project}; +use lux_lib::{config::ConfigBuilder, operations::Test, project::Project}; #[tokio::test] async fn run_busted_test() { @@ -11,7 +11,7 @@ async fn run_busted_test() { temp_dir.copy_from(&project_root, &["**"]).unwrap(); let project_root = temp_dir.path(); let project: Project = Project::from(project_root).unwrap().unwrap(); - let tree_root = project.root().to_path_buf().join(".rocks"); + let tree_root = project.root().to_path_buf().join(".lux"); let _ = std::fs::remove_dir_all(&tree_root); let config = ConfigBuilder::new() .unwrap() @@ -29,7 +29,7 @@ async fn run_busted_test_no_lock() { temp_dir.copy_from(&project_root, &["**"]).unwrap(); let project_root = temp_dir.path(); let project: Project = Project::from(project_root).unwrap().unwrap(); - let tree_root = project.root().to_path_buf().join(".rocks"); + let tree_root = project.root().to_path_buf().join(".lux"); let _ = std::fs::remove_dir_all(&tree_root); let config = ConfigBuilder::new() .unwrap() diff --git a/rocks-lib/tests/tree.rs b/lux-lib/tests/tree.rs similarity index 76% rename from rocks-lib/tests/tree.rs rename to lux-lib/tests/tree.rs index d262106c..8cd02106 100644 --- a/rocks-lib/tests/tree.rs +++ b/lux-lib/tests/tree.rs @@ -1,7 +1,7 @@ #![cfg(feature = "lua")] use mlua::{IntoLua, Lua}; -use rocks_lib::tree::Tree; +use lux_lib::tree::Tree; use tempdir::TempDir; #[test] @@ -9,7 +9,7 @@ fn tree_userdata() { let temp = TempDir::new("tree-userdata").unwrap(); let lua = Lua::new(); - let t = Tree::new(temp.into_path(), rocks_lib::config::LuaVersion::Lua51).unwrap(); + let t = Tree::new(temp.into_path(), lux_lib::config::LuaVersion::Lua51).unwrap(); let tree = t.into_lua(&lua).unwrap(); lua.globals().set("tree", tree).unwrap(); diff --git a/rocks-lib/proptest-regressions/rocks/platform.txt b/rocks-lib/proptest-regressions/rocks/platform.txt deleted file mode 100644 index d116fba5..00000000 --- a/rocks-lib/proptest-regressions/rocks/platform.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc d1d870d91f553227250e0c3be3b80df33ce7ca2140bf4f0137c5c33358ba9a6c # shrinks to identifier = Unix -cc ddec314bb066ea910bd40ba1068ccf5805bd21e4281a9bdd388471bc441ea8d8 # shrinks to unsupported = Linux, supported = Linux -cc 5a57be9d0ac206dd1b323e2857da818cdea9e7762ffa0b96155a82092b685688 # shrinks to unsupported = Unix, supported = Windows -cc e334a9bcf9efc1f044f2976f1b06d1dcd934af9f094b8b9b5fca50c5aeaa66d2 # shrinks to unsupported = Unix, supported = MacOSX -cc 90127ef74cf8c3f5c74d359fbf5c27075fa3a3b4431cd5d4af22662fe16c8b24 # shrinks to unsupported = Unix, supported = Windows -cc 4605925e57e279f6e0ef49b47cd9e45e43423b907452f5d3ade13373b2a44379 # shrinks to unsupported = Cygwin, unspecified = Unix -cc 40216a918db9d95bd7bf77f5959fb58192344aef14f1be16065ae8143fa4f7e9 # shrinks to unsupported = Cygwin, supported = Unix diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index be13881f..8c7be35c 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -9,5 +9,5 @@ clap = { version = "4.5.23", features = ["derive"] } clap_complete = "4.5.40" clap_mangen = "0.2.24" -[dependencies.rocks] -path = "../rocks-bin" +[dependencies.lux] +path = "../lux-bin" diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 7fa336da..78071a19 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -8,7 +8,7 @@ use std::{ use clap::{CommandFactory, ValueEnum}; use clap_complete::{generate_to, Shell}; use clap_mangen::Man; -use rocks::Cli; +use lux::Cli; type DynError = Box;