Closed yuxiaomao closed 2 months ago
Other than disabling diagnostics, probably no way atm since the warning comes from generator so won't happen in diagnostics :/
Thanks for pointing out the diagnostics feature! I did not know it before. My PR is only a tool for upgrading new haxe version, disable temporary diagnostics is totally acceptable. So for now I have this:
"haxe.enableDiagnostics": false
in settings.json
-D hl_w_null_compare
in build.hxml
I'll check with the dev team to see if this fit theirs need
No one says no, so I'll merge it!
Not sure we'll want to keep it as is for long, since warnings in generators should be avoided as much as possible :/
I think it's an interesting tools for other hl project pass to haxe 5.0 - It can be a warning before generator but I don't think other target are concerned in this specific case? Note: This commit can be revert safely.
I'm trying to add a new flag
-D hl_w_null_compare
which will gives a warning where we have done null comparison instead of implicitly convert to 0. It can help existing hl code check theirs comparison before moving to the newer version. Related commits:This code works correctly during the build, however, when running inside VSCode and open the file from the "PROBLEMS" section after build, the warning disappear after a small delay (probably some rebuild on the specific file happens). It does not impact all files, at least not std files. @kLabz du you have any idea on how to prevent the warning been removed?