Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed go build annotation to fix Issue #104 #109

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

andorsk
Copy link
Contributor

@andorsk andorsk commented Jun 24, 2022

This is related to: #104..

@ghost
Copy link

ghost commented Jun 24, 2022

Review on Crocodile

@andorsk
Copy link
Contributor Author

andorsk commented Jun 24, 2022

Off LDKeyTypeFix branch:

Works%

Off main:

➜  did git:(main) ✗ go run main.go
# github.com/TBD54566975/ssi-sdk/cryptosuite
../../cryptosuite/cryptosuite.go:49:9: undefined: LDKeyType
../../cryptosuite/jwssignaturesuite.go:25:45: undefined: LDKeyType
../../cryptosuite/jwssignaturesuite.go:47:35: undefined: LDKeyType
➜  did git:(main) ✗

Oddly, mage test passes, which includes very similar code.

Room to improve this by replicating undefined issue over a test.

  package main
  
  import (
	  "github.com/TBD54566975/ssi-sdk/did"
	  "github.com/TBD54566975/ssi-sdk/crypto"
  
  )
  
  func main() {
	  // Generate a DID key.
	  pk, _, err := crypto.GenerateEd25519Key()
	  if err != nil {
		  panic(err)
	  }
  
	  _, err = did.CreateDIDKey(crypto.Ed25519, pk)
	  if err != nil {
		  panic(err)
	  }
	  print("Works")
}

The tests are similar to https://github.com/TBD54566975/ssi-sdk/blob/main/did/key_test.go#L27.

@decentralgabe
Copy link
Member

Will merge, but please note my comment here: #104 (comment)

The error you're seeing is due to not passing in the go build tag, which can be fixed with:

go run -tags jwx_es256k main.go

@decentralgabe decentralgabe merged commit 867420c into TBD54566975:main Jun 24, 2022
@andorsk
Copy link
Contributor Author

andorsk commented Jun 25, 2022

Thanks for the merge! I commented back on the original issue some.

@andorsk andorsk deleted the LDKeyTypeFix branch June 25, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants