You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setup a build that causes javac to give a warning on an option setting.
In my case - I was using JDK 19 + Scala + javac option: "-source 17" which gives the following on compilation...
warning: [options] system modules path not set in conjunction with -source 17
Note there is no file or line number in this warning.
problem
The JavaSpecParser can't parse this type of warning and so returns: Unexpected javac output: warning: [options] system modules path not set in conjunction with -source 17
The JavaSpecParser seems to ignore all subsequent errors if there are any.
This makes it quite difficult to work out why my app isn't compiling when I do have errors as Metals doesn't report any errors or highlight any issues with code. The only way I can tell that my app isn't compiling (and why) is to look in the Metals logs.
expectation
Ideally Zinc would interpret these kind of warnings and then go on to report any further warnings/errors.
JavaSpecParser seems to realise when it can't interpret an error. I'm wondering whether it would be better to report an error in this case. Maybe even with something like Zinc cannot interpret following error XXX - raise an issue. Currently, not reporting an error on failed parsing means compilation can fail silently. Or will that cause more problems than it fixes?
The text was updated successfully, but these errors were encountered:
steps
setup a build that causes javac to give a warning on an option setting.
In my case - I was using JDK 19 + Scala + javac option: "-source 17" which gives the following on compilation...
warning: [options] system modules path not set in conjunction with -source 17
Note there is no file or line number in this warning.
problem
The
JavaSpecParser
can't parse this type of warning and so returns:Unexpected javac output: warning: [options] system modules path not set in conjunction with -source 17
The
JavaSpecParser
seems to ignore all subsequent errors if there are any.This makes it quite difficult to work out why my app isn't compiling when I do have errors as Metals doesn't report any errors or highlight any issues with code. The only way I can tell that my app isn't compiling (and why) is to look in the Metals logs.
expectation
Ideally Zinc would interpret these kind of warnings and then go on to report any further warnings/errors.
JavaSpecParser
seems to realise when it can't interpret an error. I'm wondering whether it would be better to report an error in this case. Maybe even with something likeZinc cannot interpret following error XXX - raise an issue
. Currently, not reporting an error on failed parsing means compilation can fail silently. Or will that cause more problems than it fixes?The text was updated successfully, but these errors were encountered: