derision-test / go-mockgen

MIT License
58 stars 8 forks source link

support gcexportdata export files for loading packages instead of `golang.org/x/tools/go/packages.Load` #50

Open Strum355 opened 9 months ago

Strum355 commented 9 months ago

Adds support for recreating packages.Package and packages.TypeInfo data from gcexportdata, which is data about the public API of a compiled package (what types does it export, what packages are indirectly exposed by it etc).

Both the gcexportdata for the sum of the transitive closures of package dependenices we are generating mocks from , as well as the source files of the packages of which we are generating mocks from are required as new inputs.

This is as an alternative to packages.Load, which is not available (or cheaply available) in certain environments (this in particular was spurred by a Bazel environment, but the idea likely extends to others like Buck{,2}).

sonarcloud[bot] commented 9 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud