Decide whether the library surface is public API before the next release
- Lingua principale
- Rust
- Stelle
- 407
- Fork
- 12
- Merge medio
- 5h 45m
- PR unite (30g)
- 30
Descrizione
`src/lib.rs` re-exports `Document`, `Rule`, `Violation`, `Cli`, `Command` and `Config`, and `mado` is published on crates.io, so every `pub fn` on those types is something a downstream crate can call and a release can break.
#418 removes one. `Document::written_column_of` was added in #407, shipped in 0.3.2, and had no caller left once MD034 stopped counting offsets off a literal; it and its private helper `written_offset` are gone. A crate that called it stops compiling on 0.3.3.
Nothing in the repository says whether that matters. `CONTRIBUTING.md` enumerates what a changelog entry is for — rules, the command line, the configuration file, distribution, and the parser version — and adds that a change with no entry is a change that was not observable. By that list the library surface is not observable and #418 is right to say nothing. But the list was written for the CLI, and it is not obvious it was meant to answer this.
Three ways out, and the first is not worse than the others:
- **The CLI is the product.** Say so in `CONTRIBUTING.md`, and the lib surface may move in a patch release. Then #418 needs nothing.
- **The lib is public API.** Then a removal is a minor-version change at least, wants a `Removed` entry, and `written_column_of` should have been deprecated for a release first.
- **Narrow the surface.** Most of what is `pub` is `pub` because the binary and the tests are in the same crate. Anything not meant to be called from outside could stop being `pub`, and the question stops coming up.
Worth settling before 0.3.3 either way, because whichever answer is right, it is retroactive.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.