therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.44k stars 744 forks source link

VSCode with go plugin keeps spawning cc1 processes on save #1136

Open elegos opened 4 years ago

elegos commented 4 years ago

Hello!

I'm approaching QT for the first time and, loving go, I decided to give it a shot.

I'm developing using Visual Studio Code with the go (Google Team's) plugin. Every time I save a go file though, when I import any qt related module (i.e. github.com/therecipe/qt/widgets), vscode spawns a couple of cc1 processes, like the following:

/usr/libexec/gcc/x86_64-redhat-linux/10/cc1 -quiet -I /tmp/go-build980669195/b035/ -I . /tmp/cgo-gcc-input-667081120.c -quiet -dumpbase cgo-gcc-input-667081120.c -m64 -mtune=generic -march=x86-64 -auxbase-strip /tmp/go-build980669195/b035//_cgo_.o -gdwarf-2 -O0 -Wno-error -w -o /tmp/ccLWQt8b.s

This process hangs the save process, making the development a pain in the editor. Is this a known issue? As far as I understand the go plugin is trying to compile the C++ sources for linter purposes or similar.

Thank you very much!

futurepaycc commented 4 years ago

some thing like u: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/cc1 -quiet -I /tmp/go-build034904482/b178/ -I . -D _REENTRANT -D QT_NO_DEBUG -D QT_SVG_LIB -D QT_MULTIMEDIAWIDGETS_LIB -D QT_DESIGNER_LIB -D QT_UIPLUGIN_LIB -D QT_QUICKWIDGETS_LIB -D QT_WIDGETS_LIB -D QT_MULTIMEDIA_LIB -D QT_QUICK_LIB -D QT_GUI_LIB -D QT_QML_LIB -D QT_REMOTEOBJECTS_LIB -D QT_NETWORK_LIB -D QT_DBUS_LIB -D QT_XML_LIB -D QT_SCRIPT_LIB -D QT_CORE_LIB /tmp/cgo-gcc-input-758772331.c -quiet -dumpbase cgo-gcc-input-758772331.c -m64 -mtune=generic -march=x86-64 -auxbase-strip /tmp/go-build034904482/b178//_cgo_.o -gdwarf-2 -O0 -Wno-error -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-return-type -w -fPIC -o - /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/cc1 -quiet -I /tmp/go-build034904482/b182/ -I . -D _REENTRANT -D QT_NO_DEBUG -D QT_MULTIMEDIAWIDGETS_LIB -D QT_DESIGNER_LIB -D QT_UIPLUGIN_LIB -D QT_QUICKWIDGETS_LIB -D QT_WIDGETS_LIB -D QT_MULTIMEDIA_LIB -D QT_QUICK_LIB -D QT_GUI_LIB -D QT_QML_LIB -D QT_REMOTEOBJECTS_LIB -D QT_NETWORK_LIB -D QT_DBUS_LIB -D QT_XML_LIB -D QT_SCRIPT_LIB -D QT_CORE_LIB /tmp/cgo-gcc-input-995237228.c -quiet -dumpbase cgo-gcc-input-995237228.c -m64 -mtune=generic -march=x86-64 -auxbase-strip /tmp/go-build034904482/b182//_cgo_.o -gdwarf-2 -O0 -Wno-error -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-return-type -w -fPIC -o -

any idea?