what if module-info missing?
Mark Reinhold
mr at sun.com
Tue Dec 15 15:30:40 PST 2009
> Date: Thu, 10 Dec 2009 16:48:26 -0800
> From: jonathan.gibbons at sun.com
> What is the desired behavior if module-info is missing in a place where it
> might reasonably be expected to exist?
>
> ...
>
> Ignoring stuff which might be an error is generally bad, so that rules out (a)
> and to some extent, (d) as well. Inferring the contents is little better that
> guessing, so that rules out (b), leaving (c) give a warning and (e) give an
> error.
>
> I propose that both of them may be appropriate, depending on the circumstances.
>
> When we are scanning the module path or source path to see what modules are
> available, if we come across a directory without a module-info, it is arguably
> sufficient to give a warning and keep on going. To give an error at that point
> will prevent any further progress in the compilation. (Note that we are dealing
> with paths here, so when talking about a directory without module-info, that
> really means no module-info in any directory of the same name on the path.)
>
> However, if we are examining files on the command line in multi-module mode, we
> *need* a module-info to determine the module for the compilation unit on the
> command line. If the module-info is missing in this case, we cannot determine
> the set of classes visible to that compilation unit, so in this case an error
> is definitely in order.
>
> Comments?
That sounds like the right approach.
- Mark
More information about the jigsaw-dev
mailing list