Skip to content

Commit

Permalink
refactor!: rename project to lux
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro authored and mrcjkb committed Feb 14, 2025
1 parent 4e0f93e commit 3d89e92
Show file tree
Hide file tree
Showing 152 changed files with 436 additions and 429 deletions.
15 changes: 10 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
204 changes: 102 additions & 102 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[workspace]
members = [
"rocks-lib",
"rocks-bin",
"lux-lib",
"lux-bin",
"xtask",
# "rocks-lua",
# "lux-lua",
]
resolver = "2"
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,20 +19,20 @@ Rocks serves as an application for:
## :books: Usage

```sh
rocks <command> <options>
lux <command> <options>
```

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: |
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions rocks-bin/Cargo.toml → lux-bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "rocks"
name = "lux"
version = "0.1.0"
edition = "2021"

Expand Down Expand Up @@ -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"]
10 changes: 5 additions & 5 deletions rocks-bin/src/add.rs → lux-bin/src/add.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use eyre::{Context, OptionExt, Result};
use rocks_lib::{
use lux_lib::{
config::Config,
lockfile::PinnedState,
luarocks::luarocks_installation::LuaRocksInstallation,
Expand Down Expand Up @@ -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())
Expand All @@ -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?;
Expand All @@ -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?;
Expand All @@ -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?;
}
}
Expand Down
2 changes: 1 addition & 1 deletion rocks-bin/src/build.rs → lux-bin/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion rocks-bin/src/check.rs → lux-bin/src/check.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use eyre::{OptionExt, Result};
use rocks_lib::{
use lux_lib::{
build::BuildBehaviour,
config::Config,
lockfile::PinnedState::Pinned,
Expand Down
4 changes: 2 additions & 2 deletions rocks-bin/src/config.rs → lux-bin/src/config.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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.
"
));
Expand Down
File renamed without changes.
Loading

0 comments on commit 3d89e92

Please sign in to comment.