Good news! The google/wire project has been unarchived and is now receiving updates again."
Bad news: On August 25, 2025, google/wire was archived again.
wireinject/wire is a community project dedicated to maintaining a runnable version of google/wire.
The original google/wire repository has been archived by Google and is no longer maintained. This has led to a critical issue:
With upcoming Go releases (such as Go 1.25), attempting to install wire via go install fails due to an outdated dependency on golang.org/x/tools. The build fails with the following compile error:
# golang.org/x/tools/internal/tokeninternal
.../go/pkg/mod/golang.org/x/tools@v0.17.0/internal/tokeninternal/tokeninternal.go:78:9: invalid array length -delta * delta (constant -256 of type int64)
This issue breaks CI/CD pipelines for any project that relies on wire for code generation once they upgrade their Go toolchain. To solve this problem, we created wireinject/wire.
The objective of wireinject/wire is very specific and limited:
- We do not aim to add any new features.
- Our sole purpose is to update dependencies with the minimum necessary changes to the
google/wiresource code, ensuring that it compiles and runs correctly on modern Go toolchains.
We are committed to making this fork a stable and reliable drop-in replacement, allowing the community to continue using the wire tool seamlessly.
Migrating from the original google/wire is straightforward, and no changes to your project's code are required.
You simply need to replace the wire binary on your system with the version compiled from wireinject/wire.
Run the following command to install the patched wire tool:
go install github.com/wireinject/wire/cmd/wire@latest
After installation, ensure that the wire command in your $PATH points to the newly installed executable. You can verify this using the which wire command.
The wire_gen.go file produced by wireinject/wire is identical to the file generated by the original google/wire. Your existing workflows will not be affected in any way.