bind_linux_amd64.go very large make vscode slow
nnttoo opened this issue · comments
as in the instructions, I deleted bind.go and built it successfully.
after build will generate bind_linux_amd64.go has a very large size (300mb) this makes vscode slow, I tried exclude bind_linux_amd64.go from vscode, but this makes vscode give a warning that AssetDir is undefined.
can I not need to delete bind.go before build
and put bind_linux_amd64.go in another folder after build?
When building the project I would do the following:
- Create a temporary directory
- Copy all project files in the temporary directory
- Remove
bind.go
from the temporary directory - Run the
go build
command in the temporary directory
That way your IDE still detect bind.go
functions and you don't have bind_linux_amd64.go
that messes it up.
Does that make sense?
thank you for the instructions
I made a script like this,
I rename files bind.go and bind_linux_amd64.go instead of moving everything to another folder
if bind_linux_amd64.go file exists, i use go build instead of astilectron-bundler -v because it's faster,
do i do the right thing?
#!/bin/sh
mv bind.go bind.txt
if [ -e bind_linux_amd64.txt ]
then
mv bind_linux_amd64.txt bind_linux_amd64.go
go build -o "./output/Astilectrondemo"
echo "file ada build pake go build"
else
astilectron-bundler -v
echo "file gak ada build pake astilectron-bundler"
fi
mv bind_linux_amd64.go bind_linux_amd64.txt
mv bind.txt bind.go
Mmm I would simplify to:
#!/bin/sh
mv bind.go bind.txt
astilectron-bundler -v
rm bind_linux_amd64.go
mv bind.txt bind.go
since go build
doesn't do all astilectron-bundler
does
Thank you very much