Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ability to use oto v3 and v2 in one module broken in oto v3.3.3 (at least on GOOS=darwin) #268

@dmitshur

Description

@dmitshur

I'm not sure about the status of the v2 major version of oto. It's not marked as deprecated, is that because it's still supported alongside v3? Or should it be marked as deprecated because it's unsupported?

If v2 is unsupported, the rest of this issue report can be safely ignored, but it would be helpful to make it clear (i.e., by marking it as deprecated).

It used to be possible for a Go module to depend on both v3 and v2 (but not neccessarily use them together at once). For example:

$ cat go.mod
module example

require (
	github.com/ebitengine/oto/v3 v3.2.0
	github.com/hajimehoshi/oto/v2 v2.4.2
	github.com/ebitengine/purego v0.7.0 // indirect
)
$ go test .../oto/v3 .../oto/v2
ok  	github.com/ebitengine/oto/v3	0.346s
ok  	github.com/hajimehoshi/oto/v2	0.246s

I recently found that updating to the latest v3 release, v3.3.3, pulls in purego v0.8.0 which breaks v2.4.2:

$ go get github.com/ebitengine/oto/v3
go: upgraded github.com/ebitengine/oto/v3 v3.2.0 => v3.3.3
go: upgraded github.com/ebitengine/purego v0.7.0 => v0.8.0
go: upgraded golang.org/x/sys v0.18.0 => v0.25.0
$ go test .../oto/v3 .../oto/v2      
# github.com/hajimehoshi/oto/v2
/Users/gopher/go/pkg/mod/github.com/hajimehoshi/oto/[email protected]/driver_macos.go:36:16: undefined: objc.AllocateClassPair
ok  	github.com/ebitengine/oto/v3	0.623s
FAIL	github.com/hajimehoshi/oto/v2 [build failed]
FAIL

I don't know if this breakage is intentional and expected (because oto v2 is unsupported). Reporting this in case it's helpful. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions