Skip to content

Add public declarations - #744

Open
mcabbott wants to merge 1 commit into
JuliaDiff:masterfrom
mcabbott:public
Open

Add public declarations#744
mcabbott wants to merge 1 commit into
JuliaDiff:masterfrom
mcabbott:public

Conversation

@mcabbott

Copy link
Copy Markdown
Member

First commit adds only those in api.md, but perhaps we should add more... like Dual?

help?> ForwardDiff.Dual
│ Warning
│
│ The following bindings may be internal; they may change or be
│ removed in future versions:
│
│ • ForwardDiff.Dual

(eval is following this https://github.com/JuliaLang/julia/pull/55097/files )

@codecov

codecovBot commented Apr 7, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.96%. Comparing base (c310fb5) to head (e978ce2).
⚠️ Report is 69 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #744 +/- ##
==========================================
- Coverage 89.57% 86.96% -2.62% 
==========================================
Files 11 10 -1 Lines 969 959 -10 ==========================================
- Hits 868 834 -34 - Misses 101 125 +24 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gdalle

Copy link
Copy Markdown
Member

This is a very welcome initiative to guarantee API stability! So many people have been using ForwardDiff internals that they're not really internals anymore at this point.
For instance, here is the list of names that DI uses:

https://github.com/JuliaDiff/DifferentiationInterface.jl/blob/ba8a2fa9e7558e65655aeedbc36158e41ea5e324/DifferentiationInterface/ext/DifferentiationInterfaceForwardDiffExt/DifferentiationInterfaceForwardDiffExt.jl#L7-L28

@gdalle

Copy link
Copy Markdown
Member

Gentle bump on this one

Comment threadsrc/ForwardDiff.jl
Comment on lines +27 to +29
eval(Meta.parse(
"public derivative, derivative!, gradient, gradient!, jacobian, jacobian!,
hessian, hessian!, DerivativeConfig, GradientConfig, JacobianConfig, HessianConfig"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit more direct:

Suggested change
eval(Meta.parse(
"public derivative, derivative!, gradient, gradient!, jacobian, jacobian!,
hessian, hessian!, DerivativeConfig, GradientConfig, JacobianConfig, HessianConfig"))
eval(Expr(
:public,
:derivative,
:derivative!,
:gradient,
:gradient!,
:jacobian,
:jacobian!,
:hessian,
:hessian!,
:DerivativeConfig,
:GradientConfig,
:JacobianConfig,
:HessianConfig))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add:

 Chunk
Dual
Tag
checktag
extract_derivative
partials
pickchunksize
value

Those are used in DI so I think it's reasonable for them to be public here.

Comment threadsrc/ForwardDiff.jl
Comment on lines +27 to +29
eval(Meta.parse(
"public derivative, derivative!, gradient, gradient!, jacobian, jacobian!,
hessian, hessian!, DerivativeConfig, GradientConfig, JacobianConfig, HessianConfig"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add:

 Chunk
Dual
Tag
checktag
extract_derivative
partials
pickchunksize
value

Those are used in DI so I think it's reasonable for them to be public here.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mcabbott@gdalle@devmotion