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

Timestamp Extension #214

Open
ColtonProvias opened this issue Jan 25, 2018 · 2 comments
Open

Timestamp Extension #214

ColtonProvias opened this issue Jan 25, 2018 · 2 comments

Comments

@ColtonProvias
Copy link

A timestamp extension was added to the msgpack spec in August 2017.

https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type

I'm already seeing compatibility issues come up with clients and my own software caused by this. The expectation is to conform to the spec, so a plan should be formulated to transition. Maybe allowing for time to be read in both this library's extension and the official extension, but written as per the official extension going forward. And then on a major version release, the current non-official extension is dropped.

@shabbyrobe
Copy link
Contributor

I think I'd prefer to see a major version bump sooner rather than later where the new extension is used by default.

It has been a while since I've tinkered with the guts of msgp, but IIRC there's not really a way to pass flags to msgp's encoding/decoding process that would be consistent across the Marshal/Encode pairs. The way to do that seems to be to use an intermediate type, like what msgp.Number tries to do for the cross-client uint/int problem.

It might be better to plan a clean break and push the old time extension behind a type, like msgp.LegacyTime. It's going to be a bit annoying no matter which way it's sliced, but the goal of "time.Time is provided by the official timestamp method" seems like the only reasonable end.

@philhofer
Copy link
Member

I think we should do this version bump along with the changes to integer handling. (I also have a long-standing issue around handling of an empty msgp.Raw that I'd like to sort out.)

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

No branches or pull requests

3 participants