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

Golang ci #358

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Golang ci #358

wants to merge 24 commits into from

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Oct 26, 2022

Golangci-lint github action and golangci lint configuration.

All PR's just submitted will be used in the base of the wasmerless cosmwasm, but are also good for the wasmer version.

@ethanfrey
Copy link
Member

All PR's just submitted will be used in the base of the wasmerless cosmwasm

Did I miss something? If there is a fork, it would be good to know the place, so we can link it for people interested. I got this question from some people wishing to use an interpreter

@faddat
Copy link
Contributor Author

faddat commented Oct 26, 2022

Ah, no fork

Sorry, don't mean to alarm. This is how I start any code task, clean out the repo & automate as much as possible.

In fact, what I'd like to see happen, is that we have mutually compatible implementations:

Contracts are exactly the same.

When we run those contracts in a go environment (ex: wasmd) they run without cgo dependencies

When we eg: cw-sdk, they run rust only (as they already do)

Goal: when we run CosmWasm contracts on a chain written in Go, we do so without using cgo because it makes performance wonky in every case I see it used.

Goal: when we use the cw-sdk, we all light a candle for larry.

@faddat
Copy link
Contributor Author

faddat commented Oct 26, 2022

@webmaster128 Please let me know if you're good merging this PR, I am more than happy to handle its integration into wasmd.

Goal: you change nothing and continue to do your thing in rust.

PS if this doesn't work please let me know.

concerning the question of a cgo-less fork, take this PR and the others that I made today, and this will form the basis of it.

But the goal is actually to make cw much faster in go chains, and change nothing in rust.

Anyhow, all code will be PR'd to this repo :)

@webmaster128
Copy link
Member

Looks like some nice changes in the diff. We already have a Go sanity job in CircleCI and the tools should probably go there instead of introducing GitHub Actions here.

Getting rid of cgo is certainly not a goal any time soon.

I'll try to look into this around mid November.

@faddat
Copy link
Contributor Author

faddat commented Oct 26, 2022

ok man, it is definitely not the biggest hurry. Notes:

  • when I do any code, I always lint like a madman
  • if the circleci stuff did not flag these issues, it isn't tight enough imo
  • I also gofumpt
  • I also check deps
  • I also dependabot

So, those are done now, and basically my plan is I will make a branch, using all of those. After that we.... well, yes, I agree with you, it will be a hard ride to work out the right way to run the wasm in go only. However when that is done, I suspect that go chains will run things much more smoothly.

Some folks have always wondered why I am pretty strict on all of the items above-- basically, from there, I have a base where my editor is much more useful. All warnings have been eliminated, and making modifications is much easier.

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

3 participants