Skip to content

Define Base.deepcopy_internal() instead of Base.deepcopy() - #142

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
JamesWrigley:deepcopy
Aug 20, 2026
Merged

Define Base.deepcopy_internal() instead of Base.deepcopy()#142
ChrisRackauckas merged 1 commit into
SciML:masterfrom
JamesWrigley:deepcopy

Conversation

@JamesWrigley

Copy link
Copy Markdown
Member

As recommended by the deepcopy() docs. Fixes these invalidations seen when loading CurveFit.jl on 1.13:

 inserting deepcopy(f::RuntimeGeneratedFunctions.RuntimeGeneratedFunction) @ RuntimeGeneratedFunctions ~/.julia/packages/RuntimeGeneratedFunctions/odmYb/src/RuntimeGeneratedFunctions.jl:582 invalidated:                                     
   backedges: 1: superseding deepcopy(x) @ Base deepcopy.jl:32 with MethodInstance for deepcopy(::Any) (43 children)                                                                                                                           
   1 mt_cache                                                                                                                                                                                                                                  

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API.

@JamesWrigley
JamesWrigley force-pushed the deepcopy branch 3 times, most recently from 2fa1efb to 0c2e3e1 Compare August 17, 2026 20:07
As recommended by the deepcopy() docs.
@ChrisRackauckas
ChrisRackauckas merged commit c4e4d4c into SciML:master Aug 20, 2026
16 checks passed
@JamesWrigley
JamesWrigley deleted the deepcopy branch August 20, 2026 08:05
Sign up for free to 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