mikeflynn / go-alexa

A collection of Amazon Echo / Alexa tools for Go development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken under Go 1.7

georgevanburgh opened this issue · comments

Go 1.7 effectively deprecates gorilla/context - as per gorilla/context#32.

gorilla/mux and other gorilla projects have already migrated to using the new standard library context package - which effectively means packages cannot mix their use of gorilla/mux and gorilla/context, as go-alexa currently does. Under Go 1.7, I get a on skillserver.go#L62, as context.Get(r, "echoRequest") returns nil.

Ugh. Compiles fine, but craps the bed in practice.

Looking at your pull request and it looks great and it's really a pretty small change, but I'm also unsure how to handle people using pre-1.7.

I guess we can merge in and then put a notice that you need 1.7 as of today.

The only semi-graceful alternative I can think of would be to abstract out
the context logic, and have two separate implementations - one for pre-1.7
(using gorilla context), and one for post (using native context), with a
conditional build tag choosing which version to include at compile time. I
guess it depends how important supporting pre-1.7 clients is to you

On 3 Oct 2016 22:11, "Mike Flynn" notifications@github.com wrote:

Ugh. Compiles fine, but craps the bed in practice.

Looking at your pull request and it looks great and it's really a pretty
small change, but I'm also unsure how to handle people using pre-1.7.

I guess we can merge in and then put a notice that you need 1.7 as of
today.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#7 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABl8IFon2zn_G7G0Zq0WbTDk0NwkWoLuks5qwW-IgaJpZM4KLjbN
.

Because of Go's no-breaking changes policy, 1.7 should be a simple upgrade for anyone. I don't think it's terrible to "require" (obviously you can't really require it with the way go get works) 1.7.

I'll merge and add a note to the README.

Change merged in and README updated about the 1.7 requirement.

It's been a ridiculously crazy few weeks so thank you for the heads up and patch as I totally missed this!