x/sys/windows: mkwinsyscall isn't diagnosable if format.Source
fails
#57925
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
OS-Windows
Milestone
I'm working on the
x/sys/windows
main branch (6e4d1c53), and tried to add a new syscall, butmkwinsyscall
failed because of a Go syntax error in the generated code:However, there is no file with a line 44, so I can't see what it's referring to, or the additional errors.
format.Source(buf.Bytes())
fails, and the generated source is only in memory at that point, so it is lost.Expected result
When
mkwinsyscall
hits a formatting error, it should write the pre-formatted source to a temporary file so the error can be diagnosed.Background
The error I hit in this case was a
-
in the DLL name, and fixing that is tracked over here:-
and.
in DLL name #57913The text was updated successfully, but these errors were encountered: