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

build(go, deps): switch to Go 1.22 and update modules #1093

Merged

Conversation

gen2thomas
Copy link
Collaborator

@gen2thomas gen2thomas commented Oct 31, 2024

Solved issues and/or description of the change

  • Go 1.23 is released #1089
  • switch to Go 1.22, for latest "periph.io/x/conn/v3" and vulnerabilities in some older dependencies
  • fix linter issues
  • fix warnings for actions/checkout@v3, actions/setup-go@v4, golangci/golangci-lint-action@v3
  • introduce gocv build tag, used for platforms/opencv
  • introduce libusb build tag, used for platforms/digispark

Note:
update your local linter, e.g. by:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0

Manual test

none

Checklist

  • The PR's target branch is 'hybridgroup:dev'
  • New and existing unit tests pass locally with my changes (e.g. by run make test_race)
  • No linter errors exist locally (e.g. by run make fmt_check)
  • I have performed a self-review of my own code

@gen2thomas gen2thomas force-pushed the feature/update_golang_121_122 branch 2 times, most recently from 5843ff8 to fe6aa59 Compare October 31, 2024 18:51
@gen2thomas
Copy link
Collaborator Author

gen2thomas commented Nov 1, 2024

It seems with the new linter, folders and files can not be excluded anymore from "typecheck" linter.
platforms/opencv/camera_driver.go:7:2: could not import gocv.io/x/gocv ... (typecheck)

So, I have introduced a gocv build tag. Same for digispark with new build tag "libusb".

Tried to use:

issues:
  # Enables skipping of directories:
  # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
  # Default: true
  exclude-dirs-use-default: false

  # note: examples will be currently omitted by the build tag
  exclude-dirs:
    - platforms/opencv/
    - (^|/)opencv($|/)
    - opencv
    - opencv*

  exclude-files:
    - platforms/opencv/camera_driver\.go
    - camera_driver.*

  exclude-rules:
    - linters:
        - typecheck
      text: "gocv.io/x/gocv"

@gen2thomas gen2thomas force-pushed the feature/update_golang_121_122 branch 10 times, most recently from 1a55ec6 to f7979a3 Compare November 1, 2024 10:29
@gen2thomas gen2thomas changed the title build(go, deps): switch to Go 1.21 and update modules build(go, deps): switch to Go 1.22 and update modules Nov 1, 2024
@gen2thomas gen2thomas force-pushed the feature/update_golang_121_122 branch 3 times, most recently from d6f54af to ed661a2 Compare November 1, 2024 11:24
@gen2thomas gen2thomas force-pushed the feature/update_golang_121_122 branch from ed661a2 to c0702cf Compare November 1, 2024 11:49
@gen2thomas gen2thomas marked this pull request as ready for review November 1, 2024 11:52
@gen2thomas gen2thomas merged commit a8f47ea into hybridgroup:dev Nov 1, 2024
6 checks passed
@gen2thomas gen2thomas deleted the feature/update_golang_121_122 branch November 1, 2024 11:54
szampardi pushed a commit to szampardi/gobot that referenced this pull request Nov 4, 2024
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