Skip to content

grand Go SDK update #1165

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

Merged
merged 3 commits into from
Feb 16, 2023
Merged

grand Go SDK update #1165

merged 3 commits into from
Feb 16, 2023

Conversation

dicej
Copy link
Contributor

@dicej dicej commented Feb 16, 2023

  • Add outbound-redis set operations and execute function
  • Add key-value support
  • Remove *_free calls since they were buggy and unnecessary given that we tell tinygo to leak anyway
  • Remove -wasm-abi=generic option since it's been removed as of tinygo 0.27

@dicej dicej requested review from lann, adamreese and vdice February 16, 2023 20:28
@@ -62,6 +66,80 @@ func init() {
w.Write([]byte(strconv.FormatInt(payload, 10)))
w.Write([]byte("\n"))
}

if _, err := redis.Sadd(addr, "myset", []string{"foo", "bar"}); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadd
😢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that's the second time you've made that joke.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WELL ITS STILL JUST AS FUNNY

@dicej
Copy link
Contributor Author

dicej commented Feb 16, 2023

Somehow I forget to sign commits 50% of the time. I blame git rebase.

- Add `outbound-redis` set operations and `execute` function
- Add `key-value` support
- Remove `*_free` calls since they were buggy and unnecessary given that we tell `tinygo` to leak anyway
- Remove `-wasm-abi=generic` option since it's been removed as of `tinygo` 0.27

Signed-off-by: Joel Dice <[email protected]>
@lann
Copy link
Collaborator

lann commented Feb 16, 2023

Somehow I forget to sign commits 50% of the time. I blame git rebase.

This might appeal to you (all my Fermyon repos are under ~/f/):

~/.gitconfig

[includeIf "gitdir:~/f/"]
  path = ~/f/gitconfig.inc

~/f/gitconfig.inc

[user]
email = [email protected]
signingkey = C90E9024FB60F7FC74F39250A30EEE9905396642

[commit]
gpgsign = true
signOff = true

Copy link
Contributor

@adamreese adamreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job @dicej

Copy link
Contributor

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to fix running the tinygo-based Spin apps/templates 🎉 -- at least it did so for me (go 1.19.6, tinygo 0.27.0)

Per the updated tinygo usage, you may need to bump go and tinygo versions a la #1153 for CI (test-sdk-go) to pass, though note #1153 (comment). Assuming you do, I can close 1153 as the rest of the changes are already here.

- Update Go and `tinygo` versions
- Use `interface{}` instead of `any` for broader compatibility
- Make `tinygo-outbound-redis` example sort the `SMEMBERS` result before comparing with the expected value

Signed-off-by: Joel Dice <[email protected]>
This was referenced Feb 16, 2023
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.

4 participants