frugal icon indicating copy to clipboard operation
frugal copied to clipboard

Don't require the frugal library to be cloned to generate go code

Open brianshannan-wf opened this issue 6 years ago • 1 comments

"Generated go files do not include the import "github.com/Workiva/frugal/lib/go" declaration unless you have a GOPATH setup with that lib, which should not be necessary for just the binary to run. Steps to reproduce:

$ unset GOPATH
$ frugal --version # Just for the record here
frugal version 2.2.1
$ frugal --gen go example.frugal
$ cat gen-go/example/f_fooservice_service.go

and notice that f_fooservice_service.go is not a valid go file because it doesn't have import "github.com/Workiva/frugal/lib/go"."

This is because we run goimports on the generated output currently

brianshannan-wf avatar Sep 19 '17 19:09 brianshannan-wf

After some investigation, this is used due to https://github.com/Workiva/frugal/issues/100, so just removing goimports isn't a valid solution, we need to make sure all imports from other generated includes are used

brianshannan-wf avatar Apr 04 '18 16:04 brianshannan-wf