golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.26k stars 608 forks source link

Add archive mode #633

Open dr-dime opened 2 years ago

dr-dime commented 2 years ago

This CL adds archive mode, which takes advantage of go/gcexportdata and go/types packages to extract typing info from a package archive file.

Given the way go archive is designed, we don't need to worry about transitive dependencies, as it already includes all transitive typing info. And, we don't need to build or run anything, so even if cgo is involved, it will still work.

Fixes #424

linzhp commented 2 years ago

Can you rebase this PR with main to resolve the conflicts and restart the tests?

dr-dime commented 1 year ago

Can you rebase this PR with main to resolve the conflicts and restart the tests?

Done. PTAL.