Noticed an error like this after running truss with a flattened service
path.
truss --svcout . service.proto
FATA[0000] cannot parse input: cannot read previously generated files: cannot fully walk directory /home/zaq/projects/go-mod/src/github.com/<redacted>: cannot read file: /home/zaq/projects/go-mod/src/github.com/<redacted>/.git/refs/remotes/origin/<redacted>: open /home/zaq/projects/go-mod/src/github.com/<redacted>/.git/refs/remotes/origin/<some_branch>: too many open files
NOTE: was using default nofiles limit on linux
$ ulimit -Sn
1024
When using --svcout ., cmd, svc, and handlers folder will
be created in the current directory. Which is really nice if you want a
flatter service structure. However, this has the unintented consequence
of opening significantly more files when truss is building context on
it's previous generation. This change cuts down the files read to only
those in the handlers dir as these are the only files whose previous
generation is leveraged
Noticed an error like this after running truss with a flattened service path.
NOTE: was using default nofiles limit on linux
When using
--svcout .
,cmd
,svc
, andhandlers
folder will be created in the current directory. Which is really nice if you want a flatter service structure. However, this has the unintented consequence of opening significantly more files when truss is building context on it's previous generation. This change cuts down the files read to only those in the handlers dir as these are the only files whose previous generation is leveragedRef:
gengokit/generator/gen.go:generateResponseFile