Skip to content

chore: update to go1.20 #1993

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 4 commits into from
Aug 19, 2023
Merged

chore: update to go1.20 #1993

merged 4 commits into from
Aug 19, 2023

Conversation

ldez
Copy link
Member

@ldez ldez commented Aug 18, 2023

  • updates CI to use go1.20 and go1.21: uses the aliases stable and oldstable to avoid updating the branch protection each time there is a Go update.
  • uses errors.Join to improve obtainError

https://tip.golang.org/doc/go1.20

Fixes #793

@ldez ldez added this to the v4.14 milestone Aug 18, 2023
@ldez ldez requested a review from dmke August 18, 2023 10:09
@dmke
Copy link
Member

dmke commented Aug 18, 2023

I currently don't have the mental capacity, so a full review will need to wait until tomorrow, but:

uses the aliases stable and oldstable

Does this work with the caching mechanism?

# https://github.com/marketplace/actions/cache
- name: Cache Go modules
  uses: actions/cache@v3
  with:
    # ...
    key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
    restore-keys: |
      ${{ runner.os }}-${{ matrix.go-version }}-go-

Now with matrix.go-version being stable, the cache key will only change if the go.sum files change. This would only be the case for dependency updates, since the minimum Go version is only present in the go.mod file...

@ldez
Copy link
Member Author

ldez commented Aug 18, 2023

The modules don't depend on the Go version, so the cache can stay the same between two different versions of Go.

But in fact since actions/setup-go@v4 the caching is handled by the action, so I will remove the caching step.
https://github.com/marketplace/actions/setup-go-environment

@ldez ldez enabled auto-merge (squash) August 19, 2023 15:42
@ldez ldez merged commit b37d60c into go-acme:master Aug 19, 2023
@ldez ldez deleted the feat/update-go branch August 19, 2023 16:05
@ldez ldez changed the title chore: update to go1.20 chore: update to go1.20 Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

export resolver.obtainError?
2 participants