|
| 1 | +# Migration checklist |
| 2 | + |
| 3 | +### Task 1: Capacity to SizeDimension |
| 4 | + |
| 5 | +**<u>Nature:</u>** |
| 6 | + |
| 7 | +`Capacity` became deprecated but kept, it is fully compatible with the `SizeDimension` class, which is a subclass of `Capacity`. |
| 8 | + |
| 9 | +**<u>Decision:</u>** |
| 10 | + |
| 11 | +Make `Capacity` *deprecated*. Keep both classes. |
| 12 | + |
| 13 | +**<u>State:</u>** |
| 14 | + |
| 15 | +Ready. |
| 16 | + |
| 17 | +**<u>Migration task:</u>** |
| 18 | + |
| 19 | +None required. Optionally, but strongly recommended to replace all `Capacity` references by `SizeDimension`. (Only a search and replace.) |
| 20 | + |
| 21 | +### Task 2: The Job interface |
| 22 | + |
| 23 | +**<u>Nature:</u>** |
| 24 | + |
| 25 | +The `Job` interface was extended. This would break any third party implementation of this interface (or the extension of the `AbstractJob` abstract class). |
| 26 | + |
| 27 | +**<u>Decision:</u>** |
| 28 | + |
| 29 | +There are several ways to overcome on this compatibility conflict: |
| 30 | + |
| 31 | +1. Keep it as it is and force the implementators to extend its implementation or to migrate to `CustomJob`. |
| 32 | +2. Restore the original interface and create an extended one as a descendant of this. The `AbstractJob` is the only one implementing this interface, so it can simply implement the extended one. |
| 33 | + |
| 34 | +Option 1 is a compatibility breaker, but doesn't pollute the code unnecessary and urges the users to switch to new job structure. With Option 2, we are keeping compatibility, but introducing an unnecessary level in the class hierarchy and finding a good name for the extended interface would be hard, because this is only created for the sake of compatibility. |
| 35 | + |
| 36 | +**<u>State:</u>** |
| 37 | + |
| 38 | +(!) Waiting for decision. |
| 39 | + |
| 40 | +**<u>Migration task:</u>** |
| 41 | + |
| 42 | +*Write down detailed description of all mandatory and optional migration tasks.* |
| 43 | + |
| 44 | +### Task 3: The old Job types |
| 45 | + |
| 46 | +**<u>Nature:</u>** |
| 47 | + |
| 48 | +There are old job types (`Service`, `Pickup`, `Delivery` and `Shipment`) with deprecated methods. With the new `CustomJob` and the special functions (`addService`, `addPickup`, etc.) of its builder, these old job types are redundant and they are only special cases for the more general `CustomJob`. However, they are the central building classes for Jsprit, so keeping and supporting them in some way is vital for backward compatibility. |
| 49 | + |
| 50 | +**<u>Decision:</u>** |
| 51 | + |
| 52 | +There are several ways to overcome on this compatibility conflict: |
| 53 | + |
| 54 | +1. Remove these classes and guide the users to migrate to the methods in `CustomJob.Builder`. |
| 55 | +2. There are already implementations for these classes in new version, but they are not compatible with the old once. Help the users to migrate to these classes. |
| 56 | +3. Create façade classes. These classes offer the same interface as the old ones, but extends `CustomJob` and delegates the calls to the new structure. |
| 57 | + |
| 58 | +The first lefts the least of the garbage in the code base, but seems to be too drastic and puts too much migration work on the old users. The second is the way how now the new version works, so here mostly documentation tasks are necessary. The third one would provide an *almost* 100% compatibility, but for a cost of one more redirection, which may have (although possibly minor) performance impact on Jsprit. The *almost* is there, because there may be a few method name collisions where both `CustomJob` and the old classes have the same method, but with different behavior. |
| 59 | + |
| 60 | +My proposal is the 3rd one. |
| 61 | + |
| 62 | +**<u>State:</u>** |
| 63 | + |
| 64 | +(!) Waiting for decision. |
| 65 | + |
| 66 | +**<u>Migration task:</u>** |
| 67 | + |
| 68 | +*Write down detailed description of all mandatory and optional migration tasks.* |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +---- |
| 75 | + |
| 76 | +### Task X: |
| 77 | + |
| 78 | +**<u>Nature:</u>** |
| 79 | + |
| 80 | +*Write down the nature of the change and how it affects the compatibility.* |
| 81 | + |
| 82 | +**<u>Decision:</u>** |
| 83 | + |
| 84 | +*Write down how we plan to solve the conflict.* |
| 85 | + |
| 86 | +**<u>State:</u>** |
| 87 | + |
| 88 | +*Write down the state of the task.* |
| 89 | + |
| 90 | +**<u>Migration task:</u>** |
| 91 | + |
| 92 | +*Write down detailed description of all mandatory and optional migration tasks.* |
0 commit comments