Open fe3dback opened 2 years ago
Because of this x package requirement, release image increased:
Also build/stdextractor not needed anymore, because packages.Load used anyway for parsing AST.
previosly we use it to bake std imports inside binary, without parsing it in runtime
I haven't really dug deep into go-arch-lint's source code, but it seems to me, that linting dependencies could be done solely by parsing import
statements in a package, which in itself is a rather trivial thing to do. Perhaps, we could replace packages
with custom written parser specifically for import sections?
For linting imports, we don't have to use 'packages' at all, that's how it been before in old versions.
But linter with the deepScan
flag enabled, reads all GO code, not just imports.
This required to check for dependency injection, function calls, etc.
For parsing AST, we use lib called "packages", is go stdlib from x Currently this lib requre all go installation in host, so it platform dependant thing. And most horrible, we need to include all GO setup inside docker release images.
In this ticket, we need at least remove all not needed files from go18-buster image and reduce linter size and at most, replace packages.Load for something else.
read more: