crates/test-framework was copied from a different project. We only use a small fraction…
- User
crates/test-frameworkwas copied from a different project. We only use a small fraction of it. Find what is used and remove the rest Assistant
Good analysis. Let me now read the key files to make the changes.
Assistant
Now let me check which "unused" modules are actually needed internally by the used modules.
Assistant
Let me check if the spicetest submodules
searchandtext_to_sqlcan be removed, and what that would free up.Assistant
Now I have a clear picture. Let me create tasks and start removing.
Modules to remove (truly unused, even internally):
app_utils,arrow_record_batch_gen,gh_utils,object_store,pki,process,spicepod_utilsconstants(only used byspicetest::search, which is also unused)utils(only used byspicetest::text_to_sql, which is also unused)spicetest::search,spicetest::text_to_sql
Unused re-exports:
app,flight_client,futures,octocrab,spicepod,tokio_util,yamlModules to keep (used externally or internally by kept modules):
execution,metrics,queries,spicetest,telemetry(externally used)flight,git,spiced,snapshot(internally used by kept modules)queries::validation,queries::parameterized,queries::scenario(internally used)
Assistant
Now update
spicetest/mod.rsto remove unused submodules.Assistant
Now delete all the unused directories and files.
Assistant
Check if
constantswas a directory or a file.Assistant
Good, already removed. Now let's try building.
Assistant
The
spicedmodule usesconstants,process, andutilsinternally. Let me check what's needed and inline it.Assistant
spicedusesconstants,process::Process, andutils::wait_until_true. I need to either keep these modules or inline the needed pieces. Let me check what's in each.Assistant
They're already deleted. Let me check git for their contents.
Assistant
Processis only used byspiced. I'll inline the constants andwait_until_truedirectly intospiced/mod.rs, and moveProcessthere too.Assistant
Now let's check if
snapshotmodule uses anything from the removed modules.Assistant
Good,
snapshotonly usesflightandquerieswhich are both kept. Let me also checkgit/mod.rs.Assistant
Now let's try compiling again.
Assistant
test-framework compiles. Let me fix the warning and then check the whole project.
Assistant
No external use of
Process. Now check the whole project compiles.Assistant
Clean build. Now let me clean up unused dependencies from Cargo.toml.
Assistant
Now let me remove the unused dependencies from Cargo.toml.
Assistant
That's a duckdb build failure unrelated to my changes. Let me check just the test-framework and its dependents.
Assistant
The duckdb C++ compilation is failing (unrelated to my changes - looks like an sccache/compiler issue). Let me check just test-framework and checkpointer since spicebench pulls in duckdb.
Assistant
The duckdb build is failing regardless. Checkpointer transitively depends on duckdb. Let me just verify test-framework and its Rust dependents compile.
Assistant
This is an sccache issue on your system, not related to my changes. The earlier test-framework-only check succeeded. Let me bypass sccache.
Assistant
Clean build with no warnings. Let me also verify spicebench (the root crate) compiles.
Assistant
Everything compiles cleanly. Let me also clean up the unused features in Cargo.toml since they were likely for the removed modules.
Assistant
Those features aren't used by the remaining code - they're just empty feature flags. But they might be referenced by dependents. Let me check.
Assistant
No one uses the features. Let me remove them.
Assistant
All clean. Let me verify the final state of the changed files.
Assistant
Let me check the diff size to summarize.
Assistant
Here's a summary of what was done:
Removed 11 modules (directories/files deleted):
app_utils,arrow_record_batch_gen,constants,gh_utils,object_store,pki,process,spicepod_utils,utilsspicetest/search,spicetest/text_to_sql
Removed 7 unused re-exports from
lib.rs:app,flight_client,futures,octocrab,spicepod,tokio_util,yamlRemoved 10 unused Cargo dependencies:
app,arrow-json,async-channel,bytes,object_store,octocrab,rand,rcgen,time,utilRemoved 21 unused feature flags (all were empty stubs)
Inlined into
spiced/mod.rs: constants (HTTP_BASE_URL, , , ), helper, and a minimal struct — all previously imported from now-removed modules.