Compare commits

...

2 Commits

31 changed files with 210 additions and 160 deletions

185
Cargo.lock generated
View File

@ -28,9 +28,9 @@ dependencies = [
[[package]]
name = "anstream"
version = "0.6.20"
version = "0.6.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192"
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
dependencies = [
"anstyle",
"anstyle-parse",
@ -43,9 +43,9 @@ dependencies = [
[[package]]
name = "anstyle"
version = "1.0.11"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
[[package]]
name = "anstyle-parse"
@ -259,9 +259,9 @@ checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
[[package]]
name = "clap"
version = "4.5.47"
version = "4.5.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931"
checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae"
dependencies = [
"clap_builder",
"clap_derive",
@ -269,9 +269,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.47"
version = "4.5.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6"
checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9"
dependencies = [
"anstream",
"anstyle",
@ -322,7 +322,7 @@ dependencies = [
"libc",
"once_cell",
"unicode-width",
"windows-sys 0.61.0",
"windows-sys 0.61.2",
]
[[package]]
@ -427,7 +427,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.0",
"windows-sys 0.61.2",
]
[[package]]
@ -600,7 +600,7 @@ dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasi 0.14.5+wasi-0.2.4",
"wasi 0.14.7+wasi-0.2.4",
]
[[package]]
@ -861,9 +861,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "js-sys"
version = "0.3.78"
version = "0.3.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738"
checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305"
dependencies = [
"once_cell",
"wasm-bindgen",
@ -909,11 +909,10 @@ checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
[[package]]
name = "lock_api"
version = "0.4.13"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
dependencies = [
"autocfg",
"scopeguard",
]
@ -1026,11 +1025,11 @@ checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d"
[[package]]
name = "nu-ansi-term"
version = "0.50.1"
version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@ -1071,9 +1070,9 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
[[package]]
name = "parking_lot"
version = "0.12.4"
version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
dependencies = [
"lock_api",
"parking_lot_core",
@ -1081,15 +1080,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
version = "0.9.11"
version = "0.9.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-targets 0.52.6",
"windows-link",
]
[[package]]
@ -1233,9 +1232,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.5.17"
version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
"bitflags 2.9.4",
]
@ -1273,7 +1272,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.61.0",
"windows-sys 0.61.2",
]
[[package]]
@ -1397,9 +1396,9 @@ dependencies = [
[[package]]
name = "stable_deref_trait"
version = "1.2.0"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]
name = "strsim"
@ -1426,15 +1425,15 @@ checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
[[package]]
name = "tempfile"
version = "3.22.0"
version = "3.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53"
checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16"
dependencies = [
"fastrand",
"getrandom 0.3.3",
"once_cell",
"rustix",
"windows-sys 0.61.0",
"windows-sys 0.61.2",
]
[[package]]
@ -1674,9 +1673,9 @@ checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
[[package]]
name = "unicode-width"
version = "0.2.1"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c"
checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
[[package]]
name = "unit-prefix"
@ -1723,39 +1722,40 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasi"
version = "0.14.5+wasi-0.2.4"
version = "0.14.7+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4"
checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c"
dependencies = [
"wasip2",
]
[[package]]
name = "wasip2"
version = "1.0.0+wasi-0.2.4"
version = "1.0.1+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24"
checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
version = "0.2.101"
version = "0.2.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b"
checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.101"
version = "0.2.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb"
checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19"
dependencies = [
"bumpalo",
"log",
@ -1767,9 +1767,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.101"
version = "0.2.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d"
checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -1777,9 +1777,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.101"
version = "0.2.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa"
checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7"
dependencies = [
"proc-macro2",
"quote",
@ -1790,9 +1790,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.101"
version = "0.2.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1"
checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1"
dependencies = [
"unicode-ident",
]
@ -1813,20 +1813,14 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.0",
"windows-sys 0.61.2",
]
[[package]]
name = "windows-link"
version = "0.1.3"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
[[package]]
name = "windows-link"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
@ -1852,16 +1846,16 @@ version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [
"windows-targets 0.53.3",
"windows-targets 0.53.5",
]
[[package]]
name = "windows-sys"
version = "0.61.0"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link 0.2.0",
"windows-link",
]
[[package]]
@ -1882,19 +1876,19 @@ dependencies = [
[[package]]
name = "windows-targets"
version = "0.53.3"
version = "0.53.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
dependencies = [
"windows-link 0.1.3",
"windows_aarch64_gnullvm 0.53.0",
"windows_aarch64_msvc 0.53.0",
"windows_i686_gnu 0.53.0",
"windows_i686_gnullvm 0.53.0",
"windows_i686_msvc 0.53.0",
"windows_x86_64_gnu 0.53.0",
"windows_x86_64_gnullvm 0.53.0",
"windows_x86_64_msvc 0.53.0",
"windows-link",
"windows_aarch64_gnullvm 0.53.1",
"windows_aarch64_msvc 0.53.1",
"windows_i686_gnu 0.53.1",
"windows_i686_gnullvm 0.53.1",
"windows_i686_msvc 0.53.1",
"windows_x86_64_gnu 0.53.1",
"windows_x86_64_gnullvm 0.53.1",
"windows_x86_64_msvc 0.53.1",
]
[[package]]
@ -1905,9 +1899,9 @@ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
[[package]]
name = "windows_aarch64_msvc"
@ -1917,9 +1911,9 @@ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_aarch64_msvc"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
[[package]]
name = "windows_i686_gnu"
@ -1929,9 +1923,9 @@ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnu"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
[[package]]
name = "windows_i686_gnullvm"
@ -1941,9 +1935,9 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_gnullvm"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
[[package]]
name = "windows_i686_msvc"
@ -1953,9 +1947,9 @@ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_i686_msvc"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
[[package]]
name = "windows_x86_64_gnu"
@ -1965,9 +1959,9 @@ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnu"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
[[package]]
name = "windows_x86_64_gnullvm"
@ -1977,9 +1971,9 @@ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
[[package]]
name = "windows_x86_64_msvc"
@ -1989,15 +1983,15 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "windows_x86_64_msvc"
version = "0.53.0"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]]
name = "wit-bindgen"
version = "0.45.1"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36"
checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
[[package]]
name = "yoke"
@ -2036,6 +2030,17 @@ dependencies = [
"tracing-test",
"unicode-ident",
"yoke",
"zbuild-test",
]
[[package]]
name = "zbuild-test"
version = "0.1.10"
dependencies = [
"app-error",
"tempfile",
"tracing",
"zbuild",
]
[[package]]

View File

@ -1,18 +1,26 @@
[package]
edition = "2024"
name = "zbuild"
description = "Make-like build system"
license = "MIT OR Apache-2.0"
version = "0.1.10"
repository = "https://github.com/zenithsiz/zbuild"
publish = ["filipejr"]
[workspace]
[dependencies]
members = ["zbuild", "zbuild-test"]
resolver = "2"
[workspace.package]
description = "Make-like build system"
edition = "2024"
license = "MIT OR Apache-2.0"
publish = ["filipejr"]
repository = "https://github.com/zenithsiz/zbuild"
version = "0.1.10"
[workspace.dependencies]
# Workspace
zbuild = { path = "zbuild" }
zbuild-test = { path = "zbuild-test" }
app-error = { git = "https://github.com/Zenithsiz/app-error", rev = "9a7c202f54ef449d02e2b6ace74ad916f6e6720e" }
async-broadcast = "0.7.2"
clap = { features = ["derive"], version = "4.5.47" }
console-subscriber = { optional = true, version = "0.4.1" }
clap = "4.5.47"
console-subscriber = "0.4.1"
dashmap = "6.1.0"
futures = "0.3.31"
indexmap = "2.11.1"
@ -21,37 +29,30 @@ itertools = "0.14.0"
notify = "8.2.0"
notify-debouncer-full = "0.6.0"
pin-project = "1.1.10"
smallvec = { features = ["may_dangle"], version = "1.15.1" }
tokio = { features = ["full"], version = "1.47.1" }
smallvec = "1.15.1"
tempfile = "3.22.0"
tokio = "1.47.1"
tokio-stream = "0.1.17"
tracing = "0.1.41"
tracing-log = "0.2.0"
tracing-subscriber = { features = ["env-filter"], version = "0.3.20" }
tracing-subscriber = "0.3.20"
tracing-test = "0.2.5"
unicode-ident = "1.0.19"
yoke = "0.8.0"
[dev-dependencies]
tempfile = "3.22.0"
tracing-test = { version = "0.2.5", features = ["no-env-filter"] }
[features]
tokio-console = ["dep:console-subscriber"]
[lints]
[workspace.lints]
# This project doesn't require unsafe code (outside of some modules)
rust.unsafe_code = "deny"
rust.unsafe_op_in_unsafe_fn = "deny"
# Group lints
clippy.pedantic = { level = "warn", priority = -1 }
clippy.nursery = { level = "warn", priority = -1 }
clippy.pedantic = { level = "warn", priority = -1 }
# Prefer `expect` instead of `unwrap`
clippy.unwrap_used = "deny"
clippy.expect_used = "allow"
clippy.unwrap_used = "deny"
# We must specify `'_` to avoid surprises
rust.elided_lifetimes_in_paths = "deny"
@ -61,34 +62,34 @@ rust.missing_copy_implementations = "warn"
rust.missing_debug_implementations = "warn"
# Misc.
rust.noop_method_call = "warn"
rust.unused_results = "warn"
clippy.let_underscore_untyped = "warn"
rust.explicit_outlives_requirements = "warn"
rust.meta_variable_misuse = "warn"
rust.must_not_suspend = "warn"
rust.noop_method_call = "warn"
rust.single_use_lifetimes = "warn"
rust.trivial_numeric_casts = "warn"
rust.unused_lifetimes = "warn"
rust.unused_macro_rules = "warn"
rust.unused_results = "warn"
rust.variant_size_differences = "warn"
clippy.let_underscore_untyped = "warn"
# False positives
clippy.significant_drop_tightening = "allow"
# Style
clippy.implicit_return = "allow"
clippy.multiple_inherent_impl = "allow"
clippy.pattern_type_mismatch = "allow"
clippy.match_bool = "allow"
clippy.single_match_else = "allow" # Note: `match` reads easier than `if / else`
clippy.option_if_let_else = "allow"
clippy.self_named_module_files = "allow"
clippy.items_after_statements = "allow"
clippy.module_name_repetitions = "allow"
clippy.match_bool = "allow"
clippy.module_inception = "allow"
clippy.separated_literal_suffix = "allow"
clippy.module_name_repetitions = "allow"
clippy.multiple_inherent_impl = "allow"
clippy.option_if_let_else = "allow"
clippy.pattern_type_mismatch = "allow"
clippy.ref_patterns = "allow" # Matching on a vale and adding `ref` is easier than matching on ref and de-referencing values within the body
clippy.self_named_module_files = "allow"
clippy.separated_literal_suffix = "allow"
clippy.single_match_else = "allow" # Note: `match` reads easier than `if / else`
# Callers don't care about which error happened.

18
zbuild-test/Cargo.toml Normal file
View File

@ -0,0 +1,18 @@
[package]
name = "zbuild-test"
description = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
publish = { workspace = true }
repository = { workspace = true }
version = { workspace = true }
[dependencies]
app-error = { workspace = true }
tempfile = { workspace = true }
tracing = { workspace = true }
zbuild = { workspace = true }
[lints]
workspace = true

View File

@ -1,10 +1,7 @@
//! Utilities for all integration tests
//! Zbuild testing utilities.
// Lints
#![allow(
dead_code,
reason = "This module is used from many tests, which might not use everything"
)]
// Features
#![feature(must_not_suspend)]
// Imports
use {

47
zbuild/Cargo.toml Normal file
View File

@ -0,0 +1,47 @@
[package]
edition = { workspace = true }
name = "zbuild"
description = { workspace = true }
license = { workspace = true }
version = { workspace = true }
repository = { workspace = true }
publish = { workspace = true }
[features]
tokio-console = ["dep:console-subscriber"]
[dependencies]
app-error = { workspace = true }
async-broadcast = { workspace = true }
clap = { features = ["derive"], workspace = true }
console-subscriber = { optional = true, workspace = true }
dashmap = { workspace = true }
futures = { workspace = true }
indexmap = { workspace = true }
indicatif = { workspace = true }
itertools = { workspace = true }
notify = { workspace = true }
notify-debouncer-full = { workspace = true }
pin-project = { workspace = true }
smallvec = { features = ["may_dangle"], workspace = true }
tokio = { features = ["full"], workspace = true }
tokio-stream = { workspace = true }
tracing = { workspace = true }
tracing-log = { workspace = true }
tracing-subscriber = { features = ["env-filter"], workspace = true }
unicode-ident = { workspace = true }
yoke = { workspace = true }
[dev-dependencies]
# Workspace
zbuild-test = { workspace = true }
tempfile = { workspace = true }
tracing-test = { workspace = true, features = ["no-env-filter"] }
[lints]
workspace = true

View File

@ -3,9 +3,6 @@
// Lints
#![expect(clippy::tests_outside_test_module, reason = "We're an integration test")]
// Modules
mod util;
// Imports
use zbuild::ExitResult;
@ -13,7 +10,7 @@ use zbuild::ExitResult;
#[tokio::test]
#[tracing_test::traced_test]
async fn basic_import() -> ExitResult {
let _temp_dir = util::with_zbuild_multiple(r#"include "a.zb";"#, [("a.zb", "")], []).await?;
let _temp_dir = zbuild_test::with_zbuild_multiple(r#"include "a.zb";"#, [("a.zb", "")], []).await?;
ExitResult::Ok
}

View File

@ -3,20 +3,17 @@
// Lints
#![expect(clippy::tests_outside_test_module, reason = "We're an integration test")]
// Modules
mod util;
// Imports
use {
zbuild::ExitResult,
app_error::{Context, app_error},
zbuild::ExitResult,
};
/// Single rule with multiple outputs
#[tokio::test]
#[tracing_test::traced_test]
async fn basic_multiple() -> ExitResult {
let temp_dir = util::with_zbuild(
let temp_dir = zbuild_test::with_zbuild(
r#"
rule create_file {
out "file1.out";

View File

@ -3,20 +3,17 @@
// Lints
#![expect(clippy::tests_outside_test_module, reason = "We're an integration test")]
// Modules
mod util;
// Imports
use {
zbuild::ExitResult,
app_error::{Context, app_error},
zbuild::ExitResult,
};
/// Single rule and target
#[tokio::test]
#[tracing_test::traced_test]
async fn basic_none() -> ExitResult {
let temp_dir = util::with_zbuild(
let temp_dir = zbuild_test::with_zbuild(
r#"
rule create_file {
out "file.out";

View File

@ -3,20 +3,17 @@
// Lints
#![expect(clippy::tests_outside_test_module, reason = "We're an integration test")]
// Modules
mod util;
// Imports
use {
zbuild::ExitResult,
app_error::{Context, app_error},
zbuild::ExitResult,
};
/// Single rule and target
#[tokio::test]
#[tracing_test::traced_test]
async fn basic_single() -> ExitResult {
let temp_dir = util::with_zbuild(
let temp_dir = zbuild_test::with_zbuild(
r#"
rule create_file {
out "file.out";

View File

@ -3,15 +3,12 @@
// Lints
#![expect(clippy::tests_outside_test_module, reason = "We're an integration test")]
// Modules
mod util;
// Imports
use {
app_error::Context,
std::fs,
tempfile::TempDir,
zbuild::{Args, ExitResult},
app_error::Context,
};
#[tokio::test]

View File

@ -3,15 +3,12 @@
// Lints
#![expect(clippy::tests_outside_test_module, reason = "We're an integration test")]
// Modules
mod util;
// Imports
use {
app_error::Context,
std::fs,
tempfile::TempDir,
zbuild::{AppError, Args, ExitResult},
app_error::Context,
};
/// Test for `--keep-going`