zed icon indicating copy to clipboard operation
zed copied to clipboard

Building on macOS emits a deprecation warning

Open gedw99 opened this issue 3 years ago • 3 comments

mac OS version: 11.6.2

on build of cmd i get:


# github.com/keybase/go-keychain
cgo-gcc-prolog:203:11: warning: 'SecTrustedApplicationCreateFromPath' is deprecated: first deprecated in macOS 10.15 - No longer supported [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here

Maybe we still need to have this to support old versions of Mac OS ?

gedw99 avatar Jan 09 '22 11:01 gedw99

This is an issue with the 99designs/keyring library. Here's the upstream issue: https://github.com/99designs/keyring/issues/66

jzelinskie avatar Jan 09 '22 18:01 jzelinskie

hey @jzelinskie

https://github.com/99designs/keyring/blob/master/keychain.go#L10 uses github.com/keybase/go-keychain

this supports all desktops and uses shell commands:

package main

import (
	"log"

	"github.com/zalando/go-keyring"
)

func main() {
	service := "my-app"
	user := "anon"
	password := "secret"

	// set password
	err := keyring.Set(service, user, password)
	if err != nil {
		log.Fatal(err)
	}

	// get password
	secret, err := keyring.Get(service, user)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(secret)
}

gedw99 avatar Jan 09 '22 22:01 gedw99

For github CI, do you use the github secrets engine ?

gedw99 avatar Jan 09 '22 22:01 gedw99

I can't reproduce this, feel free to reopen if still persists and provide more info about the toolchain version.

vroldanbet avatar Sep 19 '24 09:09 vroldanbet