Open atoulme opened 5 months ago
Not sure if this is a real problem, because this seem to work in CI, see https://github.com/open-telemetry/opentelemetry-collector/blob/main/.github/workflows/build-and-test.yml#L120 and https://github.com/open-telemetry/opentelemetry-collector/blob/main/Makefile#L81
It works in this repository, but not under a different folder. This means we can't use it for contrib. I have amended the steps to reproduce.
We are also experiencing this when trying to install the mdatagen tool via go install
for our distribution.
Is there a fix for this yet? Trying to update some generated files in vcenterreceiver.
Weird, please make sure you are on latest main and run make generate.
Issue persists, tried from inside a folder and from repository as well. Make generate fails.
Error displayed after go install github.com/open-telemetry/opentelemetry-collector/cmd/mdatagen@latest: go: go.opentelemetry.io/collector/cmd/mdatagen@latest (in go.opentelemetry.io/collector/cmd/mdatagen@v0.97.0): The go.mod file for the module providing named packages contains one or more replace directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module.
Please check that GOBIN is in your PATH. This might be the problem.
Also seeing this issue:
$ go install github.com/open-telemetry/opentelemetry-collector/cmd/mdatagen@latest
go: github.com/open-telemetry/opentelemetry-collector/cmd/mdatagen@latest (in github.com/open-telemetry/opentelemetry-collector/cmd/mdatagen@v0.99.0):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
I also can still reproduce. The way contrib works around this is by importing mdatagen into a go.mod first, and then install from there: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/Makefile#L283
Some traction on this would be appreciated.
Trying to understand why the replace
directives were added in the first place in #9358. What issue does that solve?
Expected:
should install mdatagen under $GOBIN.
Actual: