Nim
                                
                                 Nim copied to clipboard
                                
                                    Nim copied to clipboard
                            
                            
                            
                        fixes #20149; fixes #16762; hintAsError and warningAsError now ignore foreign packages
fixes #20149 fixes #16762
note to future lookup: pre-existing but hintAsError/warningAsError seems not to give a correct exit code which makes testament stop to work.
In terms of feedback: I just built this branch with koch and used it to compile my project (which is the reason I opened #20149). It works exactly correct!
When on the branch and compiling with
./koch temp c -d:ssl --hintAsError:XDeclaredButNotUsed --warningAsError:UnusedImport ../nimstoryfont/src/nimstoryfont.nim
or
./koch temp c -d:ssl "--hintAsError[XDeclaredButNotUsed]:on" "--warningAsError[UnusedImport]:on" ../nimstoryfont/src/nimstoryfont.nim
It no longer throws a compiler error in the system.nim or fatal.nim modules, which it previously did!
Unrelated CI failure, ggplot breaks for a short while.
Given that it's running through and looking good, is this PR just waiting for somebody else to look over it?
Yeah, it is ready for review. Feel free to review. Remember to approve my PR if you think it is fine.

Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from 641381e3d47afba95f99efc77bb9a5ed65d07b3a
Hint: mm: orc; threads: on; opt: speed; options: -d:release 163662 lines; 12.332s; 841.645MiB peakmem