bytedance / sonic

A blazingly fast JSON serializing & deserializing library
Apache License 2.0
6.59k stars 327 forks source link

Depress WARNING: sonic only supports Go1.16~1.22 && CPU amd64, but your environment is not suitable on Apple Chip Macs #598

Closed gonejack closed 4 months ago

gonejack commented 5 months ago

Hi, Author.

This warning shows up a lot and kind of tiring, could sonic exclude this WARNING for arm64+darwin enviroment as Apple certainly has not sold any servers built with Apple chips + MacOS yet.

AsterDY commented 5 months ago

This warning is used to warn users who may ignore compatibility between different envs. Maybe add a environment to omit it is a applicable option

gonejack commented 5 months ago

Maybe this?

if os.Getenv("SONIC_BE_QUIET") == "" {
   println("WARNING: sonic only supports Go1.16~1.22 && CPU amd64, but your environment is not suitable")
}
AsterDY commented 5 months ago

LGTM

jiabowen-tal commented 4 months ago

+10086