ctest: Check public API in modules
Open
Nobody has claimed this yet.
ctest
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 69
Description
Currently ctest requires everything on the Rust side to be available at the crate root. We should check nested modules too, though, since we may have more in the future when things conflict.
I think this could be implemented by adding API to ctest like the following:
// Same for `Struct`, `Const`, etc
impl Struct {
pub fn path() -> ItemPath;
}
pub struct ItemPath(BoxStr);
impl ItemPath {
pub fn as_str(&self) -> &str {
&self.0
}
pub fn components(&self) -> impl DoubleEndedIterator<Item = &str> {
self.0.split("::")
}
}
Cc @mbyx
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading ctest's existing crate-root API checking and inspect how items such as Struct and Const are represented. Trace how paths are currently handled, then verify that nested module paths can be checked and that the proposed ItemPath behavior is covered by tests or equivalent validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100