DisposaBoy/GoSublime — Issue #33: GsFmt says source has errors
Author: Kalthorn
Created: 2012-02-13 07:22:54+00:00
State: open

I recently switched my Go development to Windows and updated from a weekly from December to the latest, specifically gomingw 2012-02-07.

I really like the application go gofmt on my source when I save the file. However, I'm seeing an error in the bottom pane:

** GsFmt: File C:\Development\hello.go contains errors **

The source file contains no errors. I used the Hello World example to test this and I can compile cleanly with 6g/6l.

Looking in the python for GoSublime, it looks like gofmt.exe is being called with '-d' option. When I attempt to call gofmt on the same source code with -d, I am told that diff.exe is not in my path.

So anyway, I solved the problem by copying diff (and the necessary DLL) from my Git install to somewhere in my path. I suppose my only issues to report are 1) Git isn't a requirement for installing GoSublime and the installer for Windows doesn't recommend putting the Unix tools like diff into your Path, and 2) GsFmt's error message is misleading.

Anyway, problem solved, just wanted to let you know. Thanks so much for the great package!