osquery / osquery-go

Go bindings for osquery
MIT License
386 stars 78 forks source link

Go get for osquery-go throws error #37

Closed natewalck closed 7 years ago

natewalck commented 7 years ago

I did go get on this repo and it threw the following error:

# github.com/kolide/osquery-go/gen/osquery
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:1272: cannot use extensionProcessorPing literal (type *extensionProcessorPing) as type thrift.TProcessorFunction in assignment:
    *extensionProcessorPing does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:1273: cannot use extensionProcessorCall literal (type *extensionProcessorCall) as type thrift.TProcessorFunction in assignment:
    *extensionProcessorCall does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:1274: cannot use extensionProcessorShutdown literal (type *extensionProcessorShutdown) as type thrift.TProcessorFunction in assignment:
    *extensionProcessorShutdown does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:1284: not enough arguments in call to processor.Process
    have (int32, thrift.TProtocol, thrift.TProtocol)
    want (context.Context, int32, thrift.TProtocol, thrift.TProtocol)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:2498: cannot use extensionManagerProcessorExtensions literal (type *extensionManagerProcessorExtensions) as type thrift.TProcessorFunction in argument to self33.ExtensionProcessor.AddToProcessorMap:
    *extensionManagerProcessorExtensions does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:2499: cannot use extensionManagerProcessorOptions literal (type *extensionManagerProcessorOptions) as type thrift.TProcessorFunction in argument to self33.ExtensionProcessor.AddToProcessorMap:
    *extensionManagerProcessorOptions does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:2500: cannot use extensionManagerProcessorRegisterExtension literal (type *extensionManagerProcessorRegisterExtension) as type thrift.TProcessorFunction in argument to self33.ExtensionProcessor.AddToProcessorMap:
    *extensionManagerProcessorRegisterExtension does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:2501: cannot use extensionManagerProcessorDeregisterExtension literal (type *extensionManagerProcessorDeregisterExtension) as type thrift.TProcessorFunction in argument to self33.ExtensionProcessor.AddToProcessorMap:
    *extensionManagerProcessorDeregisterExtension does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:2502: cannot use extensionManagerProcessorQuery literal (type *extensionManagerProcessorQuery) as type thrift.TProcessorFunction in argument to self33.ExtensionProcessor.AddToProcessorMap:
    *extensionManagerProcessorQuery does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:2503: cannot use extensionManagerProcessorGetQueryColumns literal (type *extensionManagerProcessorGetQueryColumns) as type thrift.TProcessorFunction in argument to self33.ExtensionProcessor.AddToProcessorMap:
    *extensionManagerProcessorGetQueryColumns does not implement thrift.TProcessorFunction (wrong type for Process method)
        have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
        want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
../../code/go/src/github.com/kolide/osquery-go/gen/osquery/osquery.go:2503: too many errors
zwass commented 7 years ago

Hey @natewalck, this is due to changes in the Thrift library (see https://github.com/kolide/osquery-go/blob/master/glide.yaml#L3-L9). You'll need to use the version specified there (which will happen automatically if you use glide or another dependency management tool that respects the glide.lock). I feel we're a bit hamstrung on this, but I'm open to ideas you have on how to get around it.

zwass commented 7 years ago

@groob just put up #38 that should help out a bit.

natewalck commented 7 years ago

Makes sense!