Repository navigation
Mark the documented public API as public - #226
Merged
ChrisRackauckas merged 1 commit intoJul 12, 2026
Merged
Conversation
FiniteDiff exports nothing and declared no `public` names, so every documented entry point (finite_difference_* and the *Cache types) is only reachable via qualified access `FiniteDiff.name`. On Julia 1.11+ that trips downstream ExplicitImports/Aqua qualified-access checks, which flag these as accesses to non-public names (e.g. the QA failure in SimpleBoundaryValueDiffEq.jl accessing finite_difference_jacobian). Declare the 15 names rendered in the docs' `@docs` blocks as `public`. `public` is a keyword only on 1.11+, so it is emitted via `eval` guarded on VERSION to keep the source parseable on the 1.10 LTS. Add a test asserting each name is defined and, on 1.11+, marked public. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas
marked this pull request as ready for review
July 12, 2026 07:21
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
FiniteDiff exports nothing and declared no
publicnames, so every documented entry point is only reachable via qualified access (FiniteDiff.finite_difference_jacobian, etc.). On Julia 1.11+ this trips downstreamExplicitImports/Aquaqualified-access checks, which flag these as accesses to non-public names.Concretely, this surfaced as a QA failure in SimpleBoundaryValueDiffEq.jl, where
check_all_qualified_accesses_are_publicreported:Change
Declare the 15 names that are rendered in the manual's
@docsblocks aspublic:finite_difference_derivative,finite_difference_derivative!finite_difference_gradient,finite_difference_gradient!finite_difference_jacobian,finite_difference_jacobian!finite_difference_hessian,finite_difference_hessian!finite_difference_jvp,finite_difference_jvp!DerivativeCache,GradientCache,JacobianCache,HessianCache,JVPCachepublicis a keyword only on Julia 1.11+, so it is emitted viaeval(Expr(:public, ...))guarded onVERSIONto keep the source parseable on the 1.10 LTS. Names described only in prose on the "Internal Utilities" docs page (the_-prefixed helpers) are intentionally left non-public.A
test/public_api_tests.jlasserts each name is defined and, on 1.11+, marked public.Verification
Base.ispublic == trueon Julia 1.11; loads cleanly on the 1.10 LTS (guard skips thepublicemit).improper_qualified_accesses(SimpleBoundaryValueDiffEq)lists bothfinite_difference_jacobiannames; with this patch dev'd in, they no longer appear. (SBVDE separately still accessesBase.Iterators.peel, which is unrelated to FiniteDiff.)Please ignore until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code