feat(deprecation): v2.0 compatibility shims for v2.1.0-beta - #855
Open
ocots wants to merge 2 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the v2.0 → v2.1.0-beta migration shims as specified in the migration report.
src/deprecated.jlwithPreconditionError-based shims for:Lie(X, f)/Lie(X, Y)→adX ⋅ f→adHamiltonianLift→CTLie.Lift/LiftedHamiltonianFunctionBase.time(ocp)/Base.time(sol)→times/time_gridBase.success(sol)→successfulFlow(f::Function)→ typed constructorsvariable=...src/deprecated.jlintosrc/OptimalControl.jlbetween imports and helpers.test/suite/reexport/test_ctlie.jlfor the newLie/⋅shims.test/suite/reexport/test_deprecated.jlcovering every shim.test/suite/flows/test_flow_api.jlwith obsolete calling-convention assertions.BREAKING.mdso the removed spellings are documented as throwingPreconditionErrorwith replacement guidance.Design notes
Lie,⋅andHamiltonianLiftare re-exported as migration-error shims.success,timeandFloware not re-exported; the shims extendBaseorCTFlowsdirectly.using OptimalControl, LinearAlgebraproduces no export conflict.Flow(ocp, u, g, μ)andaugment=trueare intentionally not shimmed (keyword-name and upstream-overwrite limitations) and are listed insrc/deprecated.jl.Test plan
test_deprecatedpasses (21/21)test_ctliepasses (54/54)test_flow_apipasses (52/52)Pkg.test()suite passes: 2224 passed, 2 broken, 0 failedGenerated with Devin