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

Makefile outdated #852

Closed
gen2thomas opened this issue Sep 25, 2022 · 7 comments
Closed

Makefile outdated #852

gen2thomas opened this issue Sep 25, 2022 · 7 comments
Labels

Comments

@gen2thomas
Copy link
Collaborator

gen2thomas commented Sep 25, 2022

The "fmt_check" and "test_with_coverage" will not work in general, because the folder ".ci" is not exist. Also the excluding of vendor folder for tests should normally not be needed anymore.

suggested change for "fmt_check":

  • change name to "style" or provide different recipes
  • call "go fmt ./..."
  • some ideas for deprecated/frozen "golint" are needed

suggested change for "test_with_coverage":

  • call "go test -v ./... -coverprofile=coverage.txt" (adding "coverage.txt" to .gitignore)
  • call or suggest call "go tool cover -html=coverage.txt # will open the coverage in browser"

https://stackoverflow.com/questions/10516662/how-to-measure-test-coverage-in-go

In addition:

  • make test gives some kind of errors
    • "missing SetPolarity method"
    • read error - "*errors.errorString", should equal, read error - "*errors.errorString" (same occur sometimes for "write error")
    • keyboard_test.go
  • make examples fails for some examples (missing "SetPolarity" is one of them)

After everything is working again:

  • this could be mentioned in "CONTRIBUTING.md".
  • the CI build should test all adaptors and possibly also build examples

Alternatively, if nobody needs the "Makefile", it can be removed completely.

@gen2thomas
Copy link
Collaborator Author

Hi @deadprogram , after the main problems are fixed, how want we proceed?

  • Do we want to include examples build in circleci?
  • Do we want to use the Makefile for circleci build ("make test", "make examples" "make fmt_check" etc.)? Or do you prefer to program this code parts separately in a command-section of config.yml?
  • If we keep the Makefile (IMO this is nice for golang newbies), do we want to reference the usage from CONTRIBUTING.md?
  • How do we proceed with the formatting stuff? E.g. since go 1.17 the build tags have changed to "//go:build" and the formatter ("make fmt_fix") will change all examples and a few more files.

@gen2thomas
Copy link
Collaborator Author

gen2thomas commented Sep 28, 2022

Maybe useful to make a decision:

  • adaptor test takes ~20s
  • driver tests takes ~25s
  • examples build takes ~105s

@deadprogram
Copy link
Member

OK then not examples :)

@gen2thomas
Copy link
Collaborator Author

"1:45" was maybe misleading, changed to sec.

@gen2thomas
Copy link
Collaborator Author

Hi @deadprogram , check examples with "go vet" takes only ~50sec in circleci. Should we add it, what do you think?

@deadprogram
Copy link
Member

check examples with "go vet" takes only ~50sec in circleci.

Probably a good idea, keep them from getting messy. 😸

@gen2thomas gen2thomas added the done on dev the feature or bug is solved on dev branch and wait for merge to release branch label Nov 13, 2022
@gen2thomas
Copy link
Collaborator Author

part of release v2.0.0

@gen2thomas gen2thomas removed the done on dev the feature or bug is solved on dev branch and wait for merge to release branch label Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants