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

quickfix.TimestampPrecision incompatible with latest release v0.6.0 #1

Open
elwinarens opened this issue Feb 7, 2019 · 6 comments
Open

Comments

@elwinarens
Copy link

elwinarens commented Feb 7, 2019

Problem
When installing quickfix using got get quickfix, the build fails if github.com/quickfixgo/field is included:

# github.com/quickfixgo/field
vendor/github.com/quickfixgo/field/fields.generated.go:2363:67: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:2457:69: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:2798:63: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:3654:67: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:4843:61: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:5492:57: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:5744:66: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:5855:58: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:6277:62: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:6927:62: undefined: quickfix.TimestampPrecision
vendor/github.com/quickfixgo/field/fields.generated.go:6927:62: too many errors

This is due to an update of this repo after the quickfix.TimestampPrecision was added to the quickfix repo. Timeline:

  • 14 Aug v0.6.0 release of quickfix.
  • 15 Aug Added quickfix.TimestampPrecision to quickfix.
  • 7 Oct Field repo fields.generated.go update with quickfix.TimestampPrecision

Solution
Create a new release of quickfix. Prevent regression by synchronising releases cross-repository.

@javkrei
Copy link

javkrei commented Mar 13, 2019

@elwinarens I'm facing this issue, do you know what I could do in my installation to avoid having this build problem?

@ZhangYet
Copy link

I try to alias TimestampPrecision as bool in quickfix/fix_utc_timestamp.go in my vendor.
And then, quickfix.Millis and quickfix.Seconds is undefined

@ZhangYet
Copy link

At last, I modified fix_utc_timestamp to fix this problem.

type TimestampPrecision bool

const (
	Seconds TimestampPrecision = true
	Millis  TimestampPrecision = false
)

//FIXUTCTimestamp is a FIX UTC Timestamp value, implements FieldValue
type FIXUTCTimestamp struct {
	time.Time
	NoMillis TimestampPrecision
}

@jimidle
Copy link

jimidle commented May 31, 2019

The fix from Apr 23 above does not work with the latest code. I am using modules - perhaps the solution is for quickfixgo to also use modules?

Does anyone know of a work around for this, or have a real solution.

Update:

go get -u github.com/quickfixgo/quickfix@master

Will get the latest non-versioned code for quickfix, and this compiles.

@ZhangYet
Copy link

ZhangYet commented Jun 2, 2019

@jimidle If you use go module, it'll update codes in vendor dir every time.

So, my final solution is: fork quickfixgo and modify it.

@jimidle
Copy link

jimidle commented Jun 3, 2019

@jimidle If you use go module, it'll update codes in vendor dir every time.

So, my final solution is: fork quickfixgo and modify it.

OK - I am happy with using the latest code - it builds and works. If you do not wish to use go modules, then that's your prerogative of course. Thanks for taking time to answer.

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

4 participants