This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug in modules?


On Mon, Aug 07, 2000 at 09:13:31PM +0200, Marius Vollmer wrote:
> Ivan Toshkov <ivant@ifao.net> writes:
> 
> > > > guile> (use-modules (test))
> > > > ERROR: In procedure list:
> > > > ERROR: end of file in
> > > 
> > > I think the most useful thing to add here is the name of the file that
> > > has the premature end.  This name might not be apparent when loading
> > > modules.  I have done this.
> > > 
> > 
> > I think that it will be useful to know the procedure name, too.
> 
> Which procedure, `list' or `some-buggy-proc'?  `some-buggy-proc'
> should be easy to find for the user, using a good editor.

I was talking about `some-buggy-proc'.  I don't think I understand the
error message correctly!  Does it says that the error is in procedure
`list', or in the list of procedures, which is missing?

> 
> On the other hand, an indication where the list started that is being
> read would be a good thing...

Yes.

> 
> > > It is a consequence of how the module system works that you do not
> > > receive a second error message here.  The module is already loaded
> > > (although not completely) and it will not be loaded again when you
> > > request it another time.
> > 
> > Hmm, that sounds like a bug to me.  Wouldn't it be better if the
> > module is considered loaded only if there were no errors during load?
> >
> > > 
> > > One error message should be enough, I think.
> > 
> > Not in this case, because it's ambiguous.  For example, if one changed
> > the module code before attempting to load it the second time, he (read
> > I) will think that it's loaded correctly.
> 
> There are two things here: throwing errors and reloading changed
> files.  I think that throwing an error each time a module is used that
> had an error while loading is not useful.  On the other hand,

Perhaps, it's a matter of taste.

> reloading a module when it has changed on disk could be useful,
> regardless of whether it had an error the previous time.

It is!  Especially when one developes the module.  But I haven't asked
for it because I thought it would be too hard to change in the current
module system.

-- 
Ivan Toshkov

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]