granc/Makefile.toml
Víctor Martínez 17e6fe57a0
refactor: we can use tonic-reflection instead of having to generate the reflection client ourselfs (#29)
This pull request removes the custom-generated gRPC reflection protocol code from the repository and switches to using the `tonic-reflection` crate’s built-in protocol definitions. It also cleans up related tooling and dependencies that are no longer needed.

### Migration to `tonic-reflection` for gRPC reflection

* Replaced internal generated protocol types in `granc-core/src/reflection/client.rs` with imports from `tonic_reflection::pb::v1`, removing the need for the local `generated` module. [[1]](diffhunk://#diff-13deee04dd97de938cc46f0ef4faca083f3b471800e94cf45937122b83f01d57L19-L23) [[2]](diffhunk://#diff-13deee04dd97de938cc46f0ef4faca083f3b471800e94cf45937122b83f01d57R29-R33)
* Deleted the `granc-core/src/reflection/generated.rs` module, which previously contained the generated Rust code for the reflection protocol.
* Removed the reflection proto file (`granc-tools/proto/reflection.proto`) and the `granc-tools` crate, including its build tooling and dependencies, as they are no longer needed. [[1]](diffhunk://#diff-152ff715d002656dc972a294d86490c4857848392f54c73ac7e8818191ca617dL1-L149) [[2]](diffhunk://#diff-8a8fd674fd23e14d5c7a1ab242678a860560b0eee27cd248254510a3d585cbb4L1-L15) [[3]](diffhunk://#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L2-R2) [[4]](diffhunk://#diff-9375fd04332c86472d7be397ef09428cb86babd8826880a5835bd1d1c1bdbc08L43-L53)

### Dependency and configuration cleanup

* Updated `granc-core/Cargo.toml` to add `tonic-reflection` as a regular dependency (not just a dev-dependency) and removed the now-unnecessary dev-dependency.

### Codebase simplification

* Removed the now-unused `mod generated;` declaration from `granc-core/src/reflection.rs`.
2026-01-27 02:26:10 +01:00

42 lines
1,013 B
TOML

[config]
default_to_workspace = false
skip_core_tasks = true
[tasks.ci]
description = "CI task: Runs checks without modifying files"
dependencies = ["fmt-check", "clippy", "test"]
[tasks.run]
description = "Runs the CLI tool with dynamic arguments"
command = "cargo"
# Added '-p granc' to explicitly target the CLI binary in the workspace
args = ["run", "-p", "granc", "${@}"]
[tasks.test]
description = "Runs tests for the granc crate only"
command = "cargo"
args = ["nextest", "run", "--no-fail-fast", "--workspace"]
[tasks.fmt]
description = "Formats all source files"
command = "cargo"
args = ["fmt", "--all"]
[tasks.fmt-check]
description = "Checks formatting without modifying files (fails if unformatted)"
command = "cargo"
args = ["fmt", "--all", "--", "--check"]
[tasks.clippy]
description = "Runs Clippy lints on the workspace"
command = "cargo"
# Added '--workspace' to lint both crates
args = [
"clippy",
"--workspace",
"--all-targets",
"--all-features",
"--",
"-D",
"warnings",
]