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

upgrade golang.org/x/tools to fix a panic in go 1.22 #753

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

viktorasm
Copy link
Contributor

@viktorasm viktorasm commented Feb 8, 2024

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Version of Golang used when building/testing:

  • 1.11
  • 1.12
  • 1.13
  • 1.14
  • 1.15
  • 1.16
  • 1.17
  • 1.18
  • 1.19
  • 1.20
  • 1.21
  • 1.22

How Has This Been Tested?

Unit tests on master fail on Go 1.22, but work on 1.21.
After the fix, both compilers are happy.

Narrowed it down to an internal panic in golang.org/x/tools, after upgrading to latest version of the lib and doing a go mod tidy, the crash went away. The lowest x/tools version that works is 1.13.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@viktorasm viktorasm changed the title upgrade X tools to fix panic crash in go 1.22 upgrade golang.org/x/tools to fix a panic in go 1.22 Feb 8, 2024
@LandonTClipp
Copy link
Contributor

Thanks for the fix, will get this merged now.

@LandonTClipp LandonTClipp merged commit f513d5d into vektra:master Feb 8, 2024
4 checks passed
rhafer added a commit to rhafer/ocis that referenced this pull request Feb 9, 2024
to address issues when building with go1.22:
vektra/mockery#753
rhafer added a commit to owncloud/ocis that referenced this pull request Feb 9, 2024
to address issues when building with go1.22:
vektra/mockery#753
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.

mockery built with go 1.22~rc2 fails
2 participants