Repository navigation
Define explicit public API exports and migration paths - #135
Open
arthurianresolve wants to merge 95 commits into
Open
arthurianresolve wants to merge 95 commits into
arthurianresolve wants to merge 95 commits into
Conversation
…-structured-output # Conflicts: # crates/dspy-rs/src/core/lm/mod.rs # crates/dspy-rs/src/trace/span.rs
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
arthurianresolve
added a commit
to arthurianresolve/DSRs
that referenced
this pull request
Nov 19, 2026
Integrate krypticmouse#135 — Define explicit public API exports and migration paths
This branch has not been deployed
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.
Summary of Fix
Stacked on #134. Merge #134 before this PR.
Replace wildcard re-exports at the crate root and public module facades with explicit named exports.
Keep the core user-facing types at the root and in the curated prelude. Access optimizer internals, generated builders and other implementation helpers through their defining public modules.
Update affected test imports and document the old-to-new import paths.
Add positive and compile-fail rustdoc examples for the intended export boundary.
Declare the data/cache requirements of feature-dependent examples and correct obsolete feature names in their run commands, allowing all-target checks with default features disabled.
Export the new provider/configuration/error types explicitly through their public facades. Add tested migration paths for removed untyped signatures, legacy BamlType and field!/sign!/hashmap! helpers.
Verify generated nested Schema/Signature serde, typed demos and reasoning augmentation, owned SignatureDef construction and standard collection replacements.
Fixes #76
Fixes #52
Fixes #53
Fixes #73
Why
Wildcard exports automatically exposed newly added implementation items at the root, obscured the supported API and increased collision risk. Explicit export lists make that boundary visible in source and prevent future additions from becoming root API accidentally.
This is an intentional API migration. Downstream imports such as
dspy_rs::RolloutCachemust move to their documented module paths. Defining modules remain public, and response-cache exports still require thecachefeature.Related work
Testing
Final integrated cache-enabled release checks: 61 tests passed using
--no-default-features --features cache(three live tests excluded from this offline run). This covers invocation history, persistent storage, tool-loop limits, native/scalar output and trace/history parity.Extend the explicit export lists to include the typed history/tool fields and persistent interaction-store APIs added in Add provider-native structured output and scoped sampling #121/Decouple execution history and feature-gate response caching #134.
Three
test_typed_api_migrationregressions passed, covering nested serde/generated IO and Demo, typed augmentation, IR schema construction and standard maps.The resolved stack at
2b4590f0174dc05582347b8da75b6b58fbce9ca0passed 209 tests with--no-default-featuresand 247 with defaultdata/cachefeatures (2 live tests ignored per offline run). These are focused library and integration suites, not the full workspace test suite. Later ancestry-only integration merges preserve the validated source trees.cargo +1.99.1 check --workspace --all-targets --locked -j1— passed with defaults.cargo +1.99.1 check -p dspy-rs --all-targets --no-default-features --locked -j1— passed.Minimal-feature rustdoc — 14 passed (including the rejected root-import compile-fail case), 19 ignored.
git diff --check— passed.AI Disclosure