-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
httpreplay: Get error "flag redefined: v" when trying to get new Recorder #6501
Comments
Hey, thanks for the report. Quickly reading this I would say this is an issue in martian. It looks like you found a relevant issue too. Can this be closed out. I don't believe we have a v flag at all unless I am missing something. |
Closing due to lack of response. |
Hi. Sorry. Looks like martian maintainers merged a fix into master 10 days ago (it's in v3.3.2). Maybe we could bump up the github.com/google/martian/v3 dependency to this version? (currently it's v3.2.1) |
Sure, I can do that. You can always also explicitly require a higher version in your module to work around this. Just underscore import martian and depend on the latest. |
Until we drop support for Go 1.15 we can't upgrade this dep in our code. It use a symbol |
Good suggestion. Thanks |
httpreplay version: v0.103.0
Code
Expected behavior
httpreplay.Recorder
is instantiated without any errors.Actual behavior
Got the following runtime error when trying to run the compiled binary:
It looks like "github.com/google/martian/v3" is being imported twice. In vendor/cloud.google.com/go/httpreplay/internal/proxy/log.go and in vendor/cloud.google.com/go/httpreplay/internal/proxy/record.go. This causes the Init function from vendor/github.com/google/martian/v3/init.go to run:
This seems to cause the flag parsing error.
As a work-around you can do:
which seems to run fine.
Go Environment
$ go version
go version go1.18.2 darwin/amd64
The text was updated successfully, but these errors were encountered: