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

dedicated Kind type #116

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

dedicated Kind type #116

wants to merge 1 commit into from

Conversation

fiatjaf
Copy link
Collaborator

@fiatjaf fiatjaf commented Jan 1, 2024

I'll just leave this here for the future, maybe.

@fiatjaf fiatjaf changed the title dedicated Kind type dedicated Kind type Jan 1, 2024
Copy link

sweep-ai bot commented Jan 1, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run go test ./...
yielded the following error:
##[error]binary/binary_test.go:33:67: invalid operation: kind != evt.Kind (mismatched types int and nostr.Kind)
# github.com/nbd-wtf/go-nostr [github.com/nbd-wtf/go-nostr.test]
##[error]./count_test.go:15:11: cannot use []int{…} (value of type []int) as []Kind value in struct literal
##[error]./count_test.go:15:17: cannot use KindContactList (constant 3 of type Kind) as int value in array or slice literal
##[error]./envelopes_test.go:164:87: cannot use []int{…} (value of type []int) as []Kind value in struct literal
FAIL	github.com/nbd-wtf/go-nostr [build failed]
##[error]./eose_test.go:14:11: cannot use []int{…} (value of type []int) as []Kind value in struct literal
##[error]./eose_test.go:14:17: cannot use KindTextNote (constant 1 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:28:10: cannot use []int{…} (value of type []int) as []Kind value in struct literal
##[error]./filter_test.go:28:16: cannot use KindTextNote (constant 1 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:28:30: cannot use KindRecommendServer (constant 2 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:28:51: cannot use KindEncryptedDirectMessage (constant 4 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:56:23: cannot use KindEncryptedDirectMessage (constant 4 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:56:23: too many errors
FAIL	github.com/nbd-wtf/go-nostr/binary [build failed]
?   	github.com/nbd-wtf/go-nostr/example	[no test files]
?   	github.com/nbd-wtf/go-nostr/nip05	[no test files]
?   	github.com/nbd-wtf/go-nostr/nip06	[no test files]
?   	github.com/nbd-wtf/go-nostr/nip10	[no test files]
ok  	github.com/nbd-wtf/go-nostr/nip04	0.024s
ok  	github.com/nbd-wtf/go-nostr/nip11	0.005s
# github.com/nbd-wtf/go-nostr/nip19 [github.com/nbd-wtf/go-nostr/nip19.test]
##[error]nip19/nip19_test.go:115:3: cannot use nostr.KindArticle (constant 30023 of type nostr.Kind) as int value in argument to EncodeEntity
##[error]nip19/nip19_test.go:139:16: invalid operation: ep.Kind != nostr.KindArticle (mismatched types int and nostr.Kind)
##[error]nip19/nip19_test.go:162:16: invalid operation: ep.Kind != nostr.KindArticle (mismatched types int and nostr.Kind)
?   	github.com/nbd-wtf/go-nostr/nip42	[no test files]
?   	github.com/nbd-wtf/go-nostr/nip46	[no test files]
# github.com/nbd-wtf/go-nostr/nson [github.com/nbd-wtf/go-nostr/nson.test]
##[error]nson/nson_test.go:42:41: invalid operation: kind != evt.Kind (mismatched types int and nostr.Kind)
ok  	github.com/nbd-wtf/go-nostr/nip13	0.042s
FAIL	github.com/nbd-wtf/go-nostr/nip19 [build failed]
FAIL	github.com/nbd-wtf/go-nostr/nson [build failed]
FAIL
##[error]Process completed with exit code 1.

Here are the logs:
go: downloading github.com/btcsuite/btcd/btcec/v2 v2.3.2
go: downloading github.com/tyler-smith/go-bip32 v1.0.0
go: downloading github.com/tyler-smith/go-bip39 v1.1.0
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53
go: downloading github.com/btcsuite/btcd/btcutil v1.1.3
go: downloading github.com/gobwas/httphead v0.1.0
go: downloading github.com/gobwas/ws v1.2.0
go: downloading github.com/puzpuzpuz/xsync/v2 v2.5.1
go: downloading github.com/tidwall/gjson v1.14.4
go: downloading golang.org/x/net v0.8.0
go: downloading github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
go: downloading golang.org/x/crypto v0.7.0
go: downloading github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2
go: downloading github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e
go: downloading github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/tidwall/match v1.1.1
go: downloading github.com/tidwall/pretty v1.2.0
go: downloading github.com/gobwas/pool v0.2.1
go: downloading github.com/decred/dcrd/crypto/blake256 v1.0.1
# github.com/nbd-wtf/go-nostr/binary [github.com/nbd-wtf/go-nostr/binary.test]

Copy link

sweep-ai bot commented Jan 1, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run go test ./...
yielded the following error:
##[error]binary/binary_test.go:33:67: invalid operation: kind != evt.Kind (mismatched types int and nostr.Kind)
# github.com/nbd-wtf/go-nostr [github.com/nbd-wtf/go-nostr.test]
##[error]./count_test.go:15:11: cannot use []int{…} (value of type []int) as []Kind value in struct literal
FAIL	github.com/nbd-wtf/go-nostr [build failed]
##[error]./count_test.go:15:17: cannot use KindContactList (constant 3 of type Kind) as int value in array or slice literal
##[error]./envelopes_test.go:164:87: cannot use []int{…} (value of type []int) as []Kind value in struct literal
##[error]./eose_test.go:14:11: cannot use []int{…} (value of type []int) as []Kind value in struct literal
##[error]./eose_test.go:14:17: cannot use KindTextNote (constant 1 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:28:10: cannot use []int{…} (value of type []int) as []Kind value in struct literal
##[error]./filter_test.go:28:16: cannot use KindTextNote (constant 1 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:28:30: cannot use KindRecommendServer (constant 2 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:28:51: cannot use KindEncryptedDirectMessage (constant 4 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:56:23: cannot use KindEncryptedDirectMessage (constant 4 of type Kind) as int value in array or slice literal
##[error]./filter_test.go:56:23: too many errors
FAIL	github.com/nbd-wtf/go-nostr/binary [build failed]
?   	github.com/nbd-wtf/go-nostr/example	[no test files]
?   	github.com/nbd-wtf/go-nostr/nip05	[no test files]
?   	github.com/nbd-wtf/go-nostr/nip06	[no test files]
ok  	github.com/nbd-wtf/go-nostr/nip04	0.018s
?   	github.com/nbd-wtf/go-nostr/nip10	[no test files]
ok  	github.com/nbd-wtf/go-nostr/nip11	0.003s
# github.com/nbd-wtf/go-nostr/nip19 [github.com/nbd-wtf/go-nostr/nip19.test]
##[error]nip19/nip19_test.go:115:3: cannot use nostr.KindArticle (constant 30023 of type nostr.Kind) as int value in argument to EncodeEntity
##[error]nip19/nip19_test.go:139:16: invalid operation: ep.Kind != nostr.KindArticle (mismatched types int and nostr.Kind)
##[error]nip19/nip19_test.go:162:16: invalid operation: ep.Kind != nostr.KindArticle (mismatched types int and nostr.Kind)
?   	github.com/nbd-wtf/go-nostr/nip42	[no test files]
?   	github.com/nbd-wtf/go-nostr/nip46	[no test files]
# github.com/nbd-wtf/go-nostr/nson [github.com/nbd-wtf/go-nostr/nson.test]
##[error]nson/nson_test.go:42:41: invalid operation: kind != evt.Kind (mismatched types int and nostr.Kind)
ok  	github.com/nbd-wtf/go-nostr/nip13	0.029s
FAIL	github.com/nbd-wtf/go-nostr/nip19 [build failed]
FAIL	github.com/nbd-wtf/go-nostr/nson [build failed]
FAIL
##[error]Process completed with exit code 1.

Here are the logs:
go: downloading github.com/btcsuite/btcd/btcec/v2 v2.3.2
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/tyler-smith/go-bip32 v1.0.0
go: downloading github.com/tyler-smith/go-bip39 v1.1.0
go: downloading golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53
go: downloading github.com/btcsuite/btcd/btcutil v1.1.3
go: downloading github.com/gobwas/httphead v0.1.0
go: downloading github.com/gobwas/ws v1.2.0
go: downloading github.com/puzpuzpuz/xsync/v2 v2.5.1
go: downloading github.com/tidwall/gjson v1.14.4
go: downloading golang.org/x/net v0.8.0
go: downloading github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e
go: downloading github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec
go: downloading golang.org/x/crypto v0.7.0
go: downloading github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
go: downloading github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/tidwall/match v1.1.1
go: downloading github.com/tidwall/pretty v1.2.0
go: downloading github.com/gobwas/pool v0.2.1
go: downloading github.com/decred/dcrd/crypto/blake256 v1.0.1
# github.com/nbd-wtf/go-nostr/binary [github.com/nbd-wtf/go-nostr/binary.test]

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.

1 participant