Right now Linas has alpha/beta versions doing transaction logs and
saving backup files in case of corruption.  This is a great idea, but
if someone has the time, I thought of some fairly straightforward
improvements brought on by the recent file-save problems.

I'd like to see the program have a run-time variable or function call
on both the guile and C sides that indicates whether or not you're
running an alpha/beta version.  That flag would then be used to know
when to do sanity checking.  Perhaps all of this should just be
controlled by NANA's conditionals?

Regardless of how it happens, one of the tests I'd like to see is on
every file open, I'd like to see the program immediately save the file
back to disk into a temp file and then re-load it and compare the two
account-groups to make sure they're identical.  This would make it
fairly difficult to miss some of the more glaring file io code bugs.

This should be a pretty easy thing for someone to do if they use my
preliminary guile text-export mechanism as an example.  Internally, it
traverses an entire account group, dumping a scheme form for each
transaction.

For the most naive checker, you could use that function as a guide to
create a new function that traverses both account groups, aborting
whenever it detects an inconsistency, or returning #t if they're the
same.  Since there's not much allocation involved, this could also be
done without too much effort from C.

Anyone interested?  I'd be happy to help by explaining text-export.scm
or helping with any questions about your scheme/C solution.

-- 
Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body

Reply via email to