gocraft / work

Process background jobs in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined Cron.Parse

domgolonka opened this issue · comments

web_1        | 2019/07/18 18:57:31 ERROR    ▶ 0003 Failed to build the application: # github.com/domgolonka/goexchange/vendor/github.com/gocraft/work
web_1        | vendor/github.com/gocraft/work/worker_pool.go:170:19: undefined: cron.Parse
web_1        | # github.com/domgolonka/goexchange/vendor/github.com/kataras/iris/view
web_1        | vendor/github.com/kataras/iris/view/django.go:225:27: pongo2.RegisterTag(tagName, fn) used as value
web_1        | vendor/github.com/kataras/iris/view/django.go:253:19: undefined: pongo2.NewLocalFileSystemLoader
web_1        | vendor/github.com/kataras/iris/view/django.go:258:22: too many arguments in call to pongo2.NewSet
web_1        | vendor/github.com/kataras/iris/view/django.go:311:22: too many arguments in call to pongo2.NewSet
web_1        | 	have (string, *tDjangoAssetLoader)
web_1        | 	want (string)

I am having trouble with DEP in my docker container when trying to call Work.

I hacked a workaround in my Gopkg.toml with this:

[[constraint]]
  name = "github.com/gocraft/work"
  version = "v0.5.1"

[[override]]
  name = "github.com/robfig/cron"
  version = "v1.2.0"

I hacked a workaround in my Gopkg.toml with this:

[[constraint]]
  name = "github.com/gocraft/work"
  version = "v0.5.1"

[[override]]
  name = "github.com/robfig/cron"
  version = "v1.2.0"

Thanks, that's work, do you know the reason why? @drauschenbach

@nhaancs sorry no I can't remember, it was too long ago.

I had to track this down too. They released v3 of robfig/cron in June 2019, and it's backwards incompatible with v1 and v2. If your project just runs a go get to use the latest version you'll run into this error. The latest tag to use is the one above, v1.2.0.

They put v3 upgrade tips in the robfig/cron README; maybe someday we can update the work library.

This has been driving me absolutely crazy and tired of working around this on our CI so figured id push a PR instead of complaining lol.

This may have resurfaced. Your latest commit causes worker_pool.go:183:22: undefined: cron.SecondOptional