Skip to content

Remove explicit != methods for Dual - #793

Merged
devmotion merged 2 commits into
JuliaDiff:masterfrom
JamesWrigley:dual-neq
Jan 28, 2026
Merged

Remove explicit != methods for Dual#793
devmotion merged 2 commits into
JuliaDiff:masterfrom
JamesWrigley:dual-neq

Conversation

@JamesWrigley

Copy link
Copy Markdown
Contributor

These are already defined by Base in terms of ==.

Fixes these invalidations seen when loading CurveFit.jl (CC @ChrisRackauckas):

 inserting !=(x::Integer, y::ForwardDiff.Dual{Ty}) where Ty @ ForwardDiff ~/.julia/packages/ForwardDiff/9ocoj/src/dual.jl:159 invalidated: backedges:1: superseding !=(x, y) @ Base operators.jl:321 with MethodInstance for!=(::Int64, ::Any) (1 children) 2: superseding !=(x, y) @ Base operators.jl:321 with MethodInstance for!=(::Int32, ::Any) (49 children) 3: superseding !=(x, y) @ Base operators.jl:321 with MethodInstance for!=(::Int64, ::Any) (97 children) inserting !=(x::ForwardDiff.Dual{Tx}, y::Integer) where Tx @ ForwardDiff ~/.julia/packages/ForwardDiff/9ocoj/src/dual.jl:158 invalidated: backedges:1: superseding !=(x, y) @ Base operators.jl:321 with MethodInstance for!=(::Any, ::Bool) (24 children) 2: superseding !=(x, y) @ Base operators.jl:321 with MethodInstance for!=(::Any, ::Int64) (38 children) 3: superseding !=(x, y) @ Base operators.jl:321 with MethodInstance for!=(::Any, ::Int64) (202 children) 

Would it be possible to make a new release with this?

These are already defined by Base in terms of `==`.
@codecov

codecovBot commented Jan 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.75%. Comparing base (71258ec) to head (b50f9a7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #793 +/- ##
=======================================
Coverage 90.75% 90.75% =======================================
Files 11 11 Lines 1071 1071 =======================================
Hits 972 972 Misses 99 99 

☔ View full report in Codecov by Sentry.
📢 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.

@JamesWrigley

Copy link
Copy Markdown
ContributorAuthor

pre failures seem to be because of a JET incompatibility.

@devmotiondevmotion left a comment

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.

Thanks, seems like a good change, cf https://github.com/JuliaLang/julia/blob/f726949136712f84e8ecfea7429d23e626683c80/base/operators.jl#L308

Can you update the version number?

@JamesWrigley

Copy link
Copy Markdown
ContributorAuthor

Sure, done in b50f9a7.

@devmotion
devmotion merged commit 7262054 into JuliaDiff:masterJan 28, 2026
39 of 52 checks passed
@JamesWrigley
JamesWrigley deleted the dual-neq branch January 29, 2026 07:04
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.

2 participants

@JamesWrigley@devmotion