[m-rev.] diff: fix .module_dep files

Paul Bone pbone at csse.unimelb.edu.au
Wed Jul 23 11:42:56 AEST 2008


On Wed, Jul 23, 2008 at 11:31:48AM +1000, Zoltan Somogyi wrote:
> On 22-Jul-2008, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> > I have done this for the new feedback system that hasn't been committed
> > yet.  It's not such a big problem because the only types that can affect
> > the file format are either in mdbcomp/feedback.m or
> > mdbcomp/program_representation.m
> 
> No, that is not the right fix. The right fix is what Peter did; adding
> a predicate with two modes to do the conversion between the internal form
> (the function symbol) and the external form (the string).
> 
> > I will put a comment in program_representation.m to instruct a programer
> > that when modifing these types they should increment the version number
> > in feedback.m.
> 
> It takes less effort to add and use the conversion predicate than to
> write that comment.
> 

I've looked closer at the problem and Peters fix and I beleive I
now understand.

Because io.read wasn't used for parsing the parsing code wasn't updated
when the name of the function symbol changed.  This ment that the
parsing code couldn't parse the .module_dep file produced by the writing
code in the same version of the compiler.  Peter's solution keeps the
old file format with the new internal function symbol names.

So for the Feedback file format I imagine using io.write and io.read is
okay until a type changes.  In this event we may decide to keep the old
file format with the new internal types or not.  And because users are
likely to be using matching versions of the tools and compiler backwards
compatibility of the file format is not very important.  So I have not
addressed any of these problems in the feedback file format, except that
the header contains a version number for the file format.

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20080723/684d4a84/attachment.sig>


More information about the reviews mailing list