Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ generated
!apps/app-frontend/src/generated/app-events/postcard/package.json
.env

# Nix development environment
/.devenv/
/.direnv/
/result

# app testing dir
app-playground-data/*

Expand Down
97 changes: 5 additions & 92 deletions Cargo.lock

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

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ members = [
"packages/minecraft-meta-model",
"packages/modrinth-content-management",
"packages/modrinth-log",
"packages/modrinth-maxmind",
"packages/modrinth-skin-rendering",
"packages/modrinth-util",
"packages/neverbounce",
Expand Down Expand Up @@ -75,7 +74,6 @@ chumsky = "0.13.0"
cidre = { version = "0.29.0", default-features = false, features = ["macos_15_0"] }
clap = "4.6.7"
clickhouse = "0.15.3"
color-eyre = "0.6.5"
color-thief = "0.2.2"
component-derive = { path = "packages/component-derive" }
const_format = "0.2.36"
Expand All @@ -96,7 +94,6 @@ dunce = "1.0.5"
either = "1.19.0"
encoding_rs = "0.8.42"
enumset = "1.1.14"
eyre = "0.6.14"
figment = { version = "0.10.19" }
flate2 = "1.1.10"
fs4 = { version = "1.1.0", default-features = false }
Expand Down Expand Up @@ -150,7 +147,6 @@ lz4_flex = { version = "0.14.0", default-features = false, features = [
"safe-encode",
"std",
] }
maxminddb = "0.32.0"
minecraft-meta-manifest = { path = "packages/minecraft-meta-manifest" }
minecraft-meta-model = { path = "packages/minecraft-meta-model" }
modrinth-content-management = { path = "packages/modrinth-content-management" }
Expand Down
12 changes: 6 additions & 6 deletions apps/labrinth/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
- `ApiError::Request` instead of `ApiError::InvalidInput`
- `ApiError::Auth` instead of `ApiError::CustomAuthentication`
- `ApiError::Internal` for database errors, 3rd party service errors, anything else internal
- Use `eyre!` to construct a value for `Internal`, `Request`, and `Auth` variants
- Use `anyhow!` to construct a value for `Internal`, `Request`, and `Auth` variants
- Error messages (both for errors and exceptions) must be formatted as per the Rust API guidelines:
- lowercase message
- no trailing punctuation
- wrap code items e.g. type names in backticks
- Prefer `wrap_internal_err`, `wrap_request_err` when attaching context to an existing error (like Anyhow `context` or Eyre `wrap_err`)
- Prefer importing `eyre::Result` and using `Result<T>` instead of `eyre::Result<T>`
- Prefer `eyre::Ok(value)` instead of `Ok::<_, eyre::Report>(value)` when an explicit Eyre result type is needed
- Prefer `internal_context`, `request_context` when attaching context to an existing error (like Anyhow `context`)
- Prefer importing `anyhow::Result` and using `Result<T>` instead of `anyhow::Result<T>`
- Prefer `anyhow::Ok(value)` instead of `Ok::<_, anyhow::Error>(value)` when an explicit Anyhow result type is needed
- All operations should ideally have some context attached
- Database operations can have a message like `.wrap_internal_err("fetching XYZ")`
- Database operations can have a message like `.internal_context("fetching XYZ")`
- You can perform real-time queries against the databases in the Docker Compose
- `docker exec labrinth-postgres psql -c "select 1"`
- `docker exec labrinth-redis redis-cli flushall`
Expand All @@ -28,7 +28,7 @@
- `Authorization: Bearer mra_user` for a regular user
- `Modrinth-Admin: feedbeef` as admin key
- When using `sqlx::query` etc. always use the macro form like `sqlx::query!` or `sqlx::query_scalar!` - never the plain function form. Avoid using `query_as!`.
- Do not use `()` as an error type for operations, unless you have a very good reason. Either make a new error type, or use `eyre::Report`.
- Do not use `()` as an error type for operations, unless you have a very good reason. Either make a new error type, or use `anyhow::Error`.
- Do not run `cargo test`, even for a single specific test, unless explicitly prompted to by the user, since it takes a long time to run.
- You can force a search reindex by:
- Running `cd apps/labrinth && cargo run -p labrinth -- --run-background-task index-search` (prefer this if backend is running locally)
Expand Down
3 changes: 1 addition & 2 deletions apps/labrinth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ actix-rt = { workspace = true }
actix-web = { workspace = true }
actix-web-prom = { workspace = true, features = ["process"] }
actix-ws = { workspace = true }
anyhow = { workspace = true }
arc-swap = { workspace = true }
argon2 = { workspace = true }
ariadne = { workspace = true }
Expand Down Expand Up @@ -52,7 +53,6 @@ chrono = { workspace = true, features = ["serde"] }
chumsky = { workspace = true }
clap = { workspace = true, features = ["derive"] }
clickhouse = { workspace = true, features = ["time", "uuid"] }
color-eyre = { workspace = true }
color-thief = { workspace = true }
component-derive = { workspace = true }
const_format = { workspace = true }
Expand All @@ -61,7 +61,6 @@ derive_more = { workspace = true, features = ["deref", "deref_mut"] }
dioxus-devtools = { workspace = true }
dotenvy = { workspace = true }
either = { workspace = true }
eyre = { workspace = true }
futures = { workspace = true }
futures-util = { workspace = true }
heck = { workspace = true }
Expand Down
Loading
Loading