You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a quirk with Go's replace directive where it is only applied if the directive appears in the go.mod file of the main program, but not if it is in the go.mod file of a dependency.
In a scenario where another Go program is using the conjure/pkg/registration library (as in the Tor Conjure PT), a build will fail with the following errors:
# github.com/refraction-networking/conjure/pkg/dtls
../../../../go/pkg/mod/github.com/refraction-networking/conjure@v0.6.7/pkg/dtls/dial.go:64:3: unknown field CustomClientHelloRandom in struct literal of type "github.com/pion/dtls/v2".Config
../../../../go/pkg/mod/github.com/refraction-networking/conjure@v0.6.7/pkg/dtls/listener.go:63:24: connState.RemoteRandomBytes undefined (type "github.com/pion/dtls/v2".State has no field or method RemoteRandomBytes)
../../../../go/pkg/mod/github.com/refraction-networking/conjure@v0.6.7/pkg/dtls/listener.go:137:34: state.RemoteRandomBytes undefined (type *"github.com/pion/dtls/v2".State has no field or method RemoteRandomBytes)
../../../../go/pkg/mod/github.com/refraction-networking/conjure@v0.6.7/pkg/dtls/listener.go:236:40: clientHello.RandomBytes undefined (type *"github.com/pion/dtls/v2".ClientHelloInfo has no field or method RandomBytes)
This can be fixed by adding the directive to the go.mod file of the calling program, but it would be cleaner to just change the import where it's used, especially since this is a long-term change.
This isn't urgent, just a nice to have :)
The text was updated successfully, but these errors were encountered:
We are working on a better solution to this issue. The decision to use the replace over modified imports was made so that we wouldn't have to fork (and keep up to date) more of the pion modules relating to dtls. The use of the replace is intended to be a temporary fix.
The plan is to attempt to upstream our changes to the respective pion repositories, at which point the replace would not be necessary at all. Failing that though, we will fork the remaining pion libraries and switch to imports.
There is a quirk with Go's
replace
directive where it is only applied if the directive appears in thego.mod
file of the main program, but not if it is in thego.mod
file of a dependency.In a scenario where another Go program is using the
conjure/pkg/registration
library (as in the Tor Conjure PT), a build will fail with the following errors:Because the directive
fails to apply.
This can be fixed by adding the directive to the
go.mod
file of the calling program, but it would be cleaner to just change the import where it's used, especially since this is a long-term change.This isn't urgent, just a nice to have :)
The text was updated successfully, but these errors were encountered: