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

Bugfix for enumer in go 1.22 #5915

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Bugfix for enumer in go 1.22 #5915

merged 2 commits into from
Apr 17, 2024

Conversation

Groxx
Copy link
Contributor

@Groxx Groxx commented Apr 17, 2024

Enumer is currently crashing if make go-generate is run with Go 1.22: alvaroloes/enumer#71
Temporal helpfully found an easy fix: temporalio/sdk-go#1382
For the underlying cause: golang/go#62167
So I've mimicked that by just doing a go get golang.org/x/tools@latest in the tools-module.

And now make clean -> GOTOOLCHAIN=[go1.20.1 or go1.22.1] make go-generate both work correctly.
(you need Go 1.21 or newer to use GOTOOLCHAIN. highly recommended!)

Since this only affects build-time tools and doesn't change any generated code, it seems trivially safe, but I have not checked what all has changed in golang.org/x/tools across these versions.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018eed9e-f746-431a-a6f0-02d7f0cd49d2

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 71 unchanged lines in 16 files lost coverage.
  • Overall coverage decreased (-0.02%) to 67.393%

Files with Coverage Reduction New Missed Lines %
common/persistence/sql/sqlplugin/postgres/task.go 2 73.4%
common/task/parallel_task_processor.go 2 93.06%
common/persistence/sql/sqlplugin/postgres/db.go 2 80.0%
service/history/handler/handler.go 2 52.41%
common/task/fifo_task_scheduler.go 2 85.57%
service/matching/db.go 2 73.23%
common/util.go 2 91.78%
common/membership/hashring.go 2 84.69%
service/history/task/fetcher.go 2 85.05%
common/log/tag/tags.go 3 50.46%
Totals Coverage Status
Change from base Build 018eed95-97d4-41ce-9aad-b2b0609ba7ad: -0.02%
Covered Lines: 98642
Relevant Lines: 146368

💛 - Coveralls

@Groxx Groxx merged commit d0661b7 into uber:master Apr 17, 2024
18 checks passed
@Groxx Groxx deleted the 1.22 branch April 17, 2024 20:34
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.

workflowcheck v0.1.0 fails with Go 1.22
3 participants