Adrian Crum wrote: > Adam Heath wrote: >> Adrian Crum wrote: >>> David and I are in agreement on the end result, and this point is where >>> we disagree. Like you, David wants all changes to be made in the branch. >>> I don't think a branch is needed. The interface extractions can be done >>> a little at a time in the trunk. >>> >>> A branch with the kind of extensive changes that are planned will open >>> up a HUGE can of worms when it is merged with the trunk. Consider that >>> this one interface extraction resulted in three bug reports - what would >>> happen if we introduced dozens of interface extractions in a single >>> commit? >> >> I agree with you as well, this does *not* need to be done in a >> separate branch. >> >> However, what you did by doing the last step first, in trunk, is the >> wrong approach. >> >> * Adding a new interface to some base component does not break >> unreleated code(short amount of time). >> * Implementing said interface by an existing object does not break >> unreleated code(short amount of time). >> * Modifying other code to use the interface does not break unrelated >> code(takes a long time to do, and can be done incrementally by many >> people). >> * When other code no longer references concrete class, then >> remove/rename it(breaks unreleated code, but that needs to be >> announced, not just discussed). >> >> This set of changes does *not* need to be done in a hole; it can be >> done incrementally. > > I was thinking of the hundreds of OFBiz users who will have to rewrite > add-ons/modifications if it was done that way. I was trying to keep > things reasonably backwards-compatible.
Not possible. You removed GenericDelegator.getGenericDelegator, so the external code wouldn't compile anyways. However, if there was a central factory, that used the ServiceRegistry pattern, and framework/entity implemented that, getGenericDelegator then called the ServiceRegistry implementation, logging a warning(from perspective of caller) while doing so, and the base factory then loaded the delegator thru ServiceRegistry, then existing code will still work, you'd get a logged warning, and you'd support the new design. Again, all without needing to do it in a branch. And, as a bonus, the entire community can accept patches for getting rid of GenericDelegator.getGenericDelegator.