- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 354
 
          tests: use __empty and __raw
          #3865
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 
           A lot of failures. Looks like  There also seems to be a lot of settings options that don't expect raw Lua. Is this intended? Shouldn't we allow any value to be replaced with raw Lua?  | 
    
373398c    to
    5a4effd      
    Compare
  
    
          
 This is a known issue. Essentially, rawLua support in custom/bespoke options needs to be added manually. It's quite easy to miss some permutations, especially in composite types where you may have (e.g.) "null, or raw lua, or list of (raw lua or something)". So yes, there are a bunch of options/types that should allow raw lua but don't. Updating the tests is a good way to catch many of these, but I don't feel like it should be this PR's responsibility to fix the issues it unearths.  | 
    
          
 What should I do then?  | 
    
| 
           The minimum would be to flag all problematic options with   | 
    
          
 Ok. I'll mark the difficult to solve ones with  I'm not sure what to do about options that coerce strings to raw Lua. I can't provide a raw value for those because it tries to coerce it. I can't fix it because there is no way to deprecate these without breaking configs. I can just write   | 
    
f2223ef    to
    56ce248      
    Compare
  
    
          
 We're well overdue deprecating that behaviour properly, in the various types and option-factories that implement the coercion. We can probably just do it by adding  Another thing I've been meaning to do for a long time, but haven't gotten around to yet. 
 That is acceptable for the purposes of this PR. Deprecating this coercion is a massive can-of-worms on its own!  | 
    
5569a50    to
    b6aea3e      
    Compare
  
    | 
           sooo many failures D:  | 
    
| 
           Finally green! Let me just clean up these commits...  | 
    
Signed-off-by: saygo-png <saygo.mail@proton.me>
Signed-off-by: saygo-png <saygo.mail@proton.me>
Signed-off-by: saygo-png <saygo.mail@proton.me>
Signed-off-by: saygo-png <saygo.mail@proton.me>
Signed-off-by: saygo-png <saygo.mail@proton.me>
Signed-off-by: saygo-png <saygo.mail@proton.me>
Signed-off-by: saygo-png <saygo.mail@proton.me>
Signed-off-by: saygo-png <saygo.mail@proton.me>
This is an automated change using a linter I wrote. I glanced at every change and git added it one by one but I might have missed some things.
It checks for cases:
This check is performed in any attribute set bound to a key "settings". So there were a couple of false positives in options where
settingswas not the kind that gets converted to Lua.If I missed some case i can write a rule for it and reapply.