-
Notifications
You must be signed in to change notification settings - Fork 741
Description
Acknowledgements
- I have searched (https://github.com/aws/aws-sdk/issues?q=is%3Aissue) for past instances of this issue
- I have verified all of my SDK modules are up-to-date (you can perform a bulk update with
go get -u github.com/aws/aws-sdk-go-v2/...)
Describe the bug
The github.com/aws/aws-dax-go-v2@v1.0.2 package has a broken go.mod file that prevents go mod tidy from working correctly.
Problem
The go.mod file in aws-dax-go-v2@v1.0.2 contains placeholder versions with local replace directives:
require (
github.com/google/go-cmp/cmp v0.0.0-00010101000000-000000000000
// ... other placeholder versions
)
replace github.com/google/go-cmp/cmp v0.0.0-00010101000000-000000000000 => ./build/private/bgospace/Go3p-Github-Google-GoCmp/src/github.com/google/go-cmp/cmpWhen Go tries to resolve these dependencies, it attempts to download the invalid version v0.0.0-00010101000000-000000000000, which doesn't exist, causing:
go: github.com/google/go-cmp/cmp@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
go mod tidy should complete successfully without errors. The aws-dax-go-v2 package's go.mod file should contain valid, resolvable dependency versions that work with standard Go tooling, without requiring any workarounds in consuming projects.
Current Behavior
go mod tidy fails with:
go: github.com/google/go-cmp/cmp@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
Reproduction Steps
Steps to Reproduce
- Create a new Go module or use an existing one
- Add
github.com/aws/aws-dax-go-v2 v1.0.2as a dependency - Run
go mod tidy - Observe the error
Minimal reproduction:
go mod init test
go get github.com/aws/aws-dax-go-v2@v1.0.2
go mod tidyPossible Solution
To fix this issue, the go.mod file in aws-dax-go-v2 should be updated to:
-
Remove all placeholder versions - Replace
v0.0.0-00010101000000-000000000000with actual published versions of dependencies. -
Remove local replace directives - All
replacedirectives pointing to./build/private/bgospace/paths should be removed, as these paths don't exist in the published package. -
Use standard dependency versions - Dependencies should reference their actual published versions. For example:
require ( github.com/google/go-cmp v0.7.0 // or appropriate version // ... other dependencies with real versions )
-
Ensure build process excludes internal artifacts - The build/publishing process should ensure that internal build configurations (like
bgospacereferences) are not included in the publishedgo.modfile. -
Publish a new patch version - Release
v1.0.3(or similar) with the correctedgo.modfile so users can upgrade without breaking changes.
Suggested fix for go-cmp dependency:
// Instead of:
require github.com/google/go-cmp/cmp v0.0.0-00010101000000-000000000000
replace github.com/google/go-cmp/cmp v0.0.0-00010101000000-000000000000 => ./build/private/...
// Use:
require github.com/google/go-cmp v0.7.0This same pattern should be applied to all other placeholder dependencies in the go.mod file.
Additional Information/Context
The go.mod file appears to contain internal AWS build artifacts (references to ./build/private/bgospace/) that shouldn't be in the published package. This suggests the package was published with an internal build configuration rather than a public-ready one.
AWS Go SDK V2 Module Versions Used
The following AWS SDK Go v2 modules are used in the project where this issue was encountered:
Direct dependencies:
github.com/aws/aws-dax-go-v2@v1.0.2(the problematic package)github.com/aws/aws-sdk-go-v2@v1.41.0github.com/aws/aws-sdk-go-v2/config@v1.32.4github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue@v1.20.28github.com/aws/aws-sdk-go-v2/service/dynamodb@v1.53.4github.com/aws/aws-sdk-go-v2/service/s3@v1.93.1github.com/aws/smithy-go@v1.24.0
Indirect dependencies (transitive):
github.com/aws/aws-sdk-go-v2/credentials@v1.19.4github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression@v1.8.25github.com/aws/aws-sdk-go-v2/service/dynamodbstreams@v1.32.8github.com/aws/aws-sdk-go-v2/service/sso@v1.30.7github.com/aws/aws-sdk-go-v2/service/ssooidc@v1.35.12github.com/aws/aws-sdk-go-v2/service/sts@v1.41.4- And other internal SDK modules
Note: The issue specifically affects aws-dax-go-v2@v1.0.2, but the broken go.mod file impacts all projects that depend on it, regardless of which other AWS SDK modules are used.
Compiler and Version used
go version go1.25.3 darwin/arm64
Operating System and version
Apple M1 Pro