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

Error with figtree@master when pulled into go-jira/jira #4

Closed
mikepea opened this issue Sep 16, 2019 · 4 comments
Closed

Error with figtree@master when pulled into go-jira/jira #4

mikepea opened this issue Sep 16, 2019 · 4 comments

Comments

@mikepea
Copy link

mikepea commented Sep 16, 2019

Trying to use figtree@master with go-jira/jira results in the following error during make prove:

# ERROR: _t/100basic.t at line 58
# RUNNING: ../jira ls --project BASIC -n todo
# STATUS: 1
# STDIO <<EOM
# reflect.Value.MapIndex: value of type interface {} is not assignable to type string
# goroutine 1 [running]:
# runtime/debug.Stack(0xc00017cb78, 0x8c42e0, 0xc0001d5cd0)
# 	/home/travis/.gimme/versions/go1.12.9.linux.amd64/src/runtime/debug/stack.go:24 +0x9d
# github.com/go-jira/jira/jiracli.HandleExit()
# 	/home/travis/gopath/src/github.com/go-jira/jira/jiracli/cli.go:45 +0x8c
# panic(0x8c42e0, 0xc0001d5cd0)
# 	/home/travis/.gimme/versions/go1.12.9.linux.amd64/src/runtime/panic.go:522 +0x1b5
# reflect.Value.assignTo(0x8e1080, 0xc0001d5cc0, 0x94, 0x97e0a1, 0x16, 0x8c42e0, 0x0, 0xc0001d2ed0, 0xc0001f9a40, 0xc0001bf7e0)
# 	/home/travis/.gimme/versions/go1.12.9.linux.amd64/src/reflect/value.go:2339 +0x437
# reflect.Value.MapIndex(0x8e2ee0, 0xc0001d27e0, 0x15, 0x8e1080, 0xc0001d5cc0, 0x94, 0xc0001d5a80, 0x98, 0x8c42e0)
# 	/home/travis/.gimme/versions/go1.12.9.linux.amd64/src/reflect/value.go:1104 +0x8c
# github.com/coryb/figtree.(*Merger).mergeMaps(0xc0001bc900, 0x8e2ee0, 0xc0001d27e0, 0x15, 0x8e1920, 0xc0001d2ed0, 0x15)
# 	/home/travis/gopath/pkg/mod/github.com/coryb/figtree@v1.0.1-0.20190907170512-58176d03ef0d/figtree.go:775 +0xfb
# github.com/coryb/figtree.(*Merger).mergeStructs(0xc0001bc900, 0x8e2ee0, 0xc0001d27e0, 0x15, 0x8e1920, 0xc0001d2ed0, 0x15)
# 	/home/travis/gopath/pkg/mod/github.com/coryb/figtree@v1.0.1-0.20190907170512-58176d03ef0d/figtree.go:697 +0x14b3
# github.com/coryb/figtree.(*Merger).mergeMaps(0xc0001bc900, 0x8e2ee0, 0xc0000a3060, 0x195, 0x8e2ee0, 0xc0000a3100, 0x195)
# 	/home/travis/gopath/pkg/mod/github.com/coryb/figtree@v1.0.1-0.20190907170512-58176d03ef0d/figtree.go:795 +0xc1c
# github.com/coryb/figtree.(*Merger).mergeStructs(0xc0001bc900, 0x8aede0, 0xc0000a3060, 0x16, 0x8aede0, 0xc0000a3100, 0x16)
# 	/home/travis/gopath/pkg/mod/github.com/coryb/figtree@v1.0.1-0.20190907170512-58176d03ef0d/figtree.go:697 +0x14b3
# github.com/coryb/figtree.(*FigTree).LoadConfigBytes(0xc0000a4960, 0xc0001c6800, 0x5f9, 0x7f9, 0xc00009b2f3, 0x12, 0x8aede0, 0xc0000a3060, 0xc00017d8b8, 0xc00017d8b8)
# 	/home/travis/gopath/pkg/mod/github.com/coryb/figtree@v1.0.1-0.20190907170512-58176d03ef0d/figtree.go:204 +0x4ef
# github.com/coryb/figtree.(*FigTree).LoadConfig(0xc0000a4960, 0xc00009b2c0, 0x45, 0x8aede0, 0xc0000a3060, 0x2, 0x2)
# 	/home/travis/gopath/pkg/mod/github.com/coryb/figtree@v1.0.1-0.20190907170512-58176d03ef0d/figtree.go:226 +0x250
# github.com/coryb/figtree.(*FigTree).LoadAllConfigs(0xc0000a4960, 0xc0001d6760, 0x12, 0x8aede0, 0xc0000a3060, 0x0, 0x0)
# 	/home/travis/gopath/pkg/mod/github.com/coryb/figtree@v1.0.1-0.20190907170512-58176d03ef0d/figtree.go:161 +0x225
# github.com/go-jira/jira/jiracli.ConfigTemplate(0xc0000a4960, 0xc000082660, 0x5f, 0x976e59, 0x4, 0x8fcae0, 0xc000104580, 0x7fa196c8a6d8, 0x8fad40, 0x88af77, ...)
# 	/home/travis/gopath/src/github.com/go-jira/jira/jiracli/templates.go:194 +0x12a
# github.com/go-jira/jira/jiracmd.CmdListUsage.func1(0xc0000d2f30, 0x40ba73, 0x8fad40)
# 	/home/travis/gopath/src/github.com/go-jira/jira/jiracmd/list.go:56 +0x239
# gopkg.in/alecthomas/kingpin%2ev2.(*actionMixin).applyPreActions(0xc0001514b8, 0xc0000d2f30, 0x0, 0x0)
# 	/home/travis/gopath/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/actions.go:37 +0x6e
# gopkg.in/alecthomas/kingpin%2ev2.(*Application).applyPreActions(0xc00012eb40, 0xc0000d2f30, 0xc000194a01, 0x1, 0x1)
# 	/home/travis/gopath/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:540 +0xe9
# gopkg.in/alecthomas/kingpin%2ev2.(*Application).Parse(0xc00012eb40, 0xc0000a4130, 0x5, 0x5, 0x5, 0xc0000d2ea0, 0x0, 0x0)
# 	/home/travis/gopath/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:201 +0x148
# github.com/go-jira/jira/jiracli.ParseCommandLine(0xc00012eb40, 0xc0000a4130, 0x5, 0x5)
# 	/home/travis/gopath/src/github.com/go-jira/jira/jiracli/usage.go:186 +0xf0
# main.main()
# 	/home/travis/gopath/src/github.com/go-jira/jira/cmd/jira/main.go:47 +0x4d7
# EOM
not ok 9 - RUNS $jira ls --project BASIC -n todo
@mikepea
Copy link
Author

mikepea commented Sep 16, 2019

Mostly leaving this here to note the error @coryb -- currently it's not possible to upgrade to figtree master in go-jira, but also it's not possible to use v1.0.0.

071d1ef is the last known-good version afaict (as per go-jira's go.mod), but i'm going to have a bit of a tinker to see where this break actually happens. Possibly worth tagging 071d1ef as v1.1.0 though?

@mikepea
Copy link
Author

mikepea commented Sep 16, 2019

It looks like this breaks at a42ef93 - see https://github.com/go-jira/jira/commits/figtree_4_bisecting

8bd141a is the last commit that passes the go-jira test suite.

@coryb
Copy link
Owner

coryb commented Sep 16, 2019

Thanks for looking into this, not sure exactly what the issue is, but I whould be able to get a fix out soon.

@coryb
Copy link
Owner

coryb commented Sep 16, 2019

Closing this issue here, opening a PR on go-jira. I removed the explicit override of the default map type to map[string]interface{} allowing figtree users to managed the default map types in their code. So in order to update figtree we will have to set yaml.DefaultMapType in go-jira.

@coryb coryb closed this as completed Sep 16, 2019
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

2 participants