Oudwins / zog

Go with Zod inspired simple schema validation
MIT License
153 stars 5 forks source link

Minimum Go version support? #5

Closed alexluong closed 2 months ago

alexluong commented 2 months ago

Hi there, is there any reason this package requires v1.22.3? I'd love to give it a try but due to some dependency conflict, I can't quite use Go v1.22.3 yet.

Gabriel-Rockson commented 2 months ago

Do you mean you can't use v1.22.3 of Go locally?

Personally, I use https://github.com/jdx/mise to manage multiple versions of packages. I don't know if that will help.

alexluong commented 2 months ago

Yes, in my current project, I cannot use v1.22.3.

Gabriel-Rockson commented 2 months ago

Yes yes, I see your pain, so I think what you need is to be able to somehow manage multiple versions of Golang on your machine and decide which to use for which project.

As I mentioned earlier, I use https://github.com/jdx/mise for that, and it works just great for this use case.

Yes, in my current project, I cannot use v1.22.3.

alexluong commented 2 months ago

Thanks for your suggestion. I think you're missing the point tho.

My environment is fine. I have different projects in different Golang versions. One of the projects I'm working on requires an earlier version of Golang. Does that mean I cannot use zog?

I don't know if zog uses any Golang feature that's only supported since v1.22.3? If not, can we support an earlier Go version, say v1.21 or something like that?

Gabriel-Rockson commented 2 months ago

Thanks for your suggestion. I think you're missing the point tho.

My environment is fine. I have different projects in different Golang versions. One of the projects I'm working on requires an earlier version of Golang. Does that mean I cannot use zog?

I don't know if zog uses any Golang feature that's only supported since v1.22.3? If not, can we support an earlier Go version, say v1.21 or something like that?

Oh yes, completely missed your point, I get you now. What go version is your project on though?

alexluong commented 2 months ago

What go version is your project on though?

Funny enough, v1.22.2. I'm using encore and that's their runtime version. I don't think I can customize it, unfortunately.

Oudwins commented 2 months ago

@alexluong Hey Thanks for the issue. I did not think of this. My bad. Let me update the package with a minimum version that makes sense.

Oudwins commented 2 months ago

Fixed. #6 & release 0.6.1

Let me know if there are any issues @alexluong, I have set it to minimum go version of 1.21.7

alexluong commented 2 months ago

Thanks @Oudwins for the quick turnaround, confirming that it's working for me now.