Skip to content

Commit dc2afa4

Browse files
committed
docs: remove false breaking change about PreModel definition getter (never published)
1 parent c53adb0 commit dc2afa4

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

BREAKING.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,6 @@ The old function names were misleading because they returned the dimension of du
3232

3333
The functions `dim_*_constraints_box(ocp::Model)` (for Model, not Solution) remain unchanged and still refer to constraint dimension in the model.
3434

35-
### Breaking Changes: Definition Getter Removal on PreModel
36-
37-
The `definition` and `expression` getters on `PreModel` have been removed to maintain consistency with the rest of the codebase where `PreModel` fields are accessed directly.
38-
39-
#### Migration Guide
40-
41-
```julia
42-
# Before (removed getters)
43-
d = definition(pre) # No longer available
44-
e = expression(pre) # No longer available
45-
46-
# After (direct field access)
47-
d = pre.definition # Access the field directly
48-
e = expression(pre.definition) # Pass the definition to expression()
49-
```
50-
51-
#### Rationale
52-
53-
The removal aligns with the existing pattern in CTModels where `PreModel` fields are accessed directly (e.g., `pre.state`, `pre.control`, `pre.variable`) rather than through getter functions. Getters on `Model` remain unchanged.
54-
55-
#### Note
56-
57-
The `definition(ocp::Model)` and `expression(ocp::Model)` getters remain available and unchanged. Only the `PreModel` variants were removed.
58-
5935
### Non-Breaking Changes
6036

6137
This release also introduces consistent variable and control checking functions without breaking existing functionality:

CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ expr = expression(pre.definition) # Returns the Expr
6060
model = build(pre) # Works even without definition
6161
```
6262

63-
#### Breaking Changes
64-
65-
- **PreModel getters removed**: `definition(pre::PreModel)` and `expression(pre::PreModel)` removed; use `pre.definition` and `expression(pre.definition)` instead
66-
- **Model getters unchanged**: `definition(model::Model)` and `expression(model::Model)` remain available
67-
6863
#### Consistent Variable and Control Checking Functions
6964

7065
- **New functions**: Added `is_variable()` and `is_control_free()` for checking problem properties

0 commit comments

Comments
 (0)