livekit / protocol

LiveKit protocol. Protobuf definitions for LiveKit's signaling protocol
https://docs.livekit.io
Apache License 2.0
79 stars 65 forks source link

macOS Import Dependency Failure #659

Closed GeekenDev closed 7 months ago

GeekenDev commented 7 months ago

Dependency: https://github.com/mackerelio/go-osstat

My machine: Darwin amd64 - (MacOS - 14.2.1) Go Version: (go1.22.1 darwin/amd64)

I did some digging and it states CPU support on darwin requires cgo. Is there anything special I need to be doing to source the necessary dependency? Screenshots below. (*1: unavailable without cgo)

My project that imports resources from this repo:

Screenshot 2024-03-14 at 2 23 59 PM

The source file in question from this repo:

Screenshot 2024-03-14 at 2 20 02 PM

The imports inside of my project:

Screenshot 2024-03-14 at 2 23 01 PM
dennwc commented 7 months ago

Hmm, right, this is not the first time it happens. We may need to move the CPU stats helpers to a separate package to avoid cgo requirement for the main protocol package.

GeekenDev commented 7 months ago

This has to be fastest response, commit, and PR i've ever seen. Gracias @dennwc 😎

dennwc commented 7 months ago

@GeekenDev You're welcome! Until we tag the next release update your go.mod:

github.com/livekit/protocol 4d22b4ce36d213847a65521e4a17bbd0ff56ffc8

Plus go mod tidy and it should do the trick. Let us know if there are other similar issues.