Use annotation to enable -explain locally, similar to @nowarn("verbose")
              
              #22413
            
            
                  
                    
                      lrytz
                    
                  
                
                  started this conversation in
                Feature Requests
              
            Replies: 2 comments
-
| Alternative, suggested by @dwijnand: make the compiler understand  | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| I needed this feature today. (For a test where I don't want to explain everything, but I want to show certain explanations.) | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Adding an annotation is a lot more convenient than changing the build to add a compiler flag.
Scala 3 supports
@nowarn("verbose")to display applicable message filters ("Matching filters..." section):It would be practical if
-explaincould be enabled in the same way, not only for warnings but also for errors.Reusing
@nowarn("v")would be trivial, but maybe a different annotation is desired?https://github.com/scala/scala3/compare/main...lrytz:scala3:nowarnExplain?expand=1
Beta Was this translation helpful? Give feedback.
All reactions