This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: bug in modules?
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.
On the other hand, an indication where the list started that is being
read would be a good thing...
> > 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,
reloading a module when it has changed on disk could be useful,
regardless of whether it had an error the previous time.