Skip to content

fix: preserve cgo constructors during cached package loading - #31

Merged
cmilesio merged 10 commits into
mainfrom
fix/cgo-loader-fallback-20261021
Oct 21, 2026
Merged

cmilesio merged 10 commits into
mainfrom
fix/cgo-loader-fallback-20261021

Conversation

@cmilesio

@cmilesio cmilesio commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Wire could report a missing provider in projects that use cgo, even when the constructor was right there in the source.

The fix makes sure Wire finds those constructors and uses the standard Go package loader when needed. It also refreshes older discovery caches so stale results cannot keep the error around.

Existing projects keep the same public API, generated wiring behavior, and minimum Go version. Regression tests cover fresh and cached discovery, including changes to cgo imports. All 23 checks pass, including Linux, macOS, and Windows in both cache modes.

@cmilesio
cmilesio merged commit 0cfa4a8 into main Oct 21, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant