Can a standard compiler plugin add a main entry point? #20552
              
                Unanswered
              
          
                  
                    
                      soronpo
                    
                  
                
                  asked this question in
                Compiler internals Q&A
              
            Replies: 2 comments 6 replies
-
| Ok, point 1 is working. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| I can't get 2 to work. Is creating a companion object allowed in a standard compiler plugin? | 
Beta Was this translation helpful? Give feedback.
                  
                    6 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.
-
I'm fiddling with a compiler plugin that adds a main entry point for companion objects of classes annotated with a certain annotation.
Since I'm running into trouble, it's not clear if this is even possible to do with a standard plugin, so I'll be happy to even just get a clarification it's possible. Specifically:
def main(args: Array[String]): Unitmethod to its body should be recognized.ModuleDef) with adef main(args: Array[String]): Unitas its body for it to be recognized during runtime.Beta Was this translation helpful? Give feedback.
All reactions