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

Paul Bone pbone at csse.unimelb.edu.au
Tue Jul 22 19:50:47 AEST 2008


On Tue, Jul 22, 2008 at 05:58:34PM +1000, Zoltan Somogyi wrote:
> On 22-Jul-2008, Peter Wang <novalazy at gmail.com> wrote:
> > The recent renaming of the constructor `no_foreign_export' to
> > `contains_no_foreign_export' broke `.module_dep' files.  The offending field
> > was written out directly with `io.write', so the renaming changed the file
> > format, but the parser still expected the old spelling "no_foreign_export".
> > 
> > `mmc --make' would then try to remake all the `.module_dep' files it
> > couldn't parse, including modules whose source files we don't have at hand.
> > 
> > compiler/make.module_dep_file.m:
> > 	Fix the bug.
> > 
> > 	Try to avoid a similar bug in another field.
> 
> That looks great; thanks Peter. However, "grep -w io.write make*.m" gives
> five matches even after applying this diff. Will you please fix those as well?
> And does anyone else know of any other cases where the compiler is depending
> in the exact spelling of a function symbol to define part of a file format?
> 

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

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.


-------------- 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/20080722/875bee70/attachment.sig>


More information about the reviews mailing list