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

Add support for GO 1.23 #3

Closed
ovechkin-dm opened this issue Aug 14, 2024 · 3 comments · Fixed by #4
Closed

Add support for GO 1.23 #3

ovechkin-dm opened this issue Aug 14, 2024 · 3 comments · Fixed by #4
Assignees

Comments

@ovechkin-dm
Copy link
Owner

Golang removed support for //go:linkname directive. That means that another workaround should be implemented.

@m1khal3v
Copy link

@ovechkin-dm Thank you for the wonderful mockio library, I couldn’t stay away and started intensively Googling what other options there are. I found information that previously assembly stubs were used for the same purposes

https://sitano.github.io/2016/04/28/golang-private/

I hope this helps somehow

@ovechkin-dm
Copy link
Owner Author

ovechkin-dm commented Aug 15, 2024

Hello @m1khal3v
Thank you for your research. Unfortunately, accroding to changelog, assembly stubs are also not allowed. Similarly, the linker disallows references to such symbols from assembly code

There are couple of good news though:

  1. I am half way done with the workaround
  2. For now you can run tests with flag, and it will work go test -ldflags=-checklinkname=0 ./...

@ovechkin-dm ovechkin-dm linked a pull request Aug 21, 2024 that will close this issue
@ovechkin-dm
Copy link
Owner Author

Fixed in v0.3.0

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 a pull request may close this issue.

2 participants