Compile plugin loadPlugins cannot get options #17238
              
                
                  
                  
                    Answered
                  
                  by
                    ckipp01
                  
              
          
                  
                    
                      jxnu-liguobin
                    
                  
                
                  asked this question in
                Compiler internals Q&A
              
            -
| 
        
 error My config:  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            ckipp01
          
      
      
        May 9, 2023 
      
    
    Replies: 1 comment 1 reply
-
| 
         work but compiler comment is   def addPluginPhases(plan: List[List[Phase]])(using Context): List[List[Phase]] = {
    // plugin-specific options.
    // The user writes `-P:plugname:opt1,opt2`, but the plugin sees `List(opt1, opt2)`.
    def options(plugin: Plugin): List[String] = {
      def namec = plugin.name + ":"
      ctx.settings.pluginOptions.value filter (_ startsWith namec) map (_ stripPrefix namec)
    }😅  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Hey @jxnu-liguobin, thanks for reporting this and sorry this has sat here for such a long time. This does indeed seem to be a mismatch between what the comment says and what we have in the code. I've created #17448 to either address this or get some clarity.