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

Adopt vmihailenco/msgpack v5 #124

Closed
Totktonada opened this issue Dec 13, 2021 · 0 comments · Fixed by #174
Closed

Adopt vmihailenco/msgpack v5 #124

Totktonada opened this issue Dec 13, 2021 · 0 comments · Fixed by #174
Assignees
Labels
feature A new functionality

Comments

@Totktonada
Copy link
Member

Users want new msgpack v5 features and we should find a way to offer them.

First of all investigate and summarize all differences.

I imagine different ways to adopt it:

  1. Configure v5 to work exactly like v2 by default. If it is not possible now, consider implementing the configuration options in the msgpack library and propose to authors. If it is really hard or will be declined, okay, not a way.
  2. Support both v2 and v5 and allow a user to choose. For example in the same way as we do with uuid support: import tarantool/msgpack-v5 will pull v5 into dependencies and will enable it instead of v2.
  3. Think. Think. Think. Define a set of non-breaking changes we want to offer before go-tarantool v2. Define a set of breaking features for the first go-tarantool v2 release (the discussion about go-tarantool v2 features is in V2 proposals #65).

There is a PoC: #97.

@Totktonada Totktonada added teamE feature A new functionality labels Dec 13, 2021
oleg-jukovec added a commit that referenced this issue May 27, 2022
oleg-jukovec added a commit that referenced this issue May 27, 2022
We use everywhere EncodeInt instead of EncodeInt64. Also we use
everywhere EncodeUint64 instead of EncodeUint. It can be confusing.

Although EncodeUint64 and EncodeUint have same logic in msgpack.v2, but
different in msgpack.v5. It's good for migration to msgpack.v5 too.

Part of #124.
oleg-jukovec added a commit that referenced this issue May 27, 2022
When we decode the schema with msgpack it allows us to handle errors
better. For example, incorrect type conversion leads to a runtime
error. Now it will be an usual error that we can handle by our code.

Also it will help in migration to msgpack.v5, because an interface
decoding rules by default have changed in msgpack.v5.

Part of #124
oleg-jukovec added a commit that referenced this issue May 27, 2022
The patch replaces the msgpack code by internal wrappers. The msgpack
usage have been extracted to msgpack.go file for the code and to
msgpack_helper_test.go for tests. It is the same logic for submodules.

Part of #124
oleg-jukovec added a commit that referenced this issue May 27, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

Part of #124
oleg-jukovec added a commit that referenced this issue May 27, 2022
oleg-jukovec added a commit that referenced this issue May 27, 2022
oleg-jukovec added a commit that referenced this issue May 30, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

Part of #124
oleg-jukovec added a commit that referenced this issue May 30, 2022
oleg-jukovec added a commit that referenced this issue May 30, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

Part of #124
oleg-jukovec added a commit that referenced this issue May 30, 2022
oleg-jukovec added a commit that referenced this issue May 30, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

Part of #124
oleg-jukovec added a commit that referenced this issue May 30, 2022
oleg-jukovec added a commit that referenced this issue May 30, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

Part of #124
oleg-jukovec added a commit that referenced this issue May 30, 2022
oleg-jukovec added a commit that referenced this issue Jun 2, 2022
oleg-jukovec added a commit that referenced this issue Jun 2, 2022
We use everywhere EncodeInt instead of EncodeInt64. Also we use
everywhere EncodeUint64 instead of EncodeUint. It can be confusing.

Although EncodeUint64 and EncodeUint have same logic in msgpack.v2, but
different in msgpack.v5. It's good for migration to msgpack.v5 too.

Part of #124.
oleg-jukovec added a commit that referenced this issue Jun 2, 2022
When we decode the schema with msgpack it allows us to handle errors
better. For example, incorrect type conversion leads to a runtime
error. Now it will be an usual error that we can handle by our code.

Also it will help in migration to msgpack.v5, because an interface
decoding rules by default have changed in msgpack.v5.

Part of #124
oleg-jukovec added a commit that referenced this issue Jun 2, 2022
The patch replaces the msgpack code by internal wrappers. The msgpack
usage have been extracted to msgpack.go file for the code and to
msgpack_helper_test.go for tests. It is the same logic for submodules.

Part of #124
oleg-jukovec added a commit that referenced this issue Jun 2, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
The patch replaces the msgpack code by internal wrappers. The msgpack
usage have been extracted to msgpack.go file for the code and to
msgpack_helper_test.go for tests. It is the same logic for submodules.

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

The commit also unify typo conversions after decoding in tests. This
is necessary because  msgpack v2.9.2 decodes all numbers as uint[1]
or int[2], but msgpack.v5 decodes numbers as a MessagePack type[3].
There are additional differences when decoding types.

1. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L283
2. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L285
3. https://github.com/vmihailenco/msgpack/blob/233c977ae92b215a9aa7eb420bbe67da99f05ab6/decode.go#L410

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

The commit also unify typo conversions after decoding in tests. This
is necessary because  msgpack v2.9.2 decodes all numbers as uint[1]
or int[2], but msgpack.v5 decodes numbers as a MessagePack type[3].
There are additional differences when decoding types.

1. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L283
2. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L285
3. https://github.com/vmihailenco/msgpack/blob/233c977ae92b215a9aa7eb420bbe67da99f05ab6/decode.go#L410

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

The commit also unify typo conversions after decoding in tests. This
is necessary because  msgpack v2.9.2 decodes all numbers as uint[1]
or int[2], but msgpack.v5 decodes numbers as a MessagePack type[3].
There are additional differences when decoding types.

1. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L283
2. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L285
3. https://github.com/vmihailenco/msgpack/blob/233c977ae92b215a9aa7eb420bbe67da99f05ab6/decode.go#L410

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
We use everywhere EncodeInt instead of EncodeInt64. Also we use
everywhere EncodeUint64 instead of EncodeUint. It can be confusing.

Although EncodeUint64 and EncodeUint have same logic in msgpack.v2, but
different in msgpack.v5. It's good for migration to msgpack.v5 too.

Part of #124.
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
When we decode the schema with msgpack it allows us to handle errors
better. For example, incorrect type conversion leads to a runtime
error. Now it will be an usual error that we can handle by our code.

Also it will help in migration to msgpack.v5, because an interface
decoding rules by default have changed in msgpack.v5.

Part of #124

Co-authored-by: Oleg Utkin <[email protected]>
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
The patch replaces the msgpack code by internal wrappers. The msgpack
usage have been extracted to msgpack.go file for the code and to
msgpack_helper_test.go for tests. It is the same logic for submodules.

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

The commit also unify typo conversions after decoding in tests. This
is necessary because  msgpack v2.9.2 decodes all numbers as uint[1]
or int[2], but msgpack.v5 decodes numbers as a MessagePack type[3].
There are additional differences when decoding types.

1. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L283
2. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L285
3. https://github.com/vmihailenco/msgpack/blob/233c977ae92b215a9aa7eb420bbe67da99f05ab6/decode.go#L410

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
We use everywhere EncodeInt instead of EncodeInt64. Also we use
everywhere EncodeUint64 instead of EncodeUint. It can be confusing.

Although EncodeUint64 and EncodeUint have same logic in msgpack.v2, but
different in msgpack.v5. It's good for migration to msgpack.v5 too.

Part of #124.
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
When we decode the schema with msgpack it allows us to handle errors
better. For example, incorrect type conversion leads to a runtime
error. Now it will be an usual error that we can handle by our code.

Also it will help in migration to msgpack.v5, because an interface
decoding rules by default have changed in msgpack.v5.

Part of #124

Co-authored-by: Oleg Utkin <[email protected]>
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
The patch replaces the msgpack code by internal wrappers. The msgpack
usage have been extracted to msgpack.go file for the code and to
msgpack_helper_test.go for tests. It is the same logic for submodules.

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
The msgpack.v5 code located in msgpack_v5.go and
msgpack_v5_helper_test.go for tests. It is the same logic for
submodules.

An user can use msgpack.v5 with a build tag:
go_tarantool_msgpack_v5

The commit also unify typo conversions after decoding in tests. This
is necessary because  msgpack v2.9.2 decodes all numbers as uint[1]
or int[2], but msgpack.v5 decodes numbers as a MessagePack type[3].
There are additional differences when decoding types.

1. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L283
2. https://github.com/vmihailenco/msgpack/blob/23644a15054d8b9f8a9fca3e041f3419504b9c21/decode.go#L285
3. https://github.com/vmihailenco/msgpack/blob/233c977ae92b215a9aa7eb420bbe67da99f05ab6/decode.go#L410

Part of #124
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
oleg-jukovec added a commit that referenced this issue Aug 17, 2022
Overview

    The minor release with time zones and interval support for
    datetime.

    Also now you can use go-tarantool with `msgpack.v5`. To do this,
    add `go_tarantool_msgpack_v5` to your build tags:

    $ go build -tags=go_tarantool_msgpack_v5 .

Breaking changes

    There are no breaking changes in the release.

New features

    Optional msgpack.v5 usage (#124).

    TZ support for datetime (#163).

    Interval support for datetime (#165).

Bugfixes

    Markdown of documentation for the decimal subpackage (#201).
oleg-jukovec added a commit that referenced this issue Aug 17, 2022
Overview

    The minor release with time zones and interval support for
    datetime.

    Also now you can use go-tarantool with `msgpack.v5`. To do this,
    add `go_tarantool_msgpack_v5` to your build tags:

    $ go build -tags=go_tarantool_msgpack_v5 .

Breaking changes

    There are no breaking changes in the release.

New features

    Optional msgpack.v5 usage (#124).

    TZ support for datetime (#163).

    Interval support for datetime (#165).

Bugfixes

    Markdown of documentation for the decimal subpackage (#201).
oleg-jukovec added a commit that referenced this issue Aug 17, 2022
Overview

    The minor release with time zones and interval support for
    datetime.

    Also now you can use go-tarantool with `msgpack.v5`. To do this,
    add `go_tarantool_msgpack_v5` to your build tags:

    $ go build -tags=go_tarantool_msgpack_v5 .

Breaking changes

    There are no breaking changes in the release.

New features

    Optional msgpack.v5 usage (#124).

    TZ support for datetime (#163).

    Interval support for datetime (#165).

Bugfixes

    Markdown of documentation for the decimal subpackage (#201).
oleg-jukovec added a commit to tarantool/doc that referenced this issue Aug 19, 2022
The patch adds msgpack.v5 support for go-tarantool in Go-connectors
comparison table. The feature has been introduced in go-tarantool
1.8.0.

Follows up tarantool/go-tarantool#124
patiencedaur pushed a commit to tarantool/doc that referenced this issue Aug 19, 2022
The patch adds msgpack.v5 support for go-tarantool in Go-connectors
comparison table. The feature has been introduced in go-tarantool
1.8.0.

Follows up tarantool/go-tarantool#124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants