gh-ost icon indicating copy to clipboard operation
gh-ost copied to clipboard

Modified vendor code in `gcfg`

Open nikhilmat opened this issue 7 years ago • 2 comments

Hello!

While trying to consume gh-ost as a go library, I included it in an application that is using godep to manage the dependencies. When gh-ost is pulled in, it ignores the project's vendor directory and installs the dependencies needed by gh-ost into the top level vendor directory in the consuming application. A while back there were some modifications to the gcfg library checked in to this repo to add the RelaxedParserMode (https://github.com/github/gh-ost/commit/4774b67ffdc6e87837ca1a2d413fe416f938eeba#diff-a44ddd65a1cbf0f5ef8b69bde1953565). When godep resolves gcfg the upstream version, I get the following compiler error because this flag is not present:

us-nmathew1:migrant nikhil.mathew$ go run ./src/main.go
# github.com/gusto/migrant/vendor/github.com/github/gh-ost/go/base
vendor/github.com/github/gh-ost/go/base/context.go:689: undefined: gcfg.RelaxedParserMode
vendor/github.com/github/gh-ost/go/base/context.go:690: undefined: scanner.RelaxedScannerMode

Any ideas on how best to proceed here? Is it possible to remove this flag and use the upstream gcfg? Currently, I've had to make these same changes in my consuming application's vendor directory and be careful when updating godep to maintain the changes. Relatedly, any thoughts on using a tool like godep to manage the dependencies?

nikhilmat avatar Oct 02 '17 18:10 nikhilmat