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

🤗 [Question]: clarification re. unsafe and Go incompatibility #2304

Closed
3 tasks done
davidhsingyuchen opened this issue Jan 18, 2023 · 4 comments
Closed
3 tasks done

Comments

@davidhsingyuchen
Copy link

davidhsingyuchen commented Jan 18, 2023

Question Description

Thank you for this project! We're evaluating if we should adopt fibre, so I have some corresponding questions:

Quoted from Limitations stated in README:

Due to Fiber's usage of unsafe, the library may not always be compatible with the latest Go version. Fiber 2.40.0 has been tested with Go versions 1.16 to 1.19.

  1. Are go-version in test.yml the supported Go versions (not sure why 1.18 is missing)? In other words, Since Fiber v2.41.0 is out, just like v2.40.0, it also supports Go versions 1.16 to 1.19.
  2. Following 1., to support a new Go version, a PR is created to add the new version to test.yml (e.g., ci: add go 1.19 to tests #1994), and the library may not always be compatible with the latest Go version refers to the time difference between a Go version is released and a corresponding update PR is merged and then a release is cut on Fiber side. Just want to confirm it's just a timing thing instead of the possibility that a future major Go version won't be ever supported by Fiber.
  3. Since 2. is applicable to any library (i.e., all libraries have to update their CI to support a new Go version, and that takes some time), I'm wondering how Fiber's usage of unsafe makes the process harder. From Go 1 Compatibility doc, it says "Use of package unsafe. Packages that import unsafe may depend on internal properties of the Go implementation. We reserve the right to make changes to the implementation that may break such programs.", and since a new Go version may contain breaking changes to the unsafe package, it may take some effort for Fiber to support the new version, but Fiber will still support it, just that it may come a bit slower. Sort of coming back to the conclusion of 2., but I just want to confirm, thanks!

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my questions prior to opening this one.
  • I understand that improperly formatted questions may be closed without explanation.
@welcome
Copy link

welcome bot commented Jan 18, 2023

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ReneWerner87
Copy link
Member

to 1.
yes we support 1.16 to 1.19 with fiber v2

we left out the intermediate versions to keep the workflow faster
since we are testing the feature newest and oldest, we should cover everything with it
you can also find the supported versions in the docs and the readme in the project
image
image

to 2.
since according to the golang community all golang versions are downward compatible, later versions like 1.20 should also be compatible with fiber.

but we always have to meet the basic requirement of 1.16 with the code, i.e. if a feature is added later, it can't be used or has to be adjusted by magic anotations in the golang file so that it is only used for that version
f.e.
https://github.com/gofiber/template/blob/2fde445c06e9f7695cc0f549ef73121640849788/amber/amber_1.16_test.go#L1-L2

what you mentioned has only to do with the fact that the new version then has not yet been tested in our ci
but fiber should still be compatible with the new golang version

to 3.
in the last 2 years, there has not been a breaking change from a golang version that has made fiber unfunctional

also i can not remember any changes in the unsafe package

@ReneWerner87
Copy link
Member

image
image

@davidhsingyuchen
Copy link
Author

in the last 2 years, there has not been a breaking change from a golang version that has made fiber unfunctional
also i can not remember any changes in the unsafe package

This data point is quite useful.

@ReneWerner87 Many thanks for the detailed explanation. Closing this issue accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants