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

[release-v1.7] multi: Build and doco updates for Go 1.20. #3087

Merged
merged 6 commits into from Apr 7, 2023

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Apr 7, 2023

This is a backport of #2976, #3021 and #3052 to the 1.7 release branch.

jholdstock and others added 2 commits April 6, 2023 21:31
The script `run_tests.sh` does not work if a go.work file is present in
the project root. This is because when a `go.work` file is present, `go
list -m` returns the names of all modules in the workspace rather than
just the parent module in the root directory. Removing the `-m` flag
fixes this.
This updates to the following Github Actions:

- actions/setup-go@6edd440 #v3.5.0
- actions/checkout@ac59398 #v3.3.0
@davecgh davecgh force-pushed the rel17_multi_go_1_20 branch 3 times, most recently from 3f01d93 to 4de046f Compare April 7, 2023 03:05
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

That's a lotta gofmt, but lgtm.

Do we cut the year out of the copyright at some point? I'm not sure what it really conveys.

@davecgh
Copy link
Member Author

davecgh commented Apr 7, 2023

I'm still working on making it build properly against the latest versions of Go and the linter/vet that works with them. The updates to various things are spread out over time, so having to find and cherry-pick the right ones.

Do we cut the year out of the copyright at some point? I'm not sure what it really conveys.

I think that's only because these are all backports to an old release branch. On master they show clearly when the last time the code was updated by the project and is covered by the copyright. This matters when code gets copied all over the place over time and updated.

@davecgh davecgh force-pushed the rel17_multi_go_1_20 branch 2 times, most recently from 925dc2a to e98da44 Compare April 7, 2023 03:32
This modifies the entire repository to use the new formatting of doc
comments in the upcoming Go 1.19 release.

The primary motivating factors for this are:

- Builds check that files are formatted per gofmt and that will no
  longer be true as of Go 1.19 without these changes
- Separating all the updates into a single commit ensures these
  documentation only formatting changes do not clutter up diffs that
  actually change code

For the most part, the changes are just the automated changes suggested
by the Go 1.19 version of gofmt, but there are also a few cases where
the comments were reworded a bit to play nicely with the new formatting
requirements.

For example, the new version of gofmt reformats and collapses nested
lists where as the existing version does not.  Thus, instances of nested
lists have been changed to either eliminate them or use mixed markers
which produce expect results.
This updates CI to test against Go 1.20 and removes the tests for Go
1.18 accordingly.
@davecgh
Copy link
Member Author

davecgh commented Apr 7, 2023

Alright, I've cherry-picked and backported everything for the 1.7 release branch to build with the latest versions of Go and pass all lint and vet checks now.

Copy link
Member

@jrick jrick left a comment

Choose a reason for hiding this comment

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

looks fine

@davecgh davecgh merged commit 7aa0549 into decred:release-v1.7 Apr 7, 2023
2 checks passed
@davecgh davecgh deleted the rel17_multi_go_1_20 branch April 7, 2023 14:08
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

4 participants