Skip to content

Commit 4cd8ccd

Browse files
authored
Taplo and typos in CI, TOML cleanup (#4510)
* Taplo and typos in CI * Clean up Cargo.toml files * Fix CI * Fix CI * Run typos in CI * Loosen typos a bit * Fix typos * Fix taplo * Switch to Tombi * Fix Tombi errors * Remove unused typos config * Tombi fmt * Remove extraneous cargo fmt * fix typos
1 parent ea594ec commit 4cd8ccd

File tree

46 files changed

+633
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+633
-451
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- master
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
SQLX_OFFLINE: true
10+
11+
jobs:
12+
typos:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: crate-ci/typos@master
17+
18+
tombi:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: tombi-toml/setup-tombi@v1
23+
- run: tombi lint
24+
- run: tombi fmt --check

.github/workflows/check-rust.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- master
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
SQLX_OFFLINE: true
10+
11+
jobs:
12+
shear:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
- uses: cargo-bins/cargo-binstall@main
18+
- run: cargo binstall --no-confirm cargo-shear
19+
- run: cargo shear

Cargo.toml

Lines changed: 67 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[workspace]
22
resolver = "2"
33
members = [
4-
"apps/app",
5-
"apps/app-playground",
6-
"apps/daedalus_client",
7-
"apps/labrinth",
8-
"packages/app-lib",
9-
"packages/ariadne",
10-
"packages/daedalus",
11-
"packages/path-util",
4+
"apps/app",
5+
"apps/app-playground",
6+
"apps/daedalus_client",
7+
"apps/labrinth",
8+
"packages/app-lib",
9+
"packages/ariadne",
10+
"packages/daedalus",
11+
"packages/path-util",
1212
]
1313

1414
[workspace.package]
@@ -25,30 +25,34 @@ actix-web-prom = "0.10.0"
2525
actix-ws = "0.3.0"
2626
argon2 = { version = "0.5.3", features = ["std"] }
2727
ariadne = { path = "packages/ariadne" }
28-
async_zip = "0.0.17"
2928
async-compression = { version = "0.4.27", default-features = false }
3029
async-recursion = "1.1.1"
3130
async-stripe = { version = "0.41.0", default-features = false, features = [
32-
"runtime-tokio-hyper-rustls",
31+
"runtime-tokio-hyper-rustls",
3332
] }
3433
async-trait = "0.1.88"
35-
async-tungstenite = { version = "0.30.0", default-features = false, features = ["futures-03-sink"] }
34+
async-tungstenite = { version = "0.30.0", default-features = false, features = [
35+
"futures-03-sink",
36+
] }
3637
async-walkdir = "2.1.0"
38+
async_zip = "0.0.17"
3739
base64 = "0.22.1"
3840
bitflags = "2.9.1"
3941
bytemuck = "1.23.1"
4042
bytes = "1.10.1"
41-
typed-path = "0.11.0"
4243
censor = "0.3.0"
4344
chardetng = "0.1.17"
4445
chrono = "0.4.41"
45-
cidre = { version = "0.11.2", default-features = false, features = ["macos_15_0"] }
46+
cidre = { version = "0.11.2", default-features = false, features = [
47+
"macos_15_0",
48+
] }
4649
clap = "4.5.43"
4750
clickhouse = "0.13.3"
51+
color-eyre = "0.6.5"
4852
color-thief = "0.2.2"
4953
console-subscriber = "0.4.1"
54+
const_format = "0.2.34"
5055
daedalus = { path = "packages/daedalus" }
51-
path-util = { path = "packages/path-util" }
5256
dashmap = "6.1.0"
5357
data-url = "0.3.1"
5458
deadpool-redis = "0.22.0"
@@ -61,6 +65,7 @@ dunce = "1.0.5"
6165
either = "1.15.0"
6266
encoding_rs = "0.8.35"
6367
enumset = "1.1.7"
68+
eyre = "0.6.12"
6469
flate2 = "1.1.2"
6570
fs4 = { version = "0.13.1", default-features = false }
6671
futures = { version = "0.3.31", default-features = false }
@@ -70,12 +75,11 @@ hex = "0.4.3"
7075
hickory-resolver = "0.25.2"
7176
hmac = "0.12.1"
7277
hyper = "1.6.0"
73-
tracing-ecs = "0.5.0"
7478
hyper-rustls = { version = "0.27.7", default-features = false, features = [
75-
"http1",
76-
"native-tokio",
77-
"ring",
78-
"tls12",
79+
"http1",
80+
"native-tokio",
81+
"ring",
82+
"tls12",
7983
] }
8084
hyper-util = "0.1.16"
8185
iana-time-zone = "0.1.63"
@@ -86,15 +90,15 @@ itertools = "0.14.0"
8690
jemalloc_pprof = "0.8.1"
8791
json-patch = { version = "4.0.0", default-features = false }
8892
lettre = { version = "0.11.18", default-features = false, features = [
89-
"builder",
90-
"hostname",
91-
"pool",
92-
"ring",
93-
"rustls",
94-
"rustls-native-certs",
95-
"tokio1-rustls",
96-
"smtp-transport",
97-
"tokio1",
93+
"builder",
94+
"hostname",
95+
"pool",
96+
"ring",
97+
"rustls",
98+
"rustls-native-certs",
99+
"smtp-transport",
100+
"tokio1",
101+
"tokio1-rustls",
98102
] }
99103
maxminddb = "0.26.0"
100104
meilisearch-sdk = { version = "0.29.1", default-features = false }
@@ -104,42 +108,45 @@ notify = { version = "8.2.0", default-features = false }
104108
notify-debouncer-mini = { version = "0.7.0", default-features = false }
105109
p256 = "0.13.2"
106110
paste = "1.0.15"
111+
path-util = { path = "packages/path-util" }
107112
phf = { version = "0.12.1", features = ["macros"] }
108113
png = "0.17.16"
109114
prometheus = "0.14.0"
110115
quartz_nbt = "0.2.9"
111116
quick-xml = "0.38.1"
112-
rand = "=0.8.5" # Locked on 0.8 until argon2 and p256 update to 0.9
113-
rand_chacha = "=0.3.1" # Locked on 0.3 until we can update rand to 0.9
117+
rand = "=0.8.5" # Locked on 0.8 until argon2 and p256 update to 0.9
118+
rand_chacha = "=0.3.1" # Locked on 0.3 until we can update rand to 0.9
114119
redis = "0.32.4"
115120
regex = "1.11.1"
116121
reqwest = { version = "0.12.22", default-features = false }
117122
rgb = "0.8.52"
118-
rust_decimal = { version = "1.37.2", features = ["serde-with-float", "serde-with-str"] }
123+
rust_decimal = { version = "1.37.2", features = [
124+
"serde-with-float",
125+
"serde-with-str",
126+
] }
119127
rust_iso3166 = "0.1.14"
120128
rust-s3 = { version = "0.35.1", default-features = false, features = [
121-
"fail-on-err",
122-
"tags",
123-
"tokio-rustls-tls",
129+
"fail-on-err",
130+
"tags",
131+
"tokio-rustls-tls",
124132
] }
125133
rusty-money = "0.4.1"
126134
sentry = { version = "0.42.0", default-features = false, features = [
127-
"backtrace",
128-
"contexts",
129-
"debug-images",
130-
"panic",
131-
"reqwest",
132-
"rustls",
135+
"backtrace",
136+
"contexts",
137+
"debug-images",
138+
"panic",
139+
"reqwest",
140+
"rustls",
133141
] }
134142
sentry-actix = "0.42.0"
135-
const_format = "0.2.34"
136143
serde = "1.0.219"
137144
serde_bytes = "0.11.17"
138145
serde_cbor = "0.11.2"
139146
serde_ini = "0.2.0"
140147
serde_json = "1.0.142"
141148
serde_with = "3.14.0"
142-
serde-xml-rs = "0.8.1" # Also an XML (de)serializer, consider dropping yaserde in favor of this
149+
serde-xml-rs = "0.8.1" # Also an XML (de)serializer, consider dropping yaserde in favor of this
143150
sha1 = "0.10.6"
144151
sha1_smol = { version = "1.0.1", features = ["std"] }
145152
sha2 = "0.10.9"
@@ -156,8 +163,8 @@ tauri-plugin-opener = "2.4.0"
156163
tauri-plugin-os = "2.3.0"
157164
tauri-plugin-single-instance = "2.3.2"
158165
tauri-plugin-updater = { version = "2.9.0", default-features = false, features = [
159-
"rustls-tls",
160-
"zip",
166+
"rustls-tls",
167+
"zip",
161168
] }
162169
tauri-plugin-window-state = "2.4.0"
163170
tempfile = "3.20.0"
@@ -171,28 +178,28 @@ tokio-util = "0.7.16"
171178
totp-rs = "5.7.0"
172179
tracing = "0.1.41"
173180
tracing-actix-web = { version = "0.7.19", default-features = false }
181+
tracing-ecs = "0.5.0"
174182
tracing-error = "0.2.1"
175183
tracing-subscriber = "0.3.19"
176-
eyre = "0.6.12"
177-
color-eyre = "0.6.5"
184+
typed-path = "0.11.0"
178185
url = "2.5.4"
179186
urlencoding = "2.1.3"
180187
uuid = "1.17.0"
181188
validator = "0.20.0"
182189
webp = { version = "0.3.0", default-features = false }
190+
webview2-com = "0.38.0" # Should be updated in lockstep with wry
183191
whoami = "1.6.0"
184192
windows = "0.61.3"
185193
windows-core = "0.61.2"
186-
webview2-com = "0.38.0" # Should be updated in lockstep with wry
187194
winreg = "0.55.0"
188195
woothee = "0.13.0"
189196
yaserde = "0.12.0"
190197
zbus = "5.9.0"
191198
zip = { version = "4.3.0", default-features = false, features = [
192-
"bzip2",
193-
"deflate",
194-
"deflate64",
195-
"zstd",
199+
"bzip2",
200+
"deflate",
201+
"deflate64",
202+
"zstd",
196203
] }
197204
zxcvbn = "3.1.0"
198205

@@ -230,18 +237,18 @@ todo = "warn"
230237
unnested_or_patterns = "warn"
231238
wildcard_dependencies = "warn"
232239

240+
[profile.dev.package.sqlx-macros]
241+
opt-level = 3
242+
233243
# Optimize for speed and reduce size on release builds
234244
[profile.release]
235-
opt-level = "s" # Optimize for binary size
236-
strip = true # Remove debug symbols
237-
lto = true # Enables link to optimizations
238-
panic = "abort" # Strip expensive panic clean-up logic
239-
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
245+
opt-level = "s" # Optimize for binary size
246+
strip = true # Remove debug symbols
247+
lto = true # Enables link to optimizations
248+
panic = "abort" # Strip expensive panic clean-up logic
249+
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
240250

241251
# Specific profile for labrinth production builds
242252
[profile.release-labrinth]
243253
inherits = "release"
244-
panic = "unwind" # Don't exit the whole app on panic in production
245-
246-
[profile.dev.package.sqlx-macros]
247-
opt-level = 3
254+
panic = "unwind" # Don't exit the whole app on panic in production

_typos.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[files]
2+
extend-exclude = [
3+
"**/src/locales/",
4+
"apps/frontend/",
5+
"patches/",
6+
"packages/utils/",
7+
"packages/ui/",
8+
"packages/blog/",
9+
# contains licenses like `CC-BY-ND-4.0`
10+
"packages/moderation/src/data/stages/license.ts",
11+
# contains payment card IDs like `IY1VMST1MOXS` which are flagged
12+
"apps/labrinth/src/queue/payouts.rs",
13+
]
14+
15+
[default.extend-words]
16+
# Terms Of Use in `tou-link`
17+
tou = "tou"
18+
# Google Ad Manager
19+
gam = "gam"

apps/app-playground/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
[package]
22
name = "theseus_playground"
3-
version = "0.0.0"
43
edition.workspace = true
54

6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7-
85
[dependencies]
6+
enumset = { workspace = true }
97
theseus = { workspace = true, features = ["cli"] }
108
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
11-
enumset.workspace = true
129

1310
[lints]
1411
workspace = true

0 commit comments

Comments
 (0)