Skip to content

Restore serialization of dropped runtime-generated functions - #138

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/restore-dropped-rgf-serialization
Jul 31, 2026
Merged

Restore serialization of dropped runtime-generated functions#138
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/restore-dropped-rgf-serialization

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore this PR until reviewed by @ChrisRackauckas.

Summary

  • restore cross-process serialization for RuntimeGeneratedFunctions after drop_expr
  • serialize dropped functions through an internal proxy that carries the cached body, using only the public Serialization.serialize/deserialize API
  • keep the deserialized function dropped while restoring its destination-process cache
  • restore the cross-process regression test for both retained and dropped functions

Root cause

#136 removed the dropped-function serializer while migrating strict QA because it called the non-public Serialization.serialize_type. #137 then released that behavioral break as v0.5.23. ModelingToolkitBase has intentionally dropped generated-function bodies since April 2025, so its clean-master distributed test began failing when the worker deserialized an RGF produced in another process. The first bad source commit is 6550973d9290c906b1f61d37d416695e95e63a7c; v0.5.22 is the passing dependency control.

This implementation avoids the non-public API that motivated the removal.

Validation

  • julia +1.10 --project=. -e 'using Pkg; Pkg.test()'
  • julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
  • Runic 1.7.0: --check --diff .
  • ModelingToolkitBase clean master d39174937fead779b29fa5baa50ba975adbde8c9, Julia 1.10, official GROUP=Extended:
    • RuntimeGeneratedFunctions v0.5.23: reproduces ArgumentError: cannot deserialize a dropped RuntimeGeneratedFunction
    • pinned v0.5.22: passes, including Distributed Test
    • this branch developed locally as v0.5.23: passes, including Distributed Test and the full Extended group

Downstream failure: SciML/ModelingToolkit.jl#4852.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>

Copy link
Copy Markdown
Member Author

The sole failed check here is an independent clean-master Documentation regression, not part of the serialization diff. Current master fails identically at dependency installation: https://github.com/SciML/RuntimeGeneratedFunctions.jl/actions/runs/30408235778

An actual Pkg-based bisect identified #137 (483e2e938e1bfc5b5df6dc3aab0064c7005d08b6) as first bad: it changed the package from 0.6.0 back to 0.5.23 without changing the docs environment's 0.6 compatibility. The separate one-line fix, passing local docs build, and evidence are in #139.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 31, 2026 08:57
@ChrisRackauckas
ChrisRackauckas merged commit 6bbedce into SciML:master Jul 31, 2026
15 of 16 checks passed
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