[Box Backup-dev] changeset [819]

Martin Ebourne boxbackup-dev at fluffy.co.uk
Thu Aug 31 10:24:59 BST 2006


Chris Wilson <chris at qwirx.com> wrote:
> On Windows, we cannot reuse the same recombinetemp file, because we
> still have it open so we can't delete the old one, so we can't create a
> new one with the same name. Therefore, I added a unique part to the end
> of the filename (p). This would probably also work on other platforms,
> so I can remove the conditionality if you prefer.

Yes, I would prefer please.

 From my point of view there is a simply scary amount of conditional =20
compilation for the windows port. The problem with conditional =20
compilation is that it makes development much harder on every platform =20
and makes it highly likely that breakages are going to occur. This is =20
because (i) large conditional compilations are difficult to read (ii) =20
it is not possible to compile all the code on any platform. Thus as =20
one platform makes changes the other(s) will break from time to time. =20
It similarly makes testing harder. And some changes (such as changing =20
the signature for a method say) where you could rely on the compiler =20
to make sure you did the complete change will now need manual auditing =20
instead.

Having said that the priority at the moment is to get a working =20
windows port merged so I'm ignoring this for now. But we should avoid =20
unnecessary conditional compilation where we can and in the future =20
we'll need to go back over all of this lot and rearchitect to reduce =20
the conditional compilation down to a minimum. Many of these could be =20
solved by better division of responsibility and encapsulation in the =20
code.

Cheers,

Martin.



More information about the Boxbackup-dev mailing list