Skip to content

feat(deprecation): v2.0 compatibility shims for v2.1.0-beta - #855

Open
ocots wants to merge 2 commits into
mainfrom
feat/deprecation-shims
Open

feat(deprecation): v2.0 compatibility shims for v2.1.0-beta#855
ocots wants to merge 2 commits into
mainfrom
feat/deprecation-shims

Conversation

@ocots

@ocots ocots commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

This PR implements the v2.0 → v2.1.0-beta migration shims as specified in the migration report.

  • Adds src/deprecated.jl with PreconditionError-based shims for:
    • Lie(X, f) / Lie(X, Y)ad
    • X ⋅ fad
    • HamiltonianLiftCTLie.Lift / LiftedHamiltonianFunction
    • Base.time(ocp) / Base.time(sol)times / time_grid
    • Base.success(sol)successful
    • Flow(f::Function) → typed constructors
    • obsolete 5- and 4-positional flow calls → keyword variable=...
  • Wires src/deprecated.jl into src/OptimalControl.jl between imports and helpers.
  • Updates test/suite/reexport/test_ctlie.jl for the new Lie / shims.
  • Adds test/suite/reexport/test_deprecated.jl covering every shim.
  • Extends test/suite/flows/test_flow_api.jl with obsolete calling-convention assertions.
  • Updates BREAKING.md so the removed spellings are documented as throwing PreconditionError with replacement guidance.

Design notes

  • Lie, and HamiltonianLift are re-exported as migration-error shims.
  • success, time and Flow are not re-exported; the shims extend Base or CTFlows directly.
  • using OptimalControl, LinearAlgebra produces no export conflict.
  • Flow(ocp, u, g, μ) and augment=true are intentionally not shimmed (keyword-name and upstream-overwrite limitations) and are listed in src/deprecated.jl.

Test plan

  • Targeted test_deprecated passes (21/21)
  • Targeted test_ctlie passes (54/54)
  • Targeted test_flow_api passes (52/52)
  • Full Pkg.test() suite passes: 2224 passed, 2 broken, 0 failed

Generated with Devin

ocots and others added 2 commits August 14, 2026 11:48
Make the documentation buildable again, archive the pre-v2.1 pages,
and land the final capability-first skeleton so the remaining
content PRs do not touch the build environment.

- realign docs/Project.toml with the root [compat]
- add CTLie, DifferentiationInterface, ForwardDiff, OrdinaryDiffEqTsit5
- fix docs/make.jl: defensive extension loading, InterLinks, sitemap, Literate
- archive old docs/src/*.md and api/{public,subpackages}.md to docs/attic/
- create stub pages for the new sitemap
- track docs/src/assets/Manifest.toml and Project.toml for reproducibility

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Adds src/deprecated.jl with PreconditionError-based migration shims for
the removed Lie, \cdot, HamiltonianLift, Base.time, Base.success and old
Flow calling conventions.  The shims are exported only where the spec
calls for it (Lie, \cdot, HamiltonianLift); time/success/Flow remain
owned by Base and CTFlows.

Wires the shims into src/OptimalControl.jl between the imports and the
helpers.  Updates test/suite/reexport/test_ctlie.jl to expect the new
compatibility layer, adds test/suite/reexport/test_deprecated.jl, and
extends test/suite/flows/test_flow_api.jl with obsolete call-form
assertions.  BREAKING.md now documents that the shimmed spellings throw
PreconditionError with replacement guidance.

Full test suite: 2224 passed, 2 broken.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

1 participant