ZOSOpenTools / wharf

Apache License 2.0
6 stars 4 forks source link

Add more verbose output for handling unknown tagging errors #5

Open MacMalainey opened 1 year ago

MacMalainey commented 1 year ago

Right now when an unexplainable error occurs regarding expected build tags Wharf will panic, without much verbose information to diagnose the problem.

Update the error handling to provide more verbose information for debugging.

IgorTodorovskiIBM commented 1 year ago

I tried it and got the same issue as you demonstrated yesterday:

~/go/bin/wharf -v ./yq
panic: build never constraint found for actively built go file

goroutine 1 [running]:
github.ibm.com/open-z/wharf/internal/packages.loadBuildConfigs(0xc001869140, 0xc0004e3860, 0x0, 0xc0004e3548)
        /home/itodoro/projects/wharf/internal/packages/load.go:463 +0x1d02
github.ibm.com/open-z/wharf/internal/packages.Load({0xc000410290, 0x1, 0x1}, 0x26c67aa0)
        /home/itodoro/projects/wharf/internal/packages/load.go:198 +0x10de
github.ibm.com/open-z/wharf/internal/porting.run({0xc000410290, 0x1, 0x1}, 0xc001734000)
        /home/itodoro/projects/wharf/internal/porting/port.go:135 +0x7c
github.ibm.com/open-z/wharf/internal/porting.Port({0xc000410290, 0x1, 0x1}, 0xc001734000)
        /home/itodoro/projects/wharf/internal/porting/port.go:86 +0x390
main.main1({0xc000410290, 0x1, 0x1}, {0x0, 0x0}, 0x1, 0x0)
        /home/itodoro/projects/wharf/main.go:103 +0x2fe
main.main()
        /home/itodoro/projects/wharf/main.go:69 +0x5d0

Is there a workaround for it?