Skip to content

Commit ddf9969

Browse files
committed
Update release notes and xml docs
1 parent c77be4c commit ddf9969

File tree

3 files changed

+102
-68
lines changed

3 files changed

+102
-68
lines changed

RELEASE_NOTES.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
### 6.0.0+c77be4c (Released 2025-01-27)
2+
3+
Breaking changes.
4+
5+
Closed issues:
6+
- [Deep copy: add native fallbacks for objects in js/py](https://github.com/CSBiology/DynamicObj/issues/47)
7+
- [Expand DeepCopy logic to mutable collections that contain primitives](https://github.com/CSBiology/DynamicObj/issues/45)
8+
- [Add a flag for DeepCopyPropertiesTo that enabled to omit static props](https://github.com/CSBiology/DynamicObj/issues/44])
9+
10+
Improve `DynamicObj` deep copy methods and refactor into a separate `CopyUtils` class for reuse:
11+
12+
The following types/classes can be (recursively) deep copied now:
13+
14+
- Basic F# types (`bool`, `byte`, `sbyte`, `int16`, `uint16`, `int`, `uint`, `int64`, `uint64`, `nativeint`, `unativeint`, `float`, `float32`, `char`, `string`, `unit`, `decimal`)
15+
16+
- `ResizeArrays` and `Dictionaries` containing any combination of basic F# types
17+
18+
- `Dictionaries` containing `DynamicObj` as keys or values in any combination with `DynamicObj` or basic F# types as keys or values
19+
20+
- `array<DynamicObj>`, `list<DynamicObj>`, `ResizeArray<DynamicObj>`: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
21+
22+
- `System.ICloneable`: If the property implements `ICloneable`, the `Clone()` method is called on the property.
23+
24+
- `DynamicObj` (and derived classes): properties that are themselves `DynamicObj` instances are deep copied recursively.
25+
if a derived class has static properties (e.g. instance properties), these can be copied as dynamic properties on the new instance or ignored.
26+
27+
Note on Classes that inherit from `DynamicObj`:
28+
29+
Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement `ICloneable`.
30+
The deep copied instances will be cast to `DynamicObj` with deep copied dynamic properties. Staic/instance properties can be copied as dynamic properties on the new instance or be ignored.
31+
It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
32+
and then passing them to the class constructor if needed.
33+
34+
135
### 5.0.0+72c94fff (Released 2024-12-17)
236

337
Breaking changes.

src/DynamicObj/DynObj.fs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -223,23 +223,23 @@ module DynObj =
223223
///
224224
/// The following cases are handled (in this precedence):
225225
///
226-
/// - Basic F# types (bool, byte, sbyte, int16, uint16, int, uint, int64, uint64, nativeint, unativeint, float, float32, char, string, unit, decimal)
227-
///
228-
/// - ResizeArrays and Dictionaries containing any combination of basic F# types
229-
///
230-
/// - Dictionaries containing DynamicObj as keys or values in any combination with DynamicObj or basic F# types as keys or values
231-
///
232-
/// - array&lt;DynamicObj&gt;, list&lt;DynamicObj&gt;, ResizeArray&lt;DynamicObj&gt;: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
233-
///
234-
/// - System.ICloneable: If the property implements ICloneable, the Clone() method is called on the property.
235-
///
236-
/// - DynamicObj (and derived classes): properties that are themselves DynamicObj instances are deep copied recursively.
237-
/// if a derived class has static properties (e.g. instance properties), these will be copied as dynamic properties on the new instance.
238-
///
239-
/// Note on Classes that inherit from DynamicObj:
240-
///
241-
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
242-
/// The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
226+
/// - Basic F# types (`bool`, `byte`, `sbyte`, `int16`, `uint16`, `int`, `uint`, `int64`, `uint64`, `nativeint`, `unativeint`, `float`, `float32`, `char`, `string`, `unit`, `decimal`)
227+
///
228+
/// - `ResizeArrays` and `Dictionaries` containing any combination of basic F# types
229+
///
230+
/// - `Dictionaries` containing `DynamicObj` as keys or values in any combination with `DynamicObj` or basic F# types as keys or values
231+
///
232+
/// - `array<DynamicObj>`, `list<DynamicObj>`, `ResizeArray<DynamicObj>`: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
233+
///
234+
/// - `System.ICloneable`: If the property implements `ICloneable`, the `Clone()` method is called on the property.
235+
///
236+
/// - `DynamicObj` (and derived classes): properties that are themselves `DynamicObj` instances are deep copied recursively.
237+
/// if a derived class has static properties (e.g. instance properties), these can be copied as dynamic properties on the new instance or ignored.
238+
///
239+
/// Note on Classes that inherit from `DynamicObj`:
240+
///
241+
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement `ICloneable`.
242+
/// The deep copied instances will be cast to `DynamicObj` with deep copied dynamic properties. Staic/instance properties can be copied as dynamic properties on the new instance or be ignored.
243243
/// It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
244244
/// and then passing them to the class constructor if needed.
245245
/// </summary>

src/DynamicObj/DynamicObj.fs

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -267,23 +267,23 @@ type DynamicObj() =
267267
///
268268
/// The following cases are handled (in this precedence):
269269
///
270-
/// - Basic F# types (bool, byte, sbyte, int16, uint16, int, uint, int64, uint64, nativeint, unativeint, float, float32, char, string, unit, decimal)
271-
///
272-
/// - ResizeArrays and Dictionaries containing any combination of basic F# types
273-
///
274-
/// - Dictionaries containing DynamicObj as keys or values in any combination with DynamicObj or basic F# types as keys or values
275-
///
276-
/// - array&lt;DynamicObj&gt;, list&lt;DynamicObj&gt;, ResizeArray&lt;DynamicObj&gt;: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
277-
///
278-
/// - System.ICloneable: If the property implements ICloneable, the Clone() method is called on the property.
279-
///
280-
/// - DynamicObj (and derived classes): properties that are themselves DynamicObj instances are deep copied recursively.
281-
/// if a derived class has static properties (e.g. instance properties), these will be copied as dynamic properties on the new instance.
282-
///
283-
/// Note on Classes that inherit from DynamicObj:
284-
///
285-
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
286-
/// The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
270+
/// - Basic F# types (`bool`, `byte`, `sbyte`, `int16`, `uint16`, `int`, `uint`, `int64`, `uint64`, `nativeint`, `unativeint`, `float`, `float32`, `char`, `string`, `unit`, `decimal`)
271+
///
272+
/// - `ResizeArrays` and `Dictionaries` containing any combination of basic F# types
273+
///
274+
/// - `Dictionaries` containing `DynamicObj` as keys or values in any combination with `DynamicObj` or basic F# types as keys or values
275+
///
276+
/// - `array<DynamicObj>`, `list<DynamicObj>`, `ResizeArray<DynamicObj>`: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
277+
///
278+
/// - `System.ICloneable`: If the property implements `ICloneable`, the `Clone()` method is called on the property.
279+
///
280+
/// - `DynamicObj` (and derived classes): properties that are themselves `DynamicObj` instances are deep copied recursively.
281+
/// if a derived class has static properties (e.g. instance properties), these can be copied as dynamic properties on the new instance or ignored.
282+
///
283+
/// Note on Classes that inherit from `DynamicObj`:
284+
///
285+
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement `ICloneable`.
286+
/// The deep copied instances will be cast to `DynamicObj` with deep copied dynamic properties. Staic/instance properties can be copied as dynamic properties on the new instance or be ignored.
287287
/// It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
288288
/// and then passing them to the class constructor if needed.
289289
/// </summary>
@@ -316,23 +316,23 @@ type DynamicObj() =
316316
///
317317
/// The following cases are handled (in this precedence):
318318
///
319-
/// - Basic F# types (bool, byte, sbyte, int16, uint16, int, uint, int64, uint64, nativeint, unativeint, float, float32, char, string, unit, decimal)
320-
///
321-
/// - ResizeArrays and Dictionaries containing any combination of basic F# types
322-
///
323-
/// - Dictionaries containing DynamicObj as keys or values in any combination with DynamicObj or basic F# types as keys or values
324-
///
325-
/// - array&lt;DynamicObj&gt;, list&lt;DynamicObj&gt;, ResizeArray&lt;DynamicObj&gt;: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
326-
///
327-
/// - System.ICloneable: If the property implements ICloneable, the Clone() method is called on the property.
328-
///
329-
/// - DynamicObj (and derived classes): properties that are themselves DynamicObj instances are deep copied recursively.
330-
/// if a derived class has static properties (e.g. instance properties), these will be copied as dynamic properties on the new instance.
331-
///
332-
/// Note on Classes that inherit from DynamicObj:
333-
///
334-
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
335-
/// The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
319+
/// - Basic F# types (`bool`, `byte`, `sbyte`, `int16`, `uint16`, `int`, `uint`, `int64`, `uint64`, `nativeint`, `unativeint`, `float`, `float32`, `char`, `string`, `unit`, `decimal`)
320+
///
321+
/// - `ResizeArrays` and `Dictionaries` containing any combination of basic F# types
322+
///
323+
/// - `Dictionaries` containing `DynamicObj` as keys or values in any combination with `DynamicObj` or basic F# types as keys or values
324+
///
325+
/// - `array<DynamicObj>`, `list<DynamicObj>`, `ResizeArray<DynamicObj>`: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
326+
///
327+
/// - `System.ICloneable`: If the property implements `ICloneable`, the `Clone()` method is called on the property.
328+
///
329+
/// - `DynamicObj` (and derived classes): properties that are themselves `DynamicObj` instances are deep copied recursively.
330+
/// if a derived class has static properties (e.g. instance properties), these can be copied as dynamic properties on the new instance or ignored.
331+
///
332+
/// Note on Classes that inherit from `DynamicObj`:
333+
///
334+
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement `ICloneable`.
335+
/// The deep copied instances will be cast to `DynamicObj` with deep copied dynamic properties. Staic/instance properties can be copied as dynamic properties on the new instance or be ignored.
336336
/// It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
337337
/// and then passing them to the class constructor if needed.
338338
/// </summary>
@@ -407,23 +407,23 @@ and CopyUtils =
407407
408408
/// The following cases are handled (in this precedence):
409409
///
410-
/// - Basic F# types (bool, byte, sbyte, int16, uint16, int, uint, int64, uint64, nativeint, unativeint, float, float32, char, string, unit, decimal)
411-
///
412-
/// - ResizeArrays and Dictionaries containing any combination of basic F# types
413-
///
414-
/// - Dictionaries containing DynamicObj as keys or values in any combination with DynamicObj or basic F# types as keys or values
415-
///
416-
/// - array&lt;DynamicObj&gt;, list&lt;DynamicObj&gt;, ResizeArray&lt;DynamicObj&gt;: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
417-
///
418-
/// - System.ICloneable: If the property implements ICloneable, the Clone() method is called on the property.
419-
///
420-
/// - DynamicObj (and derived classes): properties that are themselves DynamicObj instances are deep copied recursively.
421-
/// if a derived class has static properties (e.g. instance properties), these will be copied as dynamic properties on the new instance.
422-
///
423-
/// Note on Classes that inherit from DynamicObj:
424-
///
425-
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement ICloneable.
426-
/// The deep copied instances will be cast to DynamicObj with static/instance properties AND dynamic properties all set as dynamic properties.
410+
/// - Basic F# types (`bool`, `byte`, `sbyte`, `int16`, `uint16`, `int`, `uint`, `int64`, `uint64`, `nativeint`, `unativeint`, `float`, `float32`, `char`, `string`, `unit`, `decimal`)
411+
///
412+
/// - `ResizeArrays` and `Dictionaries` containing any combination of basic F# types
413+
///
414+
/// - `Dictionaries` containing `DynamicObj` as keys or values in any combination with `DynamicObj` or basic F# types as keys or values
415+
///
416+
/// - `array<DynamicObj>`, `list<DynamicObj>`, `ResizeArray<DynamicObj>`: These collections of DynamicObj are copied as a new collection with recursively deep copied elements.
417+
///
418+
/// - `System.ICloneable`: If the property implements `ICloneable`, the `Clone()` method is called on the property.
419+
///
420+
/// - `DynamicObj` (and derived classes): properties that are themselves `DynamicObj` instances are deep copied recursively.
421+
/// if a derived class has static properties (e.g. instance properties), these can be copied as dynamic properties on the new instance or ignored.
422+
///
423+
/// Note on Classes that inherit from `DynamicObj`:
424+
///
425+
/// Classes that inherit from DynamicObj will match the `DynamicObj` typecheck if they do not implement `ICloneable`.
426+
/// The deep copied instances will be cast to `DynamicObj` with deep copied dynamic properties. Staic/instance properties can be copied as dynamic properties on the new instance or be ignored.
427427
/// It should be possible to 'recover' the original type by checking if the needed properties exist as dynamic properties,
428428
/// and then passing them to the class constructor if needed.
429429
/// </summary>

0 commit comments

Comments
 (0)