-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Dependency error trying to build custom collector distribution 0.81.0 within a workspace #8127
Comments
I ran into this as well. Removing the |
We were able to build the collector by adding the following to our excludes:
- github.com/knadh/koanf v1.5.0 |
Nice, I was able to do the same with:
|
`github.com/knadh/koanf/maps` and other koanf packages can be ambiguously loaded from their own modules or from `github.com/knadh/koanf` v.1.x when using Go workspaces. This PR removes references to any koanf v1 packages to disambiguate the import path. **Link to tracking Issue:** #8127 I realize this change is enormous, I wasn't able to figure out how to isolate the change to just the koanf packages. Any recommendations welcome. I produced these changes by running the following: ```shell go mod edit -exclude=github.com/knadh/[email protected] go work init go work use -r . go work sync make gotidy make genotelcorecol ```
This should be fixed by #8219, please re-open if its not the case |
this is still happening, i'm on v0.90.0
|
@mmynk if it's still happening, please re-open this issue |
Describe the bug
When building a custom collector with version 0.81.0, if the collector is built into a directory which forms part of a go workspace, the builds fails with this error:
This error does not occur on 0.80.0.
Steps to reproduce
A minimal working example can be found here: https://github.com/mattsains/otel-builder-test
Go to directory
bloop
and run:The error occurs.
Downgrade the builder to version 0.80.0 and change all instances of 0.81.0 in the builder-config.yaml file to 0.80.0, and try again. It succeeds.
What did you expect to see?
I expected to be able to build a custom collector in a workspace. This is a reasonable scenario if you are also building custom components to include in your distribution.
What did you see instead?
A dependency error. I am sure this is not conflicts with my own code, because, as you can see in the repro, it is a trivial workspace with only the collector build included.
What version did you use?
0.81.0
What config did you use?
See repo linked above
Environment
OS: Linux 5.19.0-43-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 22 13:39:36 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Compiler(if manually compiled): go version go1.20.5 linux/amd64
Additional context
Could this be because the koanf dependency is older than workspaces? https://github.com/knadh/koanf/blob/v1.5.0/go.mod#L3
The text was updated successfully, but these errors were encountered: