-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Closed
Copy link
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcarea:rewriting toolbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancementstat:needs infostat:needs minimizationNeeds a self contained minimizationNeeds a self contained minimization
Description
Compiler version
3.4.0
Minimized example
A code example is not highly relevant to this issue, but you can find one here:
- https://github.com/reid-spencer/scala-3.4-19872
This has to do with using fastparse 3.0.2 with scalac 3.4.0. The message produced only occurs in 3.4.0 and does not occur in 3.3.1 or 3.3.3
Output Error/Warning message
[error] 60 | parseRule[Root](input, root(_), withVerboseFailures) {
[error] | ^^^^
[error] | Context bounds will map to context parameters.
[error] | A `using` clause is needed to pass explicit arguments to them.
[error] | This code can be rewritten automatically under -rewrite -source 3.4-migration.
>print scalacOptions
* -deprecation
* -feature
* -new-syntax
* -explain-types
* -Werror
* -pagewidth:120
* -rewrite
* -source
* 3.4-migration
* -explainWhy this Error/Warning was not helpful
The direction to use the -rewrite -source 3.4-migration option isn't applicable or helpful. As you can
see, both these options were provided to the compiler. It rewrote nothing. Furthermore, it is not clear
where this using clause should be placed.
Suggested improvements
A few ideas:
- Drop the last line of the message since no attempt to rewrite the code is ever made.
- If rewriting is an option, place the rewritten code in the error message
- If rewriting is not an option, provide instructions on where/how to make the needed modifications
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcarea:rewriting toolbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancementstat:needs infostat:needs minimizationNeeds a self contained minimizationNeeds a self contained minimization