Repository navigation
refactor: take paths and strings as they come, and add Birthmark::load - #218
Merged
Merged
Conversation
Cargo empties target/doc whenever a different rustdoc writes to it, so the pinned nightly that reads the public API deleted the HTML documentation the stable `cargo doc` had built. The script now builds in target/public-api. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Program::load and the new Birthmark::load take anything that is a path, so a caller passes a string or a PathBuf without wrapping it in Path::new. set_json_path takes anything that converts into a PathBuf, and Kgram::new any sequence of strings. The README, the crate docs and the tests pass their values as they are. LifterBuilder's home, script and intermediate_dir take the value itself rather than an Option; a setting is left out by not calling its method. The command line keeps its one chain with set_if_some, which calls a setter only when its option was given.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Callers of the library pass paths and strings as they have them, rather than converting them first.
The library
Program::loadand the newBirthmark::loadtake anything that is a path.Program::load("a.json")replacesProgram::load(Path::new("a.json")), and a birthmark is read the same way a program is.set_json_path, on bothProgramandBirthmark, takes anything that converts into aPathBuf.Kgram::newtakes any sequence of strings.Code that passed the old types compiles unchanged.
Breaking:
LifterBuilderLifterBuilder::home,scriptandintermediate_dirtake the value itself rather than anOption. A setting is left out by not calling its method, which keeps the default as before.set_if_some, which calls a setter only when its option was given.public_api.shno longer emptiestarget/docCargo empties
target/docwhenever a different rustdoc writes to it. The script's pinned nightly therefore deleted the HTML documentation that the stablecargo dochad built, every time it ran. The script now builds intarget/public-api.Checked
cargo test --features mcp(413 tests), clippy with-D warningsand the public API check pass locally.target/docsurvives a run ofpublic_api.sh.🤖 Generated with Claude Code