-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go mod tidy can cause ambiguous import error #926
Comments
This is changing upstream, and will hopefully avoid these issues in the future: open-telemetry/opentelemetry-collector#4810. |
Will this alleviate the issue downstream also or will we have to follow suit and implement |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been marked as stall for 30 days with no activity. |
Have the same issue while trying to build own collector following this instruction: https://opentelemetry.io/docs/collector/custom-collector/ |
I'm also facing the same issue. does someone know how to resolve this ?
|
@manjunath-batakurki have you found any solution? I just experienced this myself. |
I deleted this |
I encountered the same problem. cloud.google.com/go/compute/metadata: ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules:
cloud.google.com/go v0.97.0 (C:\Users\xxx\go\pkg\mod\cloud.google.com\go@v0.97.0\compute\metadata)
cloud.google.com/go/compute v1.7.0 (C:\Users\xxx\go\pkg\mod\cloud.google.com\go\compute@v1.7.0\metadata)
|
Thank you so much for explaining the problem, i hope this would work run |
Just so that no one has to sort through the PR. This replace statement was added to the offending
|
@bryan-aguilar thank you! this fixed the error for me |
…ckage cloud.google.com/go/compute/metadata in multiple modules: by running go clean -modcache go mod tidy -compat=1.18 (see aws-observability/aws-otel-collector#926 (comment))
…le.com/go v0.100.2` (more) See: aws-observability/aws-otel-collector#926 (comment)
This helped for me: https://stackoverflow.com/a/74689094/633961
|
Describe the bug
go 1.17 introduced behavior that can lead to an
ambiguous import error
when attempting to rungo mod tidy
Steps to reproduce
This occurs when attempting to update OTel dependency versions.
run
go mod tidy
What did you expect to see?
No errors
What did you see instead?
Environment
Upgrading the dependency version.
Additional context
This can be alleviated with running
rm go.sum && go mod tidy -go=1.16 && go mod tidy -go=1.17
The upstream collector-contrib repository also faces the same issues and gets around it by adding a
make gotidy
command to their makefile.The text was updated successfully, but these errors were encountered: