Vale
Vale copied to clipboard
Error on build: Assertion failed!
When building the following code on Windows:
exported func main() {
}
Produces this error:
Running:
c:\cmd\vale\midas.exe --verify --output_dir build build\vast\mypackagename.vast build\vast\stdlib.vast build\vast\__vale.vast
Region override: assist
Warning: not using census when in assist mode!
Assertion failed!
I did some testing:
- Removed everything from stdlib except
cast.vale,print.valeandstr.vale. - Removed all
vassertcalls since it is not available (it's inpanic.vale)
It still produces the same error. So the Assertion failed! seems to come from Midas.
I searched the generated Build folder for Assertion failed!, and found nothing.
This happens when we don't run it in the x86_x64 Cross Tools Command Prompt for VS 2019 shell... which shouldn't be necessary. I suspect this broke when we removed the old valec.py, which (IIRC) set up a session that mimicked the cross tools command prompt.
Until I fix this, temporary workaround is to run in a x86_x64 Cross Tools Command Prompt for VS 2019 shell.