livebud / bud

The Full-Stack Web Framework for Go
MIT License
5.58k stars 179 forks source link

internal/testdir: attempt to reproduce occassional EOF error in CI #105

Closed matthewmueller closed 2 years ago

matthewmueller commented 2 years ago

Occassionally seeing:

Error: error: conjure: generate "bud/.app/program/program.go". program: unable to wire > di: unable to wire "app.com/bud/program".loadApp function. di: unable to find definition for param "app.com/bud/.app/web".*Server in "app.com/bud/.app/command".*Command . parser: unable to find declaration for "app.com/bud/.app/web".Server in "bud/.app/command/command.go". parser: unable to import package "bud/.app/web". conjure: generate "bud/.app/web/web.go". conjure: generate "bud/.app/controller/controller.go". 
parser: unable to import package "controller". controller/controller.go:1:1: expected 'package', found 'EOF'

This can happen when you have an empty controller/controller.go file. I haven't figured out yet why this occasionally happens.

This test didn't resolve it, but added a test just in case. Also made the error message that shows up more consistent.