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

Make optional.Option[T] type serializable #29282

Merged
merged 18 commits into from
Feb 23, 2024

Conversation

6543
Copy link
Member

@6543 6543 commented Feb 20, 2024

make the generic Option type de-/serializable for json and yaml

@6543 6543 added pr/wip This PR is not ready for review type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Feb 20, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 20, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 20, 2024
modules/optional/serialization.go Outdated Show resolved Hide resolved
modules/optional/serialization.go Outdated Show resolved Hide resolved
@6543 6543 marked this pull request as ready for review February 22, 2024 15:38
@6543 6543 removed the pr/wip This PR is not ready for review label Feb 22, 2024
@6543 6543 added this to the 1.22.0 milestone Feb 22, 2024
@6543 6543 changed the title WIP: make optional serializable Make optional serializable Feb 22, 2024
@6543 6543 changed the title Make optional serializable Make optional.Option[T] type serializable Feb 22, 2024
@6543 6543 requested a review from KN4CK3R February 22, 2024 16:06
@lunny
Copy link
Member

lunny commented Feb 23, 2024

This PR should be merged first then #29329

@6543
Copy link
Member Author

6543 commented Feb 23, 2024

They are related but independent :)

As the changed struct in mentioned pull are not used for de-/serializion

@6543
Copy link
Member Author

6543 commented Feb 23, 2024

PS: I'm happy to see it merged once it has sufficient reviews ;)

modules/optional/serialization.go Show resolved Hide resolved
@GiteaBot GiteaBot removed the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 23, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 23, 2024
@KN4CK3R
Copy link
Member

KN4CK3R commented Feb 23, 2024

When I added the option type I had a look at the chi binding which is needed for form binding but that looked more complicated. But we should add support there too before we start to use the option type in forms.

@6543
Copy link
Member Author

6543 commented Feb 23, 2024

@KN4CK3R yes but that's outside of this pull scope i would say ?

@KN4CK3R
Copy link
Member

KN4CK3R commented Feb 23, 2024

yes, just want to share my thoughts.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
@6543
Copy link
Member Author

6543 commented Feb 23, 2024

PS: optional.None[bool]() should be equivalent to not set them, else it's a bug in the optional.Option type itself

@KN4CK3R
Copy link
Member

KN4CK3R commented Feb 23, 2024

PS: optional.None[bool]() should be equivalent to not set them, else it's a bug in the optional.Option type itself

It is identical.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 23, 2024
@KN4CK3R KN4CK3R enabled auto-merge (squash) February 23, 2024 20:56
@6543 6543 added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 23, 2024
@KN4CK3R KN4CK3R merged commit 53c7d89 into go-gitea:main Feb 23, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 23, 2024
@6543 6543 deleted the make-optional-serialize branch February 23, 2024 22:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants